Force Google Chromium to have a normal title bar in KDE

KDE is awesome largely because KWin is awesome. If I had to name one reason I gave up using Gnome and moved to KDE, it'd be KWin.

Some programs (for example, Songbird, aTunes, Google Chrom(e|ium)) try to manage their own windows in silly ways like hiding their title bars and window borders, or fiddling with how they appear in pagers or task managers / application lists, or trying to manage their own sizes and positions. KWin lets you override and force sane preferences upon such programs.

Chromium for Linux is nice enough to give you an option to "Use system title bar and borders" if you right-click the top. But this only changes how Chrome looks; it doesn't make the KWin title bar and borders appear.

Why would you want KWin title bar and borders? Because by default, Chromium's self-managed title bar only gives you Windowsy options like minimize/maximize/close. It doesn't give you Linuxy options like double-clicking the title bar to window-shade the window, or right-clicking the title bar to get the KDE menu to send it between desktops or make it Always on Top, and such goodness. If I wanted gimped up window management I'd go use Windows 95.

To get the normal KWin title bar to appear, go into System Settings, Window Behavior, Window Specific, then New...

Click the Detect Window Properties button and then click an open Chromium window to fill in the details, as in this screenshot.

(Note that for most apps you can right-click the title bar of the window, go to Advanced and Special Application settings and get to the same place, but in the special case of windows without normal title bars, you have to do it in this more roundabout way.)

KWin

Then go to Preferences and set No Border to "Force", and uncheck the box. (This is kind of confusing because it's a double-negative; a checked box means to hide the window borders, and an unchecked box means to show them.)

KWin

Once you save and apply all of this, Chromium will have a normal window title and border forever, whether it likes it or not. Rejoice as sanity is restored to the world.

Chromium

You can use this dialog to do other helpful things like make your IM windows be sticky across all desktops by default. Or to sort your applications to always start (and stay) on certain desktops. Or to force applications to start maximized or have a certain geometry.

Another thing I find very helpful is to turn Focus stealing prevention to the highest setting for any program that likes to throw dialog boxes at me and demand immediate attention. Thunderbird used to be really annoying in this way.

Most other Linux window managers can do some of this kind of thing too with either built-in options or via 3rd-party scripts (last I checked Gnome was the latter but it's been a while). However few do it as well as KWin. The only thing I've used comparable to KWin is probably FVWM, and KWin's GUI configuration is orders of magnitude easier to work with than FVWM config files.

September 18, 2009 @ 6:58 PM PDT
Cateogory: Linux

11 Comments

Matija "hook" Šuklje
Quoth Matija "hook" Šuklje on September 18, 2009 @ 8:33 PM PDT

Care to share what makes you use Thunderbird and Songbird instead of KMail/Kontact and Amarok, since you're already using KDE?

I mean, now that my own laptop is dead, I'm forced to borrow Win(XP) laptop(s) and run Win* apps from my USB key with PortableApps on it and have to use Thunderbird and Songbird in order to preserve sanity at all.

But I find both of these apps (including Lightning) to just suit my most basic needs, but neither feel pretty enough nor perform as good as their KDE counterparts.

Either I'm missing something or we have different expectations of such software, but if you have time I'd like to hear what made you choose otherwise then me. :]

Carlos Cordoba
Quoth Carlos Cordoba on September 18, 2009 @ 11:08 PM PDT

Great tip. Thanks for sharing it. I was wondering how to get rid of the ugly chrome's windows style.

Jim
Quoth Jim on September 19, 2009 @ 2:27 AM PDT

I was largely uninterested in this post, given that I use neither Chromium or KDE.

Then I saw the words: "Focus stealing prevention". Colour me excited!

Going to have to check this out now (and see how effective it is in fluxbox)

Brian
Quoth Brian on September 19, 2009 @ 2:58 AM PDT

@Matija I do use KMail now, but I used Thunderbird for a couple years. Still searching for a good audio player now that Amarok 1.4 is on its last legs.

@Jim Not sure if you can use KWin from Fluxbox. I think it might be difficult.

Matija "hook" Šuklje
Quoth Matija "hook" Šuklje on September 19, 2009 @ 4:47 AM PDT

@Brian: I saw your post comparing Songbird to Amarok 2.x. I know it's quite different from Amarok 1.x, but I quite like it. There may be features still missing, but from what I see it's getting better and better quite fast. Have you tried 2.2 (beta)? Now you can organise the interface a lot more to your own liking and make the playlist take as much space as you want it to.

Other then Amarok I use (or used to until my laptop died :P) herrie. It's a nice ncurses based player that's also capable of scrobbling to Last.FM.

Brian
Quoth Brian on September 19, 2009 @ 4:50 AM PDT

Yeah I'm using the latest Amarok2 out of git right now. It's slightly improved but I'm already drafting a blog post about my problems with it. :)

Milan
Quoth Milan on September 19, 2009 @ 12:37 PM PDT

With openbox the option "Use system title bar and borders" does just that, no need to mess with matching window class and forcing something so it looks like that option doesn't work with kwin for some reason.

foo
Quoth foo on September 19, 2009 @ 3:13 PM PDT

Hmm, that's odd. I'm running KDE 4.3 on Gentoo here, and I'm able to just right-click to have Chromium "Use system title bar and borders" to be able to use all the standard KWin stuff like shading and moving to another desktop.

Brian
Quoth Brian on September 19, 2009 @ 4:45 PM PDT

Hmm. 4.3 here too. Oh well. Not a huge hassle to do it the long way.

Gen2ly
Quoth Gen2ly on September 20, 2009 @ 5:33 AM PDT

I've been looking at more 'bare to the bone' music players and have settled on Goggle's music manager. It's in the community-repo under musicmanager.

Anonymous Cow
Quoth Anonymous Cow on December 18, 2009 @ 12:31 PM PST

No you don't have to do it the roundabout way. Alt + F3 is your friend.

Speak your Mind

You can use Markdown in your comment.
Email/URL are optional. Email is only used for Gravatar.

Preview