In virtually every compiz tutorial you read on the net you will find the following advice on starting compiz when you log in:
Open System -> Preferences -> Sessions and add “compiz --replace” to the startup programs list.
That is wrong and it should be expunged from the internet IMHO. If you do that, your GDM will first start metacity, then start nautilus (desktop) and gnome-sesssion-manager, which in turn will start compiz. So you’re starting one window manager only to replace it with another shortly afterwards. You can see this clearly because it takes a while for compiz to start up and load your window decorator (like emerald) after replacing metacity.
The proper way to do this is to tell Gnome to use compiz as your default window manager and not use metacity at all. Simply put this in your ~/.gnomerc (create that file if it does not exist yet):
- export WINDOW_MANAGER=/usr/bin/compiz
Spread the word!
Comments
#1 Timo Hochberger
#2 yochai (http://www.techcollective.com)
thanks
#3 Sander Marechal (http://www.jejik.com)
#4 LeTic (http://www.letic.fr)
An echo $WINDOW_MANAGER after logging show me the correct value, so my question is do you have any idea how to troubleshoot the gnome session logging ? I couldn't find anything in Xorg, gdm, or user logs, don't know where I can find a starting point.
Thanks in advance for any clue.
LeTic
#5 Sander Marechal (http://www.jejik.com)
But you do need to start a window manager. I've tried putting e.g. compiz-manager as $WINDOW_MANAGER but that doesn't work. Perhaps in your case /usr/bin/compiz is just a wrapper around the real command that starts the compiz window manager?
#6 LeTic (http://www.letic.fr)
Didn't have the chance to go back to this with the silly season. I still can't understand this issue...
The content of .gnomerc is actually used as $WINDOW_MANAGER contains the good value, and when adding any commands inside the file, the results are displayed at the very beginning of the .xsession-errors file.
When I ran compiz manually, first thing during my session it starts with no problem.
I even installed snoopy to try to debug this and at no point it tried to run compiz.
There is no error message in the xsession-errors concerning this so I am a bit lost for words now...
The worst thing is, it is working perfectly fine on my work box.
I you have any more ideas...
Thanks for the help
LeTic
#7 LeTic (http://www.letic.fr)
I uninstalled metacity to test and compiz is started with my session. But it is crippled : the window decorator isn't started and trying to run it manually doesn't work. Changing the settings in CCSM doesn't have any impact.
During that session I tried running compiz manually again and then it works fine...
There seems to be 2 totally different behaviour to my compiz, I wonder if it isn't taking its configuration from different places. I'm gonna try deleting all compiz configuration and see if it works.
I'll keep you updated
LeTic
#8 Sander Marechal (http://www.jejik.com)
The only thing that I can think of is that you have a setting somewhere that prevents users from specifying their own window manager. Perhaps there is some global configuration setting that tells GDM to ignore $WINDOW_MANAGER from ~/.gnomerc. Try setting $WINDOW_MANAGER globally somewhere under /etc, for example in /etc/gdm/gdm.comf? Perhaps that will work.
#9 LeTic (http://www.letic.fr)
Here is the debugging I did after my last post. I hope this will help other people
- Put the .gnomerc in /root and test a gnome session from root -> it works
- Check with lsof which device/file were open when root was logged and check their permissions but my user already was in the video group
- Create a new dummy user, put him only in the video group and put the .gnomerc -> it works
- Follow the scripts from /etc/gdm/Xsession (first script executed in ~/.xsession-errors) with echo of relevant variables
- Check that there were no specific script in the home folders (.xsession, .profile etc)
- The above script exec several others that I followed as well (/etc/X11/Xsession.d/* and debug with echos to find any difference between my test user and mine
- When I was sure that all variable had the same value and that the scripts were running the same exectuable : /usr/bin/gnome-session (previously was x-session-manager) I started to look in the home folder
- I already tried to remove gconf folder as it the one holding the compiz config with no results, and check the x session script, so I tried to find a session file somewhere else.
- Found one in .gnome2/session
* the file contains 2 lines with metacity remove them -> end up with no window manager
* replace them with compiz works but the session crash at the end
* removing the file works !
So here it is. If compiz is not working when you have the .gnomerc file containing the correct export WINDOW_MANAGER line then you must have the same issue as I encountered. I have been upgrading my SID for years copying the home partitions when I was changing PC. So my home went through lots of different gnome version and end up with a broken .gnome2/session file. Just remove it and it will solve your issue :o)
I hope it can help user troubleshooting there gnome session if they have similar issue.
Hope you don't mind posting this here.
Thanks for the help mate
LeTic
#10 Sander Marechal (http://www.jejik.com)
#11 Oriol (http://www.eldiade.com)
#12 Anonymous Coward
This is a great tip. I was wondering if the same goes for XFCE. I am using XUbuntu and I want to know whether creating the ~/.gnomerc file would work under XFCE or do I need a different file.
Thanks.
#13 Sander Marechal (http://www.jejik.com)
#14 Anonymous Coward
Thanks again for the tip.
#15 Charlie
#16 Sander Marechal (http://www.jejik.com)
#17 svyatoslav
I start compiz by using fusion fusion-icon
#18 Sander Marechal (http://www.jejik.com)
#19 klarsen
#20 mr.Anonymous
- export $WINDOW_MANAGER in ~/.xprofile... just only setting $WINDOW_MANAGER variable %)
solution: set gconf key /desktop/gnome/session/required_components/windowmanager = compiz.
http://en.gentoo-wiki.com/wiki/Compiz-Fusion#Gnome
#21 Photon
1. Enable antialiasing in the nVidia settings
2. Create following startup script (let's call it compiz-start):
$ gedit /usr/bin/compiz-start
which contains following (you may experiment with the compiz start options, just read the above wiki.archlinux.org link):
------------------------------------
#!/bin/bash
nvidia-settings --load-config-only && compiz --replace --sm-disable --ignore-desktop-hints ccp
------------------------------------
4. Edit /usr/share/applications/compiz.desktop and choose the script as exec-file (replace the line "Exec=compiz ccp" with "Exec=compiz-start"
#22 Igor
It really works!
#23 PC2st (http://pc2st.wordpress.com/)
I never could run 'compiz --replace' successfully neither 'fusion-icon -f'...
But your way is really work :D That's greet.
Thank you for the properly solution.
#24 jcp
cd /usr/bin
ln ./compiz ./compiz.real -s
not elegant but works for me
#25 Marius Andersen
/usr/bin/gnome-wm
script which does the actual work of reading theWINDOW_MANAGER
variable. Instead, change the appropriategconf
value:This changes the window manager GNOME will use from "
gnome-wm
" to "compiz
". In addition, one should make a/usr/share/applications/compiz.desktop
file specifying the parameters GNOME should use for starting Compiz. It may look as follows:If you are installing Compiz on Debian, then
aptitude
will create this file automatically. Just open it and make sure theExec
line includesccp
, otherwise the previous settings aren't loaded.Finally, start the CompizConfig Settings Manager and ensure that the Window Decorator plugin is enabled.
Source: http://wiki.archlinux.org/index.php/Compiz
#26 trusktr
In Gnome, open up Configuration Editor (command: gconf) and set the key /desktop/gnome/session/required_components/windowmanager to "compiz".
And follow the exact instructions as described in the Arch Wiki.
Wait, the previous guy just mentioned this is a different way. hehe. Consider this confirmation. ;)
#27 Dario
I have also tried to leave that key to the "gnome-wm" value and to set the environment variable WINDOW_MANAGER to "/usr/bin/compiz", in this way compiz starts but windows borders and the most of the effects are are missing. The "decoration" plugin seems enabled in Compiz Config. Does someone know how to fix?
#28 Anonymoose
#29 Baobab
edit the following file :
remove "notifications" at the end of line 4, said differently replace following line :
by this one :
retart the session, or reboot and it is done !
Note : check in the general parameters of Compiz :
- compatibility with Gnome
- Composite
- OpenGL
are all ticked !
#30 rocketman221
I have tried editing the "gnome-fallback.session" file which never worked.
Comments have been retired for this article.