How to create a transparent terminal session as your desktop background

Sponsored Link
Like my article on Conky, this is one of my favorite techniques to use on any Linux distribution. This technique -- utilizing devilspie -- will create a transparent terminal session on your desktop that will remain for the duration of your login (unless you exit the terminal session for some reason) This particular how-to addresses Ubuntu specifically, but I've done this successfully in 3 or 4 distributions.

It should look something like this when you're done:


1) The first thing to do is to install devilspie. This is easily done at the command line.

sudo apt-get install devilspie

This will show up in your terminal looking something like this:

Once you have devilspie installed, it is time to configure it.

2) The first command creates a directory (.devilspie) off of your home directory in which you will create a file called DesktopConsole.ds that will contain the configuration parameters (you can edit the geometry values later to better fit your desktop size).

Again, go to the command line/console and type the following commands:

mkdir ~/.devilspie
gedit ~/.devilspie/DesktopConsole.ds

Copy and paste the following configuration text into the file you just opened with gedit:

(if
(matches (window_name) "DesktopConsole")
(begin
(set_workspace 4)
(below)
(undecorate)
(skip_pager)
(skip_tasklist)
(wintype "utility")
(geometry "+50+50")
(geometry "924×668")
)
)

Save the file and close gedit.

3) Create a new gnome-terminal profile named "DesktopConsole"

Open a gnome terminal (Applications-Accessories-Terminal) and choose File-New Profile. Type in "DesktopConsole" for the name of the profile. Your screen should look something like this:

On the General Tab, uncheck the "Show menubar by default in new terminals" box:

On the Scrolling tab, make sure that the Scrollbar is disabled:

On the Effects tab, enable "Transparent background" and move the slider to wherever you want to get your desired degree of transparency. I like mine totally transparent (all the way to the left):

5) Now you have to add two programs to your startup/sessions group -- one to launch devilspie and the other to launch the reconfigured terminal within the devilspie parameters.

Go to System-Preferences-Sessions and you should see the following screen (or something similar):

Click on the "New" button and type in "devilspie" for the program name and "/usr/bin/devilspie" for the command. I"m pretty sure sure it will work if you leave out the "/usr/bin/" part, but I usually put it in just to make sure.

Create another new startup program called "gnome-terminal xxx" (choose anything really) and type in "gnome-terminal --window-with-profile=DesktopConsole" in the command window (that's a double dash before the word "window").

When you complete this step, your screen should look like the following. Make sure that devilspie loads before gnome-terminal.

6) At this point, all you should have to do is log out and back in or use the CTRL-ALT-BKSP key combination.

Your desktop should look similar to the following:

You might notice that between the two pictures that the text color is different. That's something that you can easily change using the profile editor. I will sometimes change the profile so that I can see the text better -- depending on which background I'm using.

One more thing -- I configure my installation to have X follow the mouse so that all I have to do is move the cursor in the general direction of the terminal session on the desktop in order for the terminal to gain focus. You can do this in System-Preferences-Windows.

Devilspie has many more capabilities than just this. There is a good wiki here. Also, in order to give credit where credit is due, I got most of my information from this small tutorial (I have pictures, though.) 🙂

Enjoy!

Sponsored Link

Related posts

You may also like...

32 Responses

  1. cva says:

    What tool(s) are you using for the right side of your window showing all the statistics?

  2. Zach says:

    I did this, and now I can’t get into gnome. It just goes to a black screen and plays the little song. I’m in fluxbox right now, but I can’t get the sessions app to open. Is there a way to edit it by command line? I don’t know were the file for it is.

    Thanks, Zach.

  3. Zach says:

    Never mind, I was trying to launch the app by command line, and tried “gnome-session” and it booted me into gnome! I’ve learned something out of this, how to start gnome from command line..) So I was able to just go into the Sessions app and delete the two entry’s. Now gnome starts up fine! 🙂

  4. cva says:

    doh! I missed your first article on conky.

  5. cstamper says:

    Zach: I haven’t actually tried editing the session parameters in other than Gnome but I think the theory would apply if Fluxbox (or any other WM) is able to create a terminal w/the same values. Like I said in the article, I’m not familiar enough w/the other WMs to know how to tweak the startup settings.

    Cva: I’m glad you found it! I really like Conky and you can make it look any way you want.

  6. vedang says:

    that’s a great tip there! i’ve tried it out and it rocks! only problem is, I’d like to resize the terminal window. I tried changing the second geometry line (to 1200×1024) but it doesn’t make any difference. Any suggestions?

  7. cstamper says:

    Vedang:
    I’ve never had any problems adjusting the terminal size. Did you restart X (Ctrl-Alt-Bksp) when you were done editing the DesktopConsole.ds file?

  8. Rogue says:

    Sorry for this but kinda new to linux.. I did everything you said and mine does not look like yours does.. Mine still has the bars on the sides and top.. what could I have done wrong..

  9. cstamper says:

    If you followed the tuturial and used the same settings for the DesktopConsole terminal, you shouldn’t have the bars. I’ve done this successsfully in Ubuntu and in Fedora but have had mixed success in other distributions. Also, in Fedora, it seems like once I lost the focus on the transparent terminal, I can never get it back. Strange. You are using Gnome on Ubuntu?

  10. Rogue says:

    Ubuntu Fiesty

  11. cstamper says:

    All I can say is that I’ve used this exact procedure many times various times on different versions of Ubuntu (using Gnome as my WM), and everything turned out perfectly. In fact, these screenshots were taken from a clean install/configuration of devilspie and gnome-terminal.

  12. Rogue says:

    I just reinstall unbuntu and same thing but I am sure its just me.. ty for your time

  13. vedang says:

    yup, i did that. tried it several times with different values. editing the first line ( “+50+50” ) changes the position where the terminal appears, but editing the second line makes no difference.
    i should mention that i use compiz-fusion. though i don’t see how that matters.

  14. Vikas Rawal says:

    I am running ubuntu 7.04 and have followed your instructions. I can’t get devilspie to work. When I do it from the terminal, it exits with the following error.

    ** (devilspie:19865): WARNING **: Error in parsing: Unexpected token encountered: 226
    Cannot parse /home/vikas/.devilspie/DesktopConsole.ds: Unexpected token encountered: 226
    No s-expressions loaded, quiting

    I have the DesktopConsole.ds in the right place and it has the contents copied from this page.

    Vikas

  15. vedang says:

    @vikas
    don’t copy the code from this webpage. some extra unicode character seems to get copied. I had the same problem, so I just wrote out the code myself, and voila.. problem solved.

  16. cstamper says:

    Vedang: I haven’t tried it while compiz is running since my laptop won’t run compiz well. It may have something to do with your problems. And thanks for the reply to Vikas. I tried to use CSS to create one of those code blocks that you see around the web but WordPress killed the CSS that I put in the post. I had no problem copying the code/text directly from the original site.

  17. rogue says:

    After using the original page it worked like a charm thanks guys……………..

  18. scotte says:

    I tried it on Feisty with no luck at all. terminal does not even load. any ideas anybody, i followed both tutorials.
    thanks.

  19. Ru4n says:

    How can i disable minimalisation of this transparent terminal ?
    For example: I use cedega for playing some win games and if i use ctrl+alt+d for minimization to come into transparent terminal, terminal is minimized too and i cant use him. thx

  20. chyjinx says:

    I get the following when i run devilspie in terminal, and I do have 4 desktops.

    ** (devilspie:8152): WARNING **: Workspace number 4 does not exist

    (devilspie:8152): Wnck-CRITICAL **: wnck_window_move_to_workspace: assertion `WNCK_IS_WORKSPACE (space)’ failed

  21. Abraham says:

    I can get this to work, but it only opens on workspace 4. Any suggestions?

    Thanks!

  22. Matt says:

    Great guide man, been meaning to do this for a while but never settled on a background image until now… by the way, what do you use to set all the transparent monitors on the right hand side of your desktop?

  23. The right hand side of the desktop is a utility called Conky which I also described on my website. I love it.

    To all the rest of you – I’m not really sure how to solve the problems except by reading the documentation on devilspie. It works for me in Ubuntu, Suse and Mandriva, but not in Fedora. Go figure.

  24. Matt,

    Oops, my bad… Those windows on the right side of the desktop are just screenshot files that I captured to use as an examples of how to install/configure devilspie. That’s just how they displayed – I didn’t configure anything.

  25. ??????? says:

    ?? ??, ??? ????????????? ????????. 🙂

  26. Zounds says:

    Hey,
    Thanks for the tutorial, I have one problem with it though: the terminal window won’t start up automatically, devil’s pie does but the terminal won’t. Now if I type the command for the terminal in by hand or even copy and paste it into another terminal it works fine and shows up transparent but it just does nothing when entered into the session manager, any suggestions?

    Thanks

  27. doez says:

    thank’s

  28. Kevin says:

    I tried doing this on Ubuntu 8.10. Followed exactly but nothing happens. Only thing that happens is the file menus and stuff doesn’t show up on terminal. nothing is transparent or on the desktop and terminal still has the close, minimize buttons at the top

  29. Tom says:

    Abraham–

    Try changing the (set_workspace 4) to whatever workspace number you want it on. Or, you could replace the command with (pin) which will make it visible on all workspaces.

    Zounds–

    Make sure that the
    gnome-terminal –window-with-profile=DesktopConsole
    runs after
    devilspie
    in System->Preferences->Sessions

  30. Ubuntucoffeeman says:

    Hey, I don’t see any pictures.
    How am I supposed to follow the tutorial without pictures?!

Leave a Reply

Your email address will not be published.