Can I hide the title bar of MPlayer in gnome?
Solution 1
If it's just for MPlayer you could use the -noborder
argument.
mplayer -noborder my_video.ogg
As a more general option, if you're using Compiz (default), you can:
- Install and launch the CompizConfig Settings Manager
- Select the Window Decoration plugin and hit the "plus" sign next to "Decoration Windows".
- Describe the type of window you do not want title bars on with an "And" relationship, and mark "Invert". For example:
Click "Add" and enjoy!
Solution 2
One can remove the border of all windows, it is however a little hacky. I described the process a bit at:
http://grumbel.blogspot.com/2011/06/forcing-fullscreen-in-linux-for-apps.html
And have some code floating around at:
https://github.com/Grumbel/fullscreen-tools
Using the code from the git repository you can do:
./windowtool.py --decorations 0 ACTIVE
Which will deactivate the border, using 1 instead of 0 will reactivate it. ACTIVE refers to the window that has currently the focus, you can also give the window id which you can obtain via:
wmctrl -l
PS: The code isn't pretty and the README in there is a bit out of date.
Solution 3
You can use the -title
option:
mplayer -title ' ' file.avi
Solution 4
Here's how to remove the title bar, that should work with almost all window managers in X11 :
xprop -name 'My window name' -format _MOTIF_WM_HINTS 32i -set _MOTIF_WM_HINTS 2
where My window name
is your window name.
You can specify the window id instead, with the -id
option.
If you omit the -name
option, you will have to select the window whose title bar you want removed, by clicking on it.
Related videos on Youtube
Mantra
Video quality guy and researcher, PhD student in computer science. Founder/CEO of AVEQ. I offer personal consulting and help with video encoding, especially with FFmpeg. Send a mail to werner.robitza at gmail.com. More info on my website.
Updated on September 18, 2022Comments
-
Mantra almost 2 years
I'm on a 10.04 machine with MPlayer, version SVN-r1.0~rc3+svn20090426-4.4.3.
When you invoke MPlayer from the command line to show a file, it displays the file within a window. This bar has a title, "MPlayer".
How can I disable this bar, entirely? I don't want to remove the title only, but the complete window bar. It's probably not an MPlayer option, but rather something with the window toolkit?
-
Admin over 12 yearsSorry, didn't catch that earlier — yes, I want to remove the complete window decoration, to more or less have a borderless video playing.
-
-
Satchit Bhogle over 12 yearsDoes the first method work only for MPlayer, or only for .ogg files? It failed to work for a .avi file with Totem.
-
Mantra over 12 yearsSeems like option #1 does the trick already — I'll check tomorrow to be sure. Thanks for the great answer!
-
Mantra over 12 yearsSorry, I wasn't being clear. I wanted to get rid of the border entirely (see Jacob's answer above).
-
erjiang over 12 years@SatchitBhogle The '-noborder' switch is an mplayer-specific feature.
-
unhammer over 12 yearsI removed any unrelated stuff and created a tiny script that simply toggles the titlebar of the active window, here: gist.github.com/1815146 (I bind it to super+r in xfce keyboard settings, works nicely for youtube popouts along with always-on-top)
-
c0dehunter over 11 yearsWhat if we want to do it with some other app - any straightforward way?