Monday, July 6, 2015

Install GNU-screen binaries when you don't have root access

GNU-screen is very useful when running long commands that survive across SSH sessions.  Sometimes you get access to servers that do not have it installed. Here is how to do it without having root access, without having to install from source. Installing from source may require additional libraries, and you may end up installing many things from source.

# download the package for yum-based linux distros (RedHat, Fedora, CentOS, …)
yumdownloader screen
# extract package contents
rpm2cpio screen-X.rpm | cpio -idv
# or for debian based (Debian, Ubuntu, …)
aptitude download screen
# extract package contents
dpkg -x screen-X.deb .
# prepare environment (append to .bashrc to be always available)
export SCREENDIR=$HOME/var/run/screen
export PATH=$HOME/usr/bin:$PATH
# launch screen
screen

Read more...