Bugzilla – Bug 332079
Proper configuration for selecting WMs
Last modified: 2008-04-10 11:47:32 UTC
If I start compiz by the .kde/Autostart procedure without adding some "sleep"-seconds before actually starting compiz most of the usual tray icons do not make their way to the KDE system tray. Adding a "sleep 10s" in front of the compiz command somehov resolves the problem.
We don't support the Autostart hack for starting Compiz. If you want Compiz, select it in the session manager control module.
I suppose you mean the kcontrol plugin of KDE. The problem is: compiz does not appear there. Only a strange behaviour: First start shows a disabled dropdown with title kwin. Clicking on the button for the default settings enables the dropdown now showing two entries named "kwin". After that each click on "reset" and "defaults" appends another entry called "kwin". But no compiz at all. Is there anything I can do about that?
Dirk: Is the kcontrol module supposed to work only with XGL?
Hi, I can't use XGL (I use RADEON open drivers), I would like this option for AIGLX. Rgds.
I guess the autodetection for aiglx is not working correctly.
We've just released compiz 0.6.2 and compiz fusion 0.6.0 try these packages out. The packages contain new autostart script so autostart hacks are not required anymore. It will detect if your hardware/drivers/Xgl/AIGLX is setup correctly to launch compiz if not it will fall back to kwin. Click here to start installation: http://download.opensuse.org/repositories/X11:/XGL/openSUSE_10.3/compiz-fusion-kde.ymp You might want to check this before installing: http://en.opensuse.org/Compiz_Fusion
OK, autostart works now, but nevertheless there is no such option in KControl to choose between compiz and kwin.
Hi, I would prefer to have in '$HOME/.kde/share/config/ksmserverrc' : [General] confirmLogout=true defaultWM=compiz-manager this way 'compiz-manager' start almost before everything, but now with this new version 'compiz-manager' start 2 times (so 'compiz'), one with ksmserverrc and then automatically (I haven't found where is this instruccion). How can I disable the second time? Thanks!
If you got stuff in '$HOME/.kde/share/config/ksmserverrc' remove /opt/kde3/share/autostart/Compiz.desktop. Shall we close this bug as fixed?
The real problem is: How can we find a solution which allows the user on the GUI level to choose between compiz and kwin? KControl offers a menu for that but compiz does not make use of that. So in my eyes your effort is quite valuable but does not hit the original problem of this thread.
When a user takes all the trouble installing binary drivers, modify xorg.conf or activates Xgl using gnome-xgl-switch we assume that they want compiz running, that is why one more layer "GUI activation switch" for compiz is removed and automated instead. However disabling autolaunch is quite simple too: touch $HOME/.config/compiz/disable-compiz (to disable Compiz at startup) rm $HOME/.config/compiz/disable-compiz (to enable Compiz to autostart on login) As we do not know yet which way we would be going for in openSUSE 11, compiz-manager seems like a best option at this moment or till something better is implemented. Check out fusion-icon that is in the traybar which allows you to switch between compiz and kwin while logged in.
Maybe you are right at the moment. But I think our goal must be to make things as easy as possible. Maybe there will be a time when activating Composite and thus compiz is not that complicated. So why not use the present tools to be prepared? Fusion-icon is a nice piece of code, but yet *another* little tool. And as Xavier mentioned in comment #8 starting compiz using the KDE way (ksmserverrc) avoids the problems of the tray icons mentioned in the first posting since compiz is started very early.
Compiz is activated by default, nothing extra needs to be done, to deactivate is simple "touch". I am not a kde user so do not understand a need for '$HOME/.kde/share/config/ksmserverrc'. I would advise remove it from there and let compiz-manager do the job. The whole idea of adding compiz-manager was to remove any custom launch hacks that were required in kde/gnome :) We are just testing compiz-manger/fusion-icon if they do not work well, there is a plenty of time before 11 for someone to come up with desktop independent way of doing things.
The thing with ksmserverrc is the following: If we start compiz(-manager) there it gets loaded very early in the startup process. As a result all programs started afterwards find a compiz environment and can safely integrate with that. If we start compiz later by autostart or by hand there are some programs started before and some after and maybe even some programs started in parallel. As a result some tray icons fail to integrate in the systray and swim around either as loose windows with just the icon or do not appear at all.
It should not matter if compiz is started even last, the icons floating and not appearing sounds like some KDE bug. Starting compiz too early may have this side effect mentioned in comment #1 : "Adding a "sleep 10s" in front of the compiz command somehov resolves the problem." Please give compiz-manger a try without ksmserverrc and see if icon problem still persist.
The problem persists also with compiz-manager although not reproducible since it seems to depend on harddisk performance etc. Two possibilities to avoid the problem: 1.) start compiz earlier which is not possible using autostart 2.) wait until everything got initialized and start compiz afterwards Starting compiz from */autostart/ I had only one choice which was to delay compiz start.
Ok, so I prefer starting it early and as ksmserverrc is better suited to do that we will use that, can someone give me a command to add compiz-manager there automatically for all users? currently this is how it gets done(ugly i know): ln -sf %{_datadir}/compiz-manager/Compiz.desktop %{_datadir}/gnome/autostart/ ln -sf %{_datadir}/compiz-manager/Compiz.desktop /opt/kde3/share/autostart/
I do not know if there is a global way to do that. But have a look at the kdebase3-patch from http://lists.opensuse.org/opensuse-commit/2006-10/msg01335.html. This is supposed to deal with that. Let the KDE experts guess what's going wrong here. :) Although I think hard-coding compiz into ksmserver there is not the way to fix the problem maybe we can replace compiz by compiz-manager there for testing purpose.
I can confirm that our patch has at least two problems: It doesn't detect some setups capable of running Compiz (e.g. on my machine) and it completely ignores $KDEWM (which means there's no workaround for now). I'll try to have a look at those. For 11.0 I suggest the following: All the compiz-specific stuff is dumped, only code for selecting _a_ window manager is kept and changed to fall back to kwin if the configured one fails. The list of usable window managers is provided as a list of .desktop files listing the command to run it (so that compiz can use whatever wrapper script it wants). Also a command to detect whether the window manager can be run at all can be provided, in order to disable such window managers in the kcontrol module (well, I'm not really sure this is that good idea, especially given that the only real check is trying to actually run it, but Dirk seems to want this). From the compiz side, the wrapper script should not run any fallback but simply fail if it can't run compiz.
That program sounds good for me. Thank you, Lubos! :) Maybe we can split the directory for the wm-desktop-files you mentioned such that we have a separate subdirectory for those which require for example the Composite extension...
For me the best way is starting 'compiz(-manager)' early before everything. Remember that if you gonna start 'compiz(-manger)' after everthing (autostart way) you will need to kill kwin and this proccess would take you into visual problems, in my case, if I kill kwin for use compiz the desktop pager applet of kicker duplicate the number of desktops, also get deformed, plus other visual problems, also the comsume proccesor. I use 'compiz-manager' script in ksmserverrc and everything is fine, fusion-icon is started too, kwin don't need to be started so there is no visual problems. Emerald is started by fusion-icon or by decoration plugin command (as fusion-icon is started automatically by compiz-manager I have disabled the command in decoration plugin). I also have disabled the Autostart way so compiz-manager don't start two times. If you gonna use compiz, why start kwin before? I think people of compiz is more focus in gnome than in kde, being kde more powerfull and beautiful. BTW ... thank you guys for your time and effort, I really apreciate it, compiz-manager is usefull. rgds.
Glad that it works well for you. BTW, it is the other way around, more gnome devs help out and got involved in compiz development while all the kde devs are busy hacking on kde4 ;) I haven't got any information about adding it to all user's ksmserverrc yet, hopefully that will get resolved soon.
Summarizing what Lubos said the solution to the bug would be: Allow custom wm selection in kcontrol. What can we do to improve it in 10.3? If there is any format of .desktop file, do let me know and i can provide one for compiz. We can leave everything as it is in kcontrol just allow custom command string as defaultWM, would work too. We can make the launch script exit 1 if it fails to launch anything so kde can continue with whatever next it needs to do. Today we have compiz-manager tomorrow it could be something else, till someone comes up with a perfect way of doing it :) Sound good?
Created attachment 182447 [details] new optional-kwin.diff for kdebase3 This new version of optional-kwin.diff should make $KDEWM work again (removed code from ksmserver that allowed only running either kwin or compiz as a WM) and also should allow selecting Compiz in KControl on more systems capable of running it (removed from kcmsmserver the glXGetConfig() check for GLX_BIND_TO_TEXTURE_RGB_EXT (0x20D0) that doesn't work here, QGL is not guaranteed to select the same visual like Compiz and the check is not present in the same function in ksmserver). This patch should be for 10.3, this bugreport should be kept open for handling the remaining things as outlined in comment #19.
Added patch of #24 to Fix_is_Ready/10.3/
Created attachment 186017 [details] new optional-kwin.diff for kdebase3 Grr. I broke restoring kwin's session data in the previous patch. This one is the latest fixed version for 10.3.
I added the new version of comment 26 to Fix_is_Ready/10.3/kdebase3.
where can I get the fix by rpm? thanks.
It will be released as online update. Lubos, I guess you will adapt the patch for kdebase3/Factory. :-)
(In reply to comment #21 from Xavier Callejas) > For me the best way is starting 'compiz(-manager)' early before everything. > > Remember that if you gonna start 'compiz(-manger)' after everthing (autostart > way) you will need to kill kwin and this proccess would take you into visual > problems, in my case, if I kill kwin for use compiz the desktop pager applet of > kicker duplicate the number of desktops, also get deformed, plus other visual > problems, also the comsume proccesor. > > I use 'compiz-manager' script in ksmserverrc and everything is fine, > fusion-icon is started too, kwin don't need to be started so there is no visual > problems. Emerald is started by fusion-icon or by decoration plugin command (as > fusion-icon is started automatically by compiz-manager I have disabled the > command in decoration plugin). > > I also have disabled the Autostart way so compiz-manager don't start two times. > i know a globally way of starting compiz very early: http://de.opensuse.org/Compiz_Fusion#Aktivieren.2FDeaktivieren_des_automatischen_Starts_von_Compiz_unabh.C3.A4ngig_vom_verwendeten_Desktop-Manager_.28KDE_oder_Gnome.29
Released.
Hi, I have the last kdebase3 version from: http://download.opensuse.org/repositories/KDE:/KDE3/openSUSE_10.3/ version: kdebase3-3.5.8-21.3 does it has the same fix/patch? I cannot select compiz in kcontrol yet, the combobox (in kcontrol->session) is steel disabled. I have also updated kdebase3 (days after I update from KDE: repo) using updater applet (the version keeps saying 3.5.8-21.3, I thought it would downgrade), and the same, the combobox keeps disabled. I have enabled in my xorg.conf: - aiglx - composite extension dri is also enabled. thanks & rgds. xavier.
Much improved compiz-manager script has been checked in Factory. Here are the important features: * Does not autostart, user have to set up autostart, it would be great if it is available in kcontrol module. * /usr/share/compiz-manager/Compiz.desktop is provided that can be added to autostart session if desired. * It starts compiz with most appropriate options and environment variables. * Does various detections such as hardware, drivers used, Xgl/aiglx, xorg extensions etc. * If compiz fails to start for some reason, it safely falls back to kwin or metacity depending on the desktop environment running. * Every aspect of compiz-manager behavior can be customized via configuration file in xdg path such as /etc/xdg/compiz/compiz-manager or $HOME/.config/compiz/compiz-manager.
Keeping open as 'finish the kcm support for switching WMs'.
JFYI compiz --replace ccp (to be able to use ccsm - settings manager) compiz --replace core glib gconf (to use gconf-editor as settings tool) works now without any additional environment variables or options passed for all rendering platform used (xgl/nvidia/aiglx)
This is done now, in the session manager module one can select from several WMs.