Monday, August 4, 2014

My Favorite Linux Tools and Installation Guide

    My two favorite Linux tools at the moment are xfce4-terminal and glances. The XFCE terminal is like most other Linux terminal clients in most respects, but what sets it apart for me is the drop down feature. I had just started using Guake, but did not find it entirely to my liking, so I started searching for a replacement. I found that replacement in a Web Upd8 article detailing how to use the XFCE terminal with the drop down feature in Ubuntu, and quickly fell in love with it. The terminal is in the default 14.04 repositories now, so installing it couldn't be easier, but this post just naturally turned into an install tutorial.

The install command for the XFCE terminal is listed bellow.

sudo apt-get install xfce4-terminal


    The next element to the setup is adding the keyboard shortcut. It generally works the same in most desktop environments, but I'm using Unity at the moment so that's what I'll demo. Navigate though the settings manager > keyboard > shortcuts, and find the custom shortcuts option at the bottom of the screen.

The command that we want to bind to a key is as follows:


xfce4-terminal --drop-down


I generally use F12 as the shortcut key, which is what Guake defaults to. If you are using XFCE, the terminal setup is complete. I have never set this up in KDE, but in Unity or Gnome, we aren't quite done setting everything up.

Unity settings manager.

Keyboard settings.

Keyboard shortcuts.

Custom shortcut dialog.
    The slight pain point that comes with the terminal setup in Unity or Gnome is that the settings pane for the terminal initially appears behind the terminal, and by default, clicking elsewhere on the screen will not hide the current drop down. You can still close the terminal, but this closes the settings pane too. The best workaround for this is to make sure that the move window keyboard shortcut is setup and easily accessible.

I prefer Shift + Alt + Z for my move window shortcut.
    Once you have that move window shortcut bound, click the settings pane window to give it focus. Use the keyboard shortcut to drag the settings pane below the terminal and uncheck the box that says "Use shortcut to focus visible window". Now the shortcut will drop down the terminal on command, and clicking outside of the terminal will hide it (the settings pane should also show up in front of the terminal by default now). Now you can also change the color scheme of the terminal (presets include the excelent solarized dark), change the width and transparency, and tweak the rest of the behavior to your liking. The terminal is also persistent, and supports tabs, which is where my next tool comes in.

Uncheck "Use shortcut to focus visible window".
    Glances is a cross platform system monitor written in Python that is less resource intensive than running a graphical resource monitor. Installation instructions for all platforms are listed here, but this is the command for Ubuntu 14.04:


sudo apt-get install glances


    The program can now be run by typing "glances" in an open terminal window. By default the XFCE terminal is setup to create a new tab with "Shift + Ctrl+ T", close a tab with "Shift + Ctrl + W", and switch tabs with "Ctrl + PgUp" or "Ctrl + PgDn". I usually open XFCE terminal at boot, run a glances window, then open a new tab to work in. I've also installed glances on my Digital Ocean server mostly just for fun, but the point is, it's a great tool for a desktop that can also run on a headless system.

A running glances instance.
    XFCE terminal and its drop down feature has dramatically improved my workflow. I no longer need a Unity or Gnome indicator to show system resource usage, and a great terminal experience is just a key press away. I especially love the ability to open an article like Digital Ocean's guide to installing a lamp stack on Ubuntu 14.04, click through the links to more documentation, and have a terminal window handy without spending time on window management or using "Alt + Tab" to move through windows. I hope this guide explained the install process well, or at least brought these great tools to your attention.

No comments:

Post a Comment