HOWTO: Integrate Compiz Fusion with Xfce the right way
In past, I had always struggled to find the “correct” way of launching Compiz Fusion while starting Xfce. For a while, I had resorted to the easiest — and not perhaps the prettiest — way of launching Fusion Icon with the desktop autostart files. The problem with this method lied in the fact that Xfwm was launched before Fusion, and the most glaring workaround was to write my own xinitrc
files for X startup, which was just uglier anyway.
Xfce’s own documentation is as bare as my memory while running it, so the right way was not actually obvious until I was fiddling around my configuration directory a few days ago. There, I found an interesting file named xfce4-session.xml
. To truly exploit this lovely thing, I first copied it into my home configuration directory:
[krkhan@orthanc ~]$ cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml |
And then edited the file with a text-editor, making it look something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <?xml version="1.0" encoding="UTF-8"?> <channel name="xfce4-session" version="1.0"> <property name="general" type="empty"> <property name="FailsafeSessionName" type="string" value="Failsafe"/> <property name="SessionName" type="string" value="Default"/> <property name="SaveOnExit" type="bool" value="false"/> </property> <property name="sessions" type="empty"> <property name="Failsafe" type="empty"> <property name="IsFailsafe" type="bool" value="true"/> <property name="Count" type="int" value="5"/> <property name="Client0_Command" type="array"> <value type="string" value="fusion-icon"/> <value type="string" value="--force-compiz"/> </property> <property name="Client0_PerScreen" type="bool" value="false"/> <property name="Client1_Command" type="array"> <value type="string" value="xfce4-panel"/> </property> <property name="Client1_PerScreen" type="bool" value="false"/> <property name="Client2_Command" type="array"> <value type="string" value="Thunar"/> <value type="string" value="--daemon"/> </property> <property name="Client2_PerScreen" type="bool" value="false"/> <property name="Client3_Command" type="array"> <value type="string" value="xfdesktop"/> </property> <property name="Client3_PerScreen" type="bool" value="false"/> <property name="Client4_Command" type="array"> <value type="string" value="xfce4-settings-helper"/> </property> <property name="Client4_PerScreen" type="bool" value="false"/> </property> </property> <property name="splash" type="empty"> <property name="Engine" type="string" value=""/> </property> </channel> |
Lines 13-15
initially referred to Xfwm’s commands, but replacing them with the Fusion Icon ones worked like a charm. This way, Fusion is always guaranteed a launch, which actually wasn’t the case with other workarounds.