Easy Transparent Terminal Solution – Install Devilspie2 with Gnome3 on Arch Linux
Wednesday, Aug 7, 2013
Introduction
As we know that for Gnome 3.8 and above the transparency has been removed. From what I have searched the main reason for that maybe bugs can be fixed by removing those few lines of the code. Therefore, they kindly removed the transparency feature of Gnome Terminal.
I need a transparent terminal, as the terminal is one place I may spend a lot of my time working with, and it is ugly. I did some research on the web and I am now writing this to share how did I get the transparent terminal again (even more “transparent” than before) by using Devilspie2 and Gnome3.
Install all software you need
You will need Devilspie2 https://github.com/gusnan/devilspie2, and a bunch of related compiling tools and skills to install software from its source code (unless you are using a package management system with devilspie2 in it). In my case, luckily I have Arch Linux, which again, provides a lot of software I need without having to dig into the source code. I can just run:
aurget -S devilspie2
And follow the instructions as normal, and I am all set and ready to go!
Write the configuration script
The script needs to follow the syntax of LUA language, and you can use some function calls to use in your statements like get_application_name
to get the name of the application, and set_window_opacity
to change the opacity of the window. All the functions are pretty straightforward and easy to follow. I will post my configuration here so you can copy and paste and modify.
if (get_application_name() == "Terminal") then set_window_opacity(0.85) set_window_size(1000, 650) center() end
Put the file in the ~/.config/devilspie2
folder, and use whatever file name you like with a .lua
suffix. Then if you run devilspie2
in a terminal window, you should now have the window transparent. If not, try check the manual and see what is wrong.
Auto-start devilspie2
You may notice that devilspie2 does not automatically start when you log in, that is because Gnome use a session manager to control what programs to run as kind of an X desktop service. To manage the session, open a terminal and enter gnome-session-properties
, this should bring up the session manager and you should be able to add devilspie2 in the session. Logout and log in again you now should see the devilspie2 running.
How do I get the Window name and Application name?
You should use the debug output and run devilspie2 in debug mode in the terminal manually. Therefore when you open a new window, you will be able to get the window’s name and application name in the terminal.
Result and conclusion
It is really easy to get devilspie2 working and properly configured, the above image is a working transparent gnome terminal window.