David Hayward plays around with
Linux, and manages to embed his terminal onto the desktop.
Why do we use Linux? Is it because of the
security, or its inherent speed and functionality? Is it because it’s free and represents
a great two-fingered salute to the corporate giant that is Microsoft? Or is it
just because we love being different and having total control over our beloved
desktop? Whatever it is that draws you to Linux, you have to admit that the
vast customisation of this wonderful OS is one of its many endearing features.
Linux
Mint 10
We all love a little eye-candy from time to
time and nothing gives us Linux users more joy than seeing the green faced
Windows users drool at the special, and admittedly, totally useless effects
that we can run within our operating systems. Videos and images of rotating 3D
desktop cubes have allowed the Linux user to grin smugly for many years, so
with that in mind, let’s add one more feature that is sure to stir the seething
cauldron of those who are unwilling to come over to the light that is Linux.
Let’s embed the terminal onto the desktop, so it becomes a part of the
wallpaper. Why? Well, why the devil not?
For this how-to we’re going to be using
Linux Mint 10, purely because that’s what we have on my system at the moment
and having Compiz already bundled makes the process a little easier than
normal. Also, not everyone is willing to update to the latest offerings from
the Linux community. On that note we’re going to assume (always a dangerous
thing) that you have a working and installed version of Linux with Gnome, that
you have the Compiz packages installed and running, and that you have a decent
working knowledge of the terminal and how to create an executable file. If not,
don’t worry too much; we’ve added some screenshots and tried to include as much
of the text and code as possible. So here goes…
Tantalizing terminals
Firstly, open up a terminal, click ‘File’,
then ‘New Profile’.
Enter a name for the new profile (David in
this case). This will be the named profile we call when using the compiz
settings. Click ‘Create’ when ready – see Fig 1.
The
terminal, bless its little cotton ones
In the ‘Profile’ settings window, under the
‘General’ tab, untick ‘Show menubar by default in new terminals’.
In the ‘Title and Command’ tab, click on
the drop box next to ‘When terminal commands set their own titles’ and select
‘Keep initial title’. In the ‘Initial title’ bar, type the name of your
profile. This will specify that any new terminals that are started will be
launched with the profile and the new initial title. The drop-down list
specifies how to handle the set titles – see Fig 2.
Terminal
profiles are great for adding a spark to your desktop
Click on the ‘Background’ tab, untick the
Use background settings from system theme and select Transparent background,
moving the slider all the way over to ‘None’. Although this is pretty self
explanatory, it just means that the terminal will appear to be a part of the
desktop wallpaper – see Fig 3.
You
can even specify different images for each profile…
In the Scrolling tab, use the drop-down box
to ‘Disabled’ for the ‘Scrollbar is:’ option. This will disable the scroll bar
on the default right of the terminal screen – see Fig 4.
…not
to mention other wonderful options
Click ‘Close’ to finish the terminal
profile setup, and enter the Control Centre and CompizConfig Settings Manager.
Click on the ‘General Options’ icon and untick ‘Hide Skip Taskbar Windows’.
This option will disable the ‘hide windows not in the taskbar’ when entering
the show desktop mode – see Fig 5.
Compiz
can be an unpretty beast to browse over…
Click ‘Back’ when ready and scroll down to
the ‘Effect’ section. Make sure that the ‘Window Decoration’ effect is ticked
and enabled, and then click on the icon. In the ‘Decoration windows’ box, type
‘(any) $ !(title=David)’, obviously replacing the ‘David’ part with whatever
you named your terminal profile as. This just clarifies which windows should be
decorated, specifically the terminal profile window named David – see Fig 6.
…with
more options that you’ll ever need
Click ‘Back’ when you’re done, and scroll
down to the ‘Window Management’ section. Make sure that the ‘Window Rules’
plug-in is ticked, and enabled, and click on the icon. Type, in the following
text boxes, ‘title=David’ (again substituting the ‘David’ with your profile
name):
Skip taskbar
Skip pager
Below
Sticky
Non-movable windows
Non-resizable windows
Non-minimisable windows
Non-maximisable windows
Non-closeable windows
The above will determine the state and
properties of the terminal window, making sure that it remains a static fixture
to the desktop wallpaper – see Fig 7. Click on ‘Back’ when you’re done, exit
Compiz and return to your desktop.
Everythingable
labellable boxables – eh?
Now all we need to do is run the profile
and declare the dimensions of the terminal on the desktop. Press Alt+F2 to open
the Run Application window and type in the following:
gnome-terminal – window-with-profile=David
– geometry 80x45+250+75 &
Click on ‘Run’ when you’ve typed in the
command and hey presto, you should now have the terminal built into, or more
accurately onto, the desktop. Type in ‘Exit’ to quit the desktop terminal and
experiment with the size and position of the terminal by altering the
80x45+250+75 values, and don’t forget to again substitute the ‘David’ value for
own profile name.
Permanent fixtures
If you want to make the embedded terminal a
permanent feature when you start up Linux, then you will need to create a basic
executable script that will initialise the run command after the Compiz
services have started. To do this, use your favourite text editor (Gedit, for
example) and create a file called, something like ‘deskterm.sh’ and add the
following lines of code:
#!/bin/bash
Sleep 25 && gnome-terminal –
window-with-profile=David – geometry 80x45+250+75 &
By all means change the sleep time to
whatever you prefer, and what works best with your system, plus you can always
copy and paste the experimented values for your terminal from the Run
Application window you entered earlier.
Save the file and exit the text editor.
Make the newly created file executable by opening a terminal (if you haven’t
already) and typing in: chmod +x deskterm.sh (changing the name of the file to
then one that you created). Go to the Control Centre and click Startup Applications,
then click ‘Add’ when the preferences window pops up. Enter a name for the file
we created – Deskterm, for instance. Next, browse to the location of the saved
deskterm.sh file and select it, then finally enter a comment (if you want).
Click on ‘Add’ when you’re done, making sure the deskterm command is ticked in
the list of startup programs and click ‘Close’ – see Fig 8.
Enter
a witty comment, unlike mine
Restart your system and, all going well;
you should now have a fully working terminal as part of the desktop wallpaper
on every desktop workspace. Typing ‘Exit’ will close down the terminal, so
you’ll have to run the executable again if you want the embedded terminal to
reappear.
But why?
And finally, why do we do this? Because
we’re Linux users and we can!
Other tasty terminals
Of course, if you just want to go down the
easy road of having a terminal embedded onto your desktop, then open up your
package manager and search for Guake Terminal. This pull-down Quake inspired
terminal defaults with 100% transparency, and with a simple hit of the F12 key
it can be hidden again if necessary. It features everything you’d expect from a
decent Gnome terminal, plus some good configuration options that are just
asking to be played around with.