This should work on any number of Linux distributions and window managers (ie. FluxBox, OpenBox, WindowMaker, Gnome 3, KDE). For this guide, we will be working in Debian 7 Wheezy, using Gnome 3.
Normally, I keep my desktop pretty clean. No icons, no volumes, nothing. One day I thought that I should look for a way to utilize that space. Since I normally dedicate one of my workspaces to a full screen terminal, I decided I should add one to my desktop. Now that I’ve done this, I can hit my “show desktop” key binding and have the terminal available. Not only does it make the terminal quicker to get to but it looks awesome too! Lets get started!
This should work on pretty much any window manager and any distribution. The following packages are required and can most likely be installed using your package manager.
- devilspie (Official Website: Devil’s Pie)
- urxvt-unicode (Official Website: rxvt-unicode also known as urxvt)
Configure to Your Liking
Once we have rxvt and Devil’s Pie installed, we need to change some of the options as well as make each of them talk to each other. Both rxvt and Devil’s Pie are very flexible, lightweight and extremely customizable. With the configuration below, the terminal will look just like the one in the picture above.
First, you will probably need to make a text file called
.Xresources in your home directory. Some distros use
.Xdefault. To create this file, use the following command in the terminal. It will open a text editor and create the file. If you’re not comfortable using nano, then change
nano to which ever text editor you like.
nano ~/.Xresources && xrdb -merge .Xresources
Note that whenever you use
~/ in a terminal that means your home directory. Also,
xrdb is telling X to make the changes without you having to restart X. Now that you are editing the file, copy and paste the code below.
! THE FOLLOWING LINES ARE OPTIONAL... I JUST DIDN'T LIKE THE DEFAULT TEXT
URxvt.font: xft:Free Sans:size=11
Save the file and close it. We now have a configured urxvt terminal. Now we need to configure Devil’s Pie. Devil’s Pie lets you customize how any window opens and looks. By default Devil’s Pie will look for scripts in
~/.devilspie. So, lets go to that directory and create a script. In the terminal enter the following code (again replacing nano with your text editor of choice).
cd ~/.devilspie && nano DesktopConsole.ds
You should now be editing another text file. Copy and paste the code below, then save the file.
(matches (window_name) "DesktopConsole")
Before we continue, we should test to make sure it works and that the dimensions and colors are to your liking. Open two terminals. In the first one, enter
devilspie and hit enter. Devil’s Pie needs to start first. Then in the second window enter
rxvt -name DesktopConsole and hit enter. You should now have a terminal waiting on your desktop! Check it out!
To find out where the terminal begins and ends I usually try to fill the screen with text by typing
dmesg. If you find that the screen is too big or too small, then I suggest changing the line in
DesktopConsole.ds that says
Setting it to Open at Start Up
To make this appear at startup without having to enter the commands yourself. To do this, we will create a startup script and add it to the Startup Applications. Begin by creating a directory in your home folder called
.startup and begin editing it using the code below.
mkdir ~/.startup && nano ~/.startup/devilspie.sh
You will now be editing a new text file. Copy and paste the following code into this file.
sleep 4; # wait for a moment so everything starts properly
rxvt -name DesktopConsole
Save the file and make it executable by running the following command in the terminal.
chmod +x ~/.startup/devilspie.sh
Now that everything is in place. We need to add this script to the startup applications for your window manager. In Gnome it is called “Startup Applications Preferences”.
- Open “Startup Applications Preferences” and click the “Add” button.
- Name it “Desktop Console”
- For the command, enter
sh /home/USER_NAME/.startup/devilspie.sh(replacing USER_NAME with your username for logging into the computer).
- Click the “Add” button and then close Startup Applications Preferences.
You are ready to go! Now the next time you login, you will have an embedded terminal on your desktop! As I mentioned before, both rxvt and Devil’s Pie are very customizable. If you’re interested in making your own customizations, I suggest reading some of the docs found on the official websites. I would love to see what you’ve come up with. If you got this working in other distributions or other window manager, please let me know by posting below!