Debian – Launching application without titlebar and window decorations

debiandesktop-environmentx11xfce

I want to launch VLC without the titlebar and window decoration. I'm using the following line to launch VLC:

vlc -I dummy --no-video-deco --no-embedded-video test.mpg

Unfortunately this doesn't remove the titlebar in XFCE. If possible it would be nice with a generic solution to remove the decorations for any application.

Currently I'm using Debian Jessie with XFCE, however this can be changed to whatever. What matters is a generic solution to this problem.

Best Answer

Use either Devil's Pie or Devilspie2 to remove the window decoration. Both will likely work for any application, otherwise will not work against applications with the client-side decoration.

Using Devil's Pie

For Devil's Pie, open a text editor and type the following code.

(if (is (application_name) "VLC media player") (undecorate))

Save as file at $HOME/.devilspie/filename.ds with any filename of choice. Make sure the file extension is .ds. Finally, run devilspie in terminal to see the result.

Using Devilspie2

For Devilspie2, open a text editor and type the following code.

if (get_application_name()=="VLC media player") then
   undecorate_window();
end

Save as file at $HOME/.config/devilspie2/filename.lua with any filename of choice. Make sure the file extension is .lua. Finally, run devilspie2 in terminal to see the result.

Devil's Pie vs. Devilspie2

If there is one thing that makes difference between these tools, it is the latter. Devilspie2 provides a convenient way to check the window name and application name for running applications, without having to run a separate command like wmctrl -l from other tool.

To see the debug information with Devilspie2, add the following code in the .lua file.

debug_print("Window name: " .. get_window_name());
debug_print("Application name: " .. get_application_name());

Exit running instance, then run devilspie2 -d in Terminal will print something like below.

Running devilspie2 in debug mode.
[...]
Window Name: VLC media player
Application name: VLC media player
Window Name: Dictionary
Application name: xfce4-dict

See /usr/share/doc/devilspie2 for script example and more details.

Devil's Pie and Devilspie2 are both available in all repositories of Debian releases (oldstable, stable, testing, unstable), according to the Debian package search results.

Tested Devil's Pie and Devilspie2 in Debian 8 Xfce and Xubuntu 14.04 (both runs Xfce 4.10), and Devilspie2 in Linux Mint Debian Edition 3 (Cinnamon 3.8).

Related Question