We recently added automagic recognition and start-up of several more window managers such as windowmaker and fvwm2 into Studio, but XFCE4 is still missing from the list. One reason for this is that it simply doesn't work out of the box without a few tweaks. This is easy to do in Studio and in this post I'll explain step-by-step how to build an openSUSE 11.3 appliance with XFCE4. If you are already familiar with building appliances in Studio, just skip to the summary section at the end for the list of steps.
So first, let's start with a minimal X appliance:
and choose 64bit.
In the software tab, search for 'in:patterns xfce' and select xfce pattern. This will pull in most of the dependencies, but we'll need some more packages for xfce4 to work. So in addition to that, add also the following packages:
The package selection then looks like this (click on 'packages selected' in the sidebar and hit enter):
Now let's build! We'll use the USB stick format so we can take advantage of the modified files feature.
After few minutes, the build is done, so let's launch it in Testdrive...
...and log in.
Uh oh, this doesn't look like XFCE! It's ICEWM, the window manager Studio uses as a fallback. The default window manager started on system boot is located in /etc/sysconfig/windowmanager. So let's open xterm, make yourself root with su - (default password is linux), and open the window manager file in your favorite editor:
Edit the DEFAULT_WM option to say startxfce4.
Write your changes and run sync to actually write them to the filesystem. And now comes one of the cool parts in Studio - whenever you change a file in Testdrive, Studio automatically detects these changes and displays a list of modified files which you can then easily re-integrate back into your appliance. Click the 'Modified files' tab (near the Testdrive on top of the page). Add /etc/sysconfig into included paths. You should now see the windowmanager. Mark it for addition and click 'Upload selected files into appliance' button. And that's it!
You can check it's been included in the appliance in the Files tab:
Now rebuild your appliance, re-start testdrive and log in. Well now, if you speak squareese, thats great, but for ordinary people, this is kinda not so good:
This is a known pango bug (which we hope they will fix soon) and can be remedied easily. We'll just need to regenerate pango's module list and we're going to fix this using Studio again. Let's open the Configuration tab and click on scripts:
Studio enables users to run bash scripts after build finishes, or optionally on every boot of the appliance. Since this one-time fix, we'll go for the former option and add pango-querymodules-64 > /etc/pango/pango64.modules to the build script. If you started with a 32-bit appliance, add pango-querymodules > /etc/pango/pango.modules instead.
We'll rebuild again and this time, voila, you should now have a working XFCE4! It wasn't that easy, but with Studio's help, you don't need to do all this tweaking on your local machine.
- Start with minimal X openSUSE 11.3 appliance.
- Search for 'in:patterns xfce' and add xfce pattern.
- Quick-add xfce4-settings, xfce4-desktop, xfwm4, thunar.
- Enable build script and add pango-querymodules-64 > /etc/pango64.modules to the end of the script, or pango-querymodules > /etc/pango/pango.modules for 32-bit appliances.
- Build and Testdrive.
- Edit /etc/sysconfig/windowmanager to set DEFAULT_WM to startxfce4. Optionally, you can add following line to your build script to obtain similar effect, without need to rebuild, so you can skip step 7: sed -i s/DEFAULT_WM=\"icewm\"/DEFAULT_WM=\"startxfce4\"/ /etc/sysconfig/windowmanager
- Upload modified file to appliance and rebuild.
This appliance is now shared on Gallery. In the next version, I'd like to setup Studio to include some more repositories and replace XDM in this appliance with Slim. Stay tuned! :)