[Sprint Samsung Galaxy S 4 General] DynamicBIts:
Since I don't have 10 posts, I am not allowed to post links. You'll have to copy and paste. Sorry!

There are several guides and videos that explain how to root/install a custom recovery, but they all require Odin (of which distribution is of questionable legality), or at least Windows. I made this guide for those that can't or don't wish to use Windows/Odin.

Prepare

If your phone still has the MDC software, let it update to the MDL version. Updating to MDL will not cause any problems with the following process.

Download and install [bitbucket.org/benjamin_dobell/heimdall/downloads] Heimdall 1.4.0 on your PC. (You don't need the frontend)

[techerrata.com/browse/twrp2/jfltespr] Download the latest TWRP version and save it on your PC. (Get the .img file)

Get a TouchWiz-based kernel and save it on your PC. Several are listed in the "TW KERNELS" section of [THREAD="2303917"]inlineboy's directory[/THREAD]. You can also pull the boot.img file out of a TouchWiz based ROM, which is what I did.

The rest of this guide assumes you are in a terminal window, in the directory where the TWRP and kernel IMG files are located.

Verify Compatibility

With phone off and no USB cable connected, hold volume down and power. When you feel the vibration, release power, but not volume down.

Once you see the warning screen, release volume down.

Press volume up once to continue.

Connect the USB cable.

Type the following command:

sudo heimdall detect

If you don't see "Device detected", something isn't working correctly. Don't continue any further until you resolve that issue.

The following two commands get the PIT file from your phone and verify the MD5 of the PIT file.

sudo heimdall download-pit --output stock.pit
md5sum stock.pit

If the MD5 is not cc4f7331a6434a93000b3dd2684b7204, then stop. Something is different with your phone. The MD5 may vary when (if) a 32GB or 64GB version is released. I have only tested with the 16GB version.

You can optionally create a human-readable version of the PIT file with the following command:

sudo heimdall print-pit --file stock.pit > stock_pit.txt

Disconnect the USB cable and power off the phone.

Flash the Recovery and Kernel

Follow the instructions in steps 1-4 of the "Verify Compatibility" section above to get back to download mode.

Verify (again) that Heimdall sees your phone and then flash the new recovery and kernel.

sudo heimdall detect
sudo heimdall flash --RECOVERY recovery.img --BOOT boot.img

The phone will reboot into the normal Android OS. Power it off and disconnect the USB cable.

Verify Recovery Mode

With the phone off, hold volume up and power. When you feel the vibration, release power, but not volume up.

Once you see the "Recovery booting...." text in very tiny blue letters, release volume up.

Assuming everything worked, you should see something similar to the below TWRP splash screen and then the actual TWRP interface a few seconds later. From here, you can flash the ROM of your choice or just flash zip file mods.

i.imgur.com/r32KChJ.jpg (I'm not allowed to post images either - *sigh*)

Notes

Although I think it should work, I could not get the custom recovery to load without replacing the kernel. I read somewhere that this is a Samsung thing.

If at any time you see "ERROR: Protocol initialisation failed!", just start over.

I used Heimdall 1.4.0 64-bit on Xubuntu 12.04.2 LTS with TWP 2.5.0.2 and the FreeGS4 2.0.0 Agat-FreeGS4 kernel. Other combinations should work, but you may want to try these exact versions if you are experiencing issues.

I have only tried this with the Sprint version of the Samsung Galaxy S4, which is why I posted in the Sprint forum. The process should be the same with other carriers, but you may need to use a different recovery or kernel. If you have success with another carrier, please share your experience in the comments.

The following is the terminal output of the actual flashing procedure: (with the protocol and 3 repeating letter subdomain removed from the the URLs)

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Uploading BOOT
100%
BOOT upload successful

Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...