Back to the archive

From the archive

Easy Transparent Terminal Solution – Install Devilspie2 with Gnome3 on Arch Linux

Introduction

As we know, for Gnome 3.8 and above, transparency has been removed. From what I have found, the main reason for that may be that bugs can be fixed by removing those few lines of code. Therefore, they kindly removed the transparency feature of Gnome Terminal.

I need a transparent terminal, as the terminal is one place where I may spend a lot of my time working, and it is ugly. I did some research on the web and I am now writing this to share how I got a 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 the Lua language, and you can use some function calls 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, paste and modify it.

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 a transparent window. If not, try checking 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 uses a session manager to control what programs to run as a kind of 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 to the session. Log out and log in again, and you should now see 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. Then, 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

Transparent terminal

It is really easy to get devilspie2 working and properly configured. The above image shows a working transparent Gnome terminal window.