How to run SCREEN in user space without installation in the system. Daemon of the user space on some a hostings with the multiusers environment or some VPS.

If you work on remote system in the terminal mode. If you want leave a working programms after disconnect from the terminal. For that you can use screen programm. But in the some cases this programm not installed on the system.
For it we have a simple decision.

1. You should upload a binary file of screen to the remote server. Any i386 or x86_64 and verify all libraries.

user@remote-server [~]# ldd screen
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0xb7eb6000)
        libutempter.so.0 => /usr/lib/libutempter.so.0 (0xb7eb4000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x003ad000)
        libc.so.6 => /lib/libc.so.6 (0x0023b000)
        libdl.so.2 => /lib/libdl.so.2 (0x00396000)
        /lib/ld-linux.so.2 (0x0021c000)
user@remote-server [~]#

Seem everything is ok.

2. Screen wants get variable of environment – SCREENDIR. When we set value for this variable in the user space, then we set the secure directory for screen’s socket. It is very important if hosting resides on the shared server.
For example, just add rows to yours .bash_profile and make the directory screen in the $HOME.

cd && mkdir screen;
echo SCREENDIR=$HOME/screen >> .bash_profile
echo "export SCREENDIR" >> .bash_profile

And make relogin

3. Next just test its.

For example:

user@server [~]# ./screen -d -m -S curl 'htop'
user@server [~]# ./screen -ls
There is a screen on:
        222053.curl     (Detached)
1 Socket in /home/user/screens.

user@server [~]# ps -eF|egrep htop
user   222053       1  0  1399   808   6 13:12 ?        00:00:00 ./SCREEN -d -m -S curl htop
user   222054  222053  3  3842  1356   6 13:12 pts/1    00:00:00 htop
user   223524  166121  0 15822   800   6 13:12 pts/2    00:00:00 egrep htop
user@server [~]#

All are done!

Scroll to top