FINALLY! SOME UPDATES! This website is being reconstructed. Some content will go away soon. If you want to see my new stuff, visit my github: https://github.com/jrcharney/.

June 9, 2012

Use tmux on your SSH connection

I finally was at my wits end using GNU Screen on SSH, especially since on my computer, tmux is my terminal multiplexer of choice.

The collective knowledge of the internet lead me to a post on Trevor Suarez's website, blennd.com, where a post from last summer caught my attention on how to install tmux on a remote SSH account. Firstly, I need to check if my web host was cool with this. After finding on objections to the installation of this powerful light-weight program, the next thing to do was to figure out how to install it.

To my fortune, one of the commentors to Suarez's post named Craig Laparo, came up with a Bash script for installing tmux. Before I considered running this script, I checked to see if there were any updates to libevents or tmux. I applied the updated file paths to the script. Ran the script, based on mostly Laparo's script and ran into some issues.

Firstly, deleting the temp directory where the software packages were installed was a bad idea to include in the script. If there was an error log, that would also be deleted. So I commented that out after the first time when things didn't work.

Secondly, Suarez may have done right by exporting variables to the local environment. However, these variables reset or delete themselves on logout. Fortuantely, Laparo caught this and suggested storing the exports into a file. He suggested .bashrc but that was the wrong file to do it in. After figuring out what went wrong, it turns out .bash_profile is the correct file to place the exports in AND where one can also store their alias commands. The former has been corrected. The latter, I intend on doing more of in the future.

In a nutshell, this is what the file looks like. (You might need to scroll past the header)

Download this file!

There are still a few tweaks I'd like this script to do like what todo with upgrade and whether or not the tee command should have been used in the end since the first set of exports are used for the current session and the second set is meant for future sessions.

Other than that, I'm considering applying the same process to Shell-FM and IRSSI even though my webhost has IRSSI. Shell-FM needs it's own IRSSI script. It's on the Todo list now.

Hopefully by the end of the week, I will be able to let readers read posts individually. It shouldn't be hard to do.

UPDATE: I made some changes to the script! Exports now happen at the begining rather than the end. So be sure to edit them according to your systems needs!

Tags

Under Construction