Multi-Tasking at the command line with screenie

The use of the tool screen is well documented throughout the Internet, however it’s third-party accomplice is not. Screenie is a front-end to screen.

Why Do I want to know about this?

Using the command line can be done in a few ways – for one, you can work at the Linux console (i.e., not within the X Window Environment, so you are forced to use the virtual consoles – tty/vty 0-9, which can ordinarily be accessed via Ctrl+Alt+Fx where x is the tty number.). You can of course also use your favourite xterm, like the gnome or KDE terminal, and many of these now support tabbed windows (liked tabbed web browsing). However, if like many, you ssh into a server remotely and would rather still have all your session data still available if the connection is suddenly dropped, then screen is your tool. It’s also great because you can have multiple screens running at one time. You simply detach from the current terminal (screen) and reattach another active screen. In practice this sounds simple enough but it’s a pain when you have several screens running.

What does screenie do?

Screenie puts a user friendly interface on top of screen. If you install screenie via apt-get (sudo apt-get install screenie if you are using Debian/Ubuntu), you’ll be prompted with a simple menu driven interface, asking you to create a new session or use an existing screen session. This is ideal for multi-tasking at the command line. For example, you can have one terminal running top, another one running alpine for email, another one running ttytter (the terminal based twitter client), and perhaps another one running less on a log in /var/log. Whatever you want each terminal or shell to do, you can run up as many as you like and switch between them with ease. The best part is that if your ssh connection suddenly drops because your laptop goes to sleep or your Internet connection bums out, simply reconnect with ssh and run screenie again. All of your previous sessions are still running.

Using Screnie

To use screenie at launch simply type screenie from the command line. On it’s first launch you’ll see a fairly empty screen, simply offering the option to launch a new session by pressing the a key.

Hit a and you’ll be asked for a session name, just give any old name, but something that defines the purpose of this shell session, for example, I write “Apache Logs” on the one for viewing my apache logs. Next, it’ll ask you for a job. This is where you tell screenie which program to launch. I usually just launch the job ‘bash’, which is the bash shell, and issue commands from there, however, you can execute any command from there, so for example, if you were viewing a tail session of Apache logs, you could enter that as tail -f /var/log/apache/error.log – whatever you want!

The program will launch and you’ll be returned to the screenie menu, to view the session you just launched press 1 – it should be showing in the list of sessions. At any time, if you want to get back to that menu of sessions and perhaps launch a new session, simply press Ctrl-A-d (that is, press and hold Ctrl-a and then hit the d key). You’ll be returned to the screenie menu and you can launch another session, or jump between existing sessions you have open, allowing you quickly to check on a log in the middle of writing an email or any other task you may conceive of.

RELATED:   Review: Download Managers for Linux

This will save you loads of time on the command line and will also save frustration against lost connections. Hope you find this hint helpful!

Related Post

Leave a Reply