Leapdragon 2016 - Aron Hsiao Was Here

So I wanted to use KDE 4.x, especially with  §

the infamous “GNOME Shell” approaching with GNOME 3.0, but there was a little problem: KDE 4.x sucks. It suffers from these problems for mobile professionals:

  • None of the KDE 4.x themes have reasonable GTK counterparts, meaning lousy desktop integration.
  • None of the KDE 4.x window decorations look good with any of the GTK themes.
  • But you still need to use Thunderbird, Firefox, GIMP, and so on.
  • Dual-monitor support only works if you have a desktop with two screens. Start docking/undocking a laptop and totally random shit that you don”t want to happen… happens.

Here is how to make KDE 4.x suck less on Fedora 12. I”ll soon find out if it works on Fedora 13.

  1. Give up trying to match the KDE 4.x themes with a GTK theme. They all look horrible. Instead, start with GNOME. Log into your GNOME desktop (that you don”t plan to use) and find a theme and window decoration that you like. I use Shiki, which is based on Murrine, but anything will do. Just log into GNOME and activate a theme of your choosing, then log out again.
  2. Tell KDE 4.x to use your GTK theme. Log back into KDE 4.x and set your theme to “GTK+.” Now your Qt applications will have a perfect imitation of your preferred GNOME theme, rather than trying to accomplish the inverse. Of course, window decorations won”t match, but we”ll fix that next.
  3. Use compiz or metacity rather than Kwin. Metacity can be used even if you don”t have 3D hardware. Just log into KDE 4.x, fire up a shell, and type “metacity –replace &” and you”ll get your GNOME window decorations. Only thing you lose: the “show desktop” applet. Even virtual desktop stuff works. If you have 3D hardware, even better. Use compiz. But first, edit /usr/bin/compiz-manager so that it starts the GTK window decorator even when you”re in KDE. Just comment out the entire last if/elif/fi block near the end of the file and replace it with:
    ${COMPIZ_BIN_PATH}gtk-window-decorator –replace &

    Then, log into KDE 4.x, fire up a shell, and type “compiz-manager &” and you”ll have full desktop effects with nice GNOME window decorations that match the GTK theme that all of your applications (both GTK and Qt) are now using.
  4. Make these changes permanent. Create a shell script in ~/.kde/Autostart that just calls the command from step 3, either “metacity –replace &” or “compiz-manager &” and nothing else. Mark the script executable with “chmod ug+x ~/.kde/Autostart/your-script-name” and the next time you log into KDE 4.x you”ll get the right window decorations instead of Kwin automatically.
  5. Make the fonts match. You”ll notice out of the box that KDE and GNOME have totally different font rendering. To fix this, open system settings” Fonts control and have KDE control the fonts, rather than using “system” fonts. Then, have KDE apply these settings to GTK apps. Once you make these two changes, your GTK and Qt apps will render fonts very similarly, rather than in radically different ways.
  6. Fix the dual-monitor thing. Turns out that KDE 4.x has totally broken dual-monitor heuristics and they”ve been unable to fix it in two years. News: it ain”t getting fixed, ever. BUT you can use xrandr to configure your monitor space before logging into KDE and KDE 4.x will then auto-detect your settings and adapt nicely. In my case, the correct commands before starting KDE 4.x are:Dual monitors on: Nothing needed; just log in and KDE will autodetect and run dual-monitor.Internal monitor only: Nothing needed, just log in and KDE will autodetect and run single-monitor. External monitor only: xrandr –output VGA –off
  7. Automate it. Of course it”s not nice having to log into the “failsafe” session all the time, go to the shell, type “xrandr –output VGA –off; startkde” just to get to your desktop. So, create a new session that leads to a script you manage. Go to /usr/share/xsessions and create a file called “X Session.desktop” containing the following:
    #!/usr/bin/env xdg-openEncoding=UTF-8Version=1.0Type=ApplicationTerminal=falseIcon=gnome-panel-launcherName=X SessionExec=sh ~/.xsessionComment=Use home folder .xsession fileName=X SessionComment=Use home folder .xsession fileIcon=gnome-panel-launcherThen, create a file called ~/.xsession that contains:#!/bin/bashSESTYPE=”$(/usr/bin/zenity –list –text “Select session” –column “Sessions” “Dual-display” “Internal” “External”)”if [ “$SESTYPE” = “Dual-display” ]; then    trueelif [ “$SESTYPE” = “External” ]; then    xrandr –output VGA –offelse    truefi/usr/bin/startkde &Edit as necessary after your own experimentation with xrandr and add anything else you want to do before you start your desktop environment.

Congratulations! Once you”ve performed this very simple set of steps, KDE 4.x will have the basic functionality for dealing with GNOME theme integration and multiple displays that it should have had from the beginning and still doesn”t!Epilogue: I wouldn”t even have bothered except for the fact that the new GNOME coming down the pipe promises to suck even harder. What has happened to the Linux desktop? 🙁

Post a Comment

Your email is kept private. Required fields are marked *

8 − 8 =