Wednesday, October 13, 2010
Using Compiz in KDE 4
I've been using KDE 4 for some time now, and I was pretty happy with its own desktop effects. However, lately, I started to notice that kwin and xorg process were taking some CPU usage, and with graphic cards such as Intel GMA and ATI, the effects were not so smooth (while in Gnome with compiz they were much better). So I decided to try and use compiz with KDE as well; here's my (positive) installation and configuration experience.
First of all I installed all these packages
emerald libemeraldengine0 compiz compizconfig-settings-manager compiz-kde compiz-fusion-plugins-main compiz-fusion-plugins-extra fusion-iconThen you found the compiz-fusion application in my KDE menu, in System. Run it, and you can set some configuration options with that icon, in particular, you need to change the window decoration to emerald, and the window manager (to compiz). Then you must select reload window manager.
To keep compiz as the default window manager when KDE starts, you need to change System Settings -> Default Applications -> Window Manager (by selecting Compiz).
Of course, now you can configure compiz settings with its setting manager, but I suggest you to use the simpler configuration manager, simple-ccsm, as illustrated here.
Now enjoy compiz! :)
Pubblicato da betto a 12:08 PM 2 commenti
Monday, October 20, 2008
KWin is not restored after removing Compiz
I tried Compiz on a desktop computer, but this made the system pretty slow, so I removed it with synaptic... after a restart, all the windows of the KDE desktop were shown without a frame (thus it was pretty useless). This seems to be a known bug in (k)ubuntu, but the solution
sudo aptitude reinstall kwindid not work for me (all the windows were still frameless).
The only solution that worked for me was also to remove all the compiz configuration files in my home:
find ~/ -name "*compiz*" -exec rm -rf {} \;hope this helps :-)
Pubblicato da betto a 1:43 PM 1 commenti
Saturday, May 03, 2008
Konqueror instead of Dolphin
I've always loved KDE, but the latest file manager introduced with KDE 4, i.e., Dolphin... well... I just can't stand it. I prefer using Konqueror, the powerful Konqueror. However, after an upgrade of the system, although I was using Konqueror, when clicking on a folder it was using Dolphin to open it... really bad.
Fortunately, it was (relatively) easy to revert to the old behavior, and in particular, to set Konqueror as the default application for folders!
You need to run KControl (kcontrol from the command line) and then choose "File Associations" under "KDE Components", then select "inode" and "directory". Here, you only need to move up Konqueror in the list "Application Preference Order". Hope this helps.
Pubblicato da betto a 4:33 PM 4 commenti
Etichette: kde
Saturday, December 29, 2007
Adding a menu to KMainWindow programmatically
First of all, let me stress that I'm not an experienced KDE programmer: my only KDE application, for now, is SourceHighlightIDE, a sort of IDE for developing GNU Source-highlight language definition files. While I was adding new features to this program, for the next release, I wanted to add the typical "Window" menu that permits tile all the windows in the workspace or cascade them, or selecting a specific window (SourceHighlightIDE is a MDI application). I then simply added this code to the KMainWindow subclass:
windowsMenu = new KPopupMenu( this );
connect( windowsMenu, SIGNAL( aboutToShow() ),
this, SLOT( windowsMenuAboutToShow() ) );
menuBar()->activateItemAt(-1); //needed as insertItem might crash if a menu is activated
// position: 2, means the third menu (the fourth one is Help)
menuBar()->insertItem( "&Window", windowsMenu, -1, 2);
However, the "Window" menu was never added to the application.
Actually, I know that one should add additional menus to the .rc file, e.g.,
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="sourcehighlightide" version="1">
<MenuBar>
<Menu name="custom"><text>C&ustom</text>
<Action name="custom_action" />
</Menu>
</MenuBar>
</kpartgui>
but I wanted a way to add the menu programmaticaly, so that I would not depend on the .rc file that must be installed.
Actually, the code added by me above works, but you must make sure to execute it after the call to setupGUI().
Hope this saves some headache to others wanting the same thing :-)
Pubblicato da betto a 8:03 PM 0 commenti
Etichette: kde
Monday, August 27, 2007
Amarok can't play mp3 files
My favorite linux player, Amarok, stopped working (playing mp3 files) after an upgrade! It kept on complaining that the xine engine was not able to play mp3 files. I had checked and all the right packages seemed to have been installed.
However, I found the solution here, you need to install libxine1-plugins package (together with its dependences) and everything comes back to life :-)
Pubblicato da betto a 12:16 PM 7 commenti
Eclipse Fonts in Linux (part 2)
In this previous post, I said I had found a way to adjust the eclipse fonts (that are gtk fonts) in KDE. That was a right solution, but unfortunately, it does no survive logouts from KDE. Each time you should re-run the gnome configuration program.
However, that's an even nicer solution: install the package gtk-qt-engine:
The GTK-Qt Theme Engine is a plugin for GTK that allows GTK applications to use Qt widget styles. Aimed primarily at KDE users, this plugin provides a way to unify the look and feel of the Linux desktop.
this will add the additional menu in the KDE Control Center - Appearance and Themes that will do the trick! Now Eclipse, Firefox and Thunderbird look very nice with the same KDE style.
Pubblicato da betto a 12:06 PM 7 commenti
Monday, March 05, 2007
Copy / Cut is very flakey in Eclipse 3.2 on Linux (interferences with Klipper)
I was experiencing this problem since I upgraded eclipse to 3.2 under Linux (both Debian and Gentoo): when I select test and copy it or cut it, most of the time not all the selected test is not copied (or cut). With cut you can see that since some part of the selected text is not cut, but with copy you realize it only when you paste and you don't see all the text. See also this bug report.
Similar problems happen when you select a file in the file view and copy it or cut it (in order to move it to a different location): often you get a message box saying that there were problems accessing the clipboard; alternatively, you can get a null pointer exception during pasting the file.
The message saying that there were problems accessing the clipboard made me think that the problem could have been in the KDE panel applet Klipper, the cut and paste history applet. So I tried to remove it from the panel and everything in eclipse worked fine again!
Saturday, February 24, 2007
KLcdDimmer 0.3
I've just released the new version of KLcdDimmer, a KDE applet to adjust LCD brightness (see also this post). The main novelty is the new graphical layout of the applet, which now fits better in the panel (takes less space, and works also both when the panel is vertical and horizontal).
Pubblicato da betto a 9:41 PM 0 commenti
Etichette: kde, klcddimmer
Saturday, January 06, 2007
Please, don't eject my music player!
Before you start reading, this is NOT a serious post. I've been using an Acer MP-320 as an mp3 player (kind of Ipod) for a few years now, and I've never experienced problems, not even with Linux, which sees this reader as an hard disk, so that I don't have to resort to strange (or even worse, proprietary) tools to access it and store files in it. I hadn't been using it for a while, and today I connected it to my linux laptop and KDE successfully recognized it, mounted it and opened a file manager window to access it. After I was done copying files to it, I right clicked on the desktop icon for my device and chose "safely remove". The device was unmounted, but the system notified me that it couldn't eject it... I would say "thank God you cannot eject it"... I was thinking of my laptop throwing the player out of the window... LOL ;-)
Pubblicato da betto a 6:26 PM 0 commenti
Friday, November 03, 2006
KLcdDimmer: A KDE Applet to adjust LCD brightness
KlcdDimmer is a small KDE panel applet to adjust the LCD brightness; I built it for my laptop, a Sony Vaio, because I still haven't succeeded in making the Fn keys work.
I also built it as an exercise in KDE programming. Actually KDE programming (and especially Qt Programming) is really cool and funny. The Qt libraries are really well done and their mechanism of signal and slots makes programming with events a pleasure (I cannot say the same about Java events, but that's another story ;-) I only wish there could be some more documentation about KDE applet programming...
Notice that this applet relies on an external program to get/set the brightness. For instance, I've used
SmartDimmer http://www.acc.umu.se/~erikw/program/
NVclock http://www.linuxhardware.org/nvclock/
but it is supposed to work also with others, since you can configure the applet.
The home page of this applet is http://klcddimmer.sourceforge.net. In case you use it, I hope you like it! KDE rocks!!! :-D
Pubblicato da betto a 7:42 PM 2 commenti
Etichette: kde, klcddimmer
Monday, October 02, 2006
Compiling KDevelop from sources
Kdevelop is an IDE for KDE for various programming languages. I use it primarily for C++. It's very pleasant to use and it's also integrated with QDesigner for visually build graphical user interfaces.
Since I like to use the new features, I don't rely on the pre-built packages: I compile it from the svn sources, and in particular I'm using the currently developed 3.4 release. However, I also keep a working copy of the currently stable version 3.3.4; for this reason I install the version taken from svn in a different directory.
At first I had some problems in this process, so I report here my experience in successfully build and install kdevelop in a different directory. In particular, the following instructions assume that you want to install the compiled version in $HOME/usr/local. In case you want to install it in a different directory, all you need to change is this value.
First of all, I followed the instructions found at the web site (for downloading the sources from svn).
Then I run configure as follows (for $KDEDIR/share/doc/kde/HTML/en/kdelibs-apidocs/, please see the
instructions in the above web page):
./configure LD_LIBRARY_PATH=$HOME/usr/local/lib:$LD_LIBRARY_PATH
LIBRARY_PATH=$HOME/usr/local/lib:$LIBRARY_PATH --prefix=$HOME/usr/local
--with-kdelibsdoxy-dir=$KDEDIR/share/doc/kde/HTML/en/kdelibs-apidocs/
--disable-ada --disable-bash --disable-fortran --disable-haskell
--disable-java --disable-pascal --disable-perl
Of course, you can choose all the --disable options you like.
Then you can run make to compile the sources, and finally make install to install the compiled version (of course if you're installing in a system directory, then you might need to have the required privileges).
When you want to run this version of kdevelop you must use some environment variables. Here's how I run it (of course you can put this command line in a shell script):
LD_LIBRARY_PATH=$HOME/usr/local/lib:$LD_LIBRARY_PATH
LIBRARY_PATH=$HOME/usr/local/lib:$LIBRARY_PATH
KDEDIRS=$HOME/usr/local:$KDEDIRS
$HOME/usr/local/bin/kdevelop
Now you should be able to enjoy all the nice features of kdevelop :-)
Pubblicato da betto a 7:28 PM 1 commenti