Developer Tools

Software related topics

Developer Tools

Postby diemkae » Thu Jul 20, 2017 7:52 pm

Things to make life better for software developers.
diemkae
 
Posts: 6
Joined: Thu Jul 15, 2010 7:58 am

Re: Developer Tools

Postby diemkae » Thu Jul 20, 2017 7:59 pm

For Linux/Unix developer who do stuff on remote hosts with ssh, "screen" might be a handy tool, especially for long-running remote tasks (downloads, conversions, etc.).

Check this out:

http://raspi.tv/2012/using-screen-with- ... sions-open

Essentially, instead of using ssh <hostname> in a terminal window, run "screen bash" (kinda like script in that it starts another bash instance) and then do your ssh <hostname>.

To disconnect without terminating the remote session, hit CTL-A then "d":

[detached from 15365.pts-1.leno]

To list the current disconnected sessions, use "screen -list":

dmk@leno:~$ screen -list
There is a screen on:
15365.pts-1.leno (07/20/2017 11:26:36 AM) (Detached)
1 Socket in /var/run/screen/S-dmk.

The sessionID is 15365.pts-1.leno.

To reconnect to a disconnected session, use

screen -r <sessionID>

If there is only one disconnected session, "screen -r" will reconnect to it.

To terminate (instead of disconnect) a screen session, hit CTL-D , (instead of CTL-A, d).

Note that If you are in a remote ssh session, within a screen session, you need to hit CTL-D once to end the ssh session and again to end the screen session - which is indicated by:

[screen is terminating]

If you have limited [screen] real estate on which to keep multiple ssh sessions, this might be handy.
diemkae
 
Posts: 6
Joined: Thu Jul 15, 2010 7:58 am


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron