Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I want to start an application with bottom-most property. That means that the window will remain always in the bottom of the other windows.

Is this possible? I think that there must be an application that does such a thing, but I have not idea how to find it...

For example, I want to start chromium-browser with bottom most property. How can I do that?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You could use Devilspie2 (, a program which performs actions on windows as they are created, using scripts written in Lua (

Install it with: sudo apt-get install devilspie2, then run devilspie2. You should see the error message:

No script files found in the script folder - exiting.

It will have created this folder as ~/.config/devilspie2/. Create the following file, and save it in this directory with the extension .lua, e.g. as chromium.lua:

debug_print("Window Name: " .. get_window_name())
debug_print("Application name: " .. get_application_name())
debug_print("WM_CLASS: " .. get_class_instance_name())
debug_print("Window Class: " .. get_window_class())
if (string.match(get_application_name(),"Chromium$")) then

Then run devilspie2 --debug & and open Chromium. The terminal should show:

Window Name: Untitled - Chromium
Application name: Untitled - Chromium

All Chromium windows (any application name ending in 'Chromium') opened while Devilspie2 is running will now be set to be below all normal windows.

Opening other programs while Devilspie2 is running with the debug switch, should help you modify this code for other applications.

To automatically run Devilspie2

Create a file ~/.config/autostart/devilspie2.desktop, containing:

[Desktop Entry]

Adding Additional Conditions

To run a script for an application only sometimes, you could either:

  • Run Devilspie2 only as needed, e.g. devilspie2 & app ; killall devilspie2, though it will apply its rules to all new windows created while it is running.

  • For GTK apps, the option --name= changes the application name, and --class= the Window class. Chromium doesn't recognise this despite documentation.

  • Run the command with a modified environment, e.g. window-below= chromium-browser, and instead use the following rule:

    if (string.match(get_application_name(),"Chromium$")) and
       (string.match(io.input("/proc/" .. get_window_property("_NET_WM_PID") .. "/environ"):read("*a"), "window-below="))
share|improve this answer
Thanks! And is it possible to set the window below only if I start chromium using chromium-browser --set-this-window-below or so? –  Ionică Bizău Jul 21 at 6:42
For Chromium yes. The following works only because unrecognized options are ignored, which is unusual. Just change/environ in the last example above to /cmdline, and window-below= to --window-below –  Martin Thornton Jul 21 at 18:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.