Can the Title Bar of Opera be removed in Linux?
Tuesday, March 30, 2010 2:28:27 PM
My original post continues below.
Opera UNIX does not have this feature, primarily because it doesn't need it. The size and the look of the title bar is really down to your WM (Window Manager). If you think the title bar is too big, then see if your WM is customisable. Many WMs have options to switch off window borders/decorations for specific (or all) applications, indeed some small WMs provide very tiny or even no decorations. So if you want this functionality, check what your Window Manager is capable of, and if the option isn't possible directly perhaps try another Window Manager.
For example, in addition to my main desktop machines at home and at work, I have an ASUS Eee PC 4G Surf netbook. Given it has a really tiny screen (a 7-inch wide LCD with an 800x480 pixel resolution) I use a very stripped down Window Manager with it, evilwm (which provides 1 pixel border for all applications). Here is a screenshot of the entire screen, when Opera is running:
(Click on the image to see it full size).
Granted evilwm might be a little drastic for many people, but you don't need to choose such an extreme option. Here is an example with KWin (KDE's default Window Manager):
As you can see I have configured KWin to set Opera to have no border, but left the border for all other applications (e.g. see KWrite in the screen shot).
To do this for yourself: Right click on the title bar of any application and choose "Configure Window Behaviour", then select "Window-Specific" and click on "New" to start creating a new Opera specific rule. Add a suitable description (e.g. "Opera - No Decorations") and change the "Window class (application type)" drop down from "unimportant" to "Exact Match", then enter "Opera" (without quotes). Now select the "Preferences" tab and tick "No border", select "Force" from the drop down and tick the other checkbox to the right. Now click "OK" and then "Apply".
After this change start Opera and you will see it has no title bar (or any other window decoration). However, it can still be maximized, minimised, resized and moved via right clicking the KDE task bar.
What about if you are a Gnome user?
Well as long as you use Compiz and its Window Decorations plugin it is relatively easy here as well. Start CCSM (CompizConfig Settings Manager), go to plugin "Window Decoration" and in the line for "Decoration windows" add this:
& !name=opera(Thanks to patkoscsaba for this tip! )
If you don't use Compiz, but rather Metacity, things are slightly more complex as Metacity doesn't allow fine grained control of borders/dectoration itself. You can either switch to another WM that does support this or you can use a utility such as Devil's Pie to add this kind of control to Metacity indirectly. Here is an example:
$ sudo aptitude install devilspie $ mkdir -p ~/.devilspie
After this create a custom Opera configuration file with all borders switched off. For example:
$ echo '(if (is (application_name) "Opera") (undecorate))' > ~/.devilspie/opera.ds
Now start Devil's Pie, followed by Opera:
$ devilspie & $ opera &(Note: Devil's Pie man page isn't great. However, this page provides great documentation for Devil's Pie.)
Opera now has no title bar (or any other Window Decoration). However, it can still be maximized, minimised and moved via right clicking the Gnome task bar (or by using Alt with the left [move], middle [resize], or right [context menu] mouse buttons).
You can make this more permanent by setting Devil's Pie as an application that is launched on startup, e.g. in Ubuntu/Gnome add a new entry under "System > Preferences > Startup Applications".
Here is a screen shot of Opera running without decoration under Metacity/Gnome:
Note: Devil's Pie works with many WMs, not just Metacity!
Finally, if you are a Fluxbox user, checkout Corey Mwamba's blog post on Fluxbox decoration settings.
I won't even attempt to try and cover all possible WMs but users can add there own configuration setting below in the comments if they so desire.