Ubuntu integration
Note: An updated version of these instructions can be found on the Ubuntu page.
Can we get rid of ROX-Session? It should be possible to integrate ROX with your existing session manager. In this experiment, I configure a fresh Ubuntu installation to run ROX, without using ROX-Session.
I've just upgraded my laptop from Debian/testing to Ubuntu/Feisty (beta). The machine has been running Debian since I got it almost five years ago, and has gradually diverged from the default settings as I tried new things! (e.g. it was running initng rather than sysvinit)
It was time to try something new, so I made a backup to an external drive, reformatted the hard disk and installed Ubuntu/Feisty (beta) from the ISO image.
The new Ubuntu is looking really nice. A lot of effort has obviously gone into it. Here are some features that work without any setup:
- The extra keys work (press the "volume up" button and a little volume bar appears on the screen and increments, press the "power" button and a log-out dialog appears).
- Inserting a DVD plays it (well, non-region-coded ones anyway).
- You are notified when system updates are available.
- A power indicator shows AC or battery, and warns you when the battery is nearly discharged.
- A network indicator shows the current connection status and allows switching between interfaces (e.g. wired or wireless).
Initially, I set up a normal full ROX desktop using ROX-Session. But by default you lose all of the above. Yes, you can reproduce these features in ROX with a bit of effort, but perhaps there's a better way?
Hypothesis: we can get rid of ROX-Session and instead reconfigure the distribution's native session manager to do the work.
In a normal ROX setup, ROX-Session has to integrate with the various distribution display managers (gdm, kdm, etc) and all the ROX applications just have to integrate with ROX-Session.
In the proposed system, integration with the display manager is handled for us, but the ROX applications have to integrate with the various session managers (gnome-session, etc).
In practice, this isn't too difficult, because most of the ROX applications are designed to be useable on their own anyway, and those that aren't (e.g. the config applets) mostly just duplicate the distributions' own configuration applets, which we can now use. Also, we already support two flavours of ROX-Session (my Python version and Tony's continuation of the old C version for slower machines).
To test this, I tried setting up Ubuntu/Feisty to run ROX. Here are the steps:
- Get Zero Install if you want it (otherwise, install required programs manually):
$ sudo apt-get install zeroinstall-injector
Get ROX-Filer and OroboROX:
$ 0alias rox http://rox.sourceforge.net/2005/interfaces/ROX-Filer $ 0alias OroboROX http://rox.sourceforge.net/2005/interfaces/OroboROX
- Using the gnome-panel menu at the top of the screen, run System/Preferences/Sessions.
- The first tab, Startup Programs allows you to start non-session-aware programs at login. I just disabled "Evolution Alarm Notifier" here and "Restricted Drivers Manager" (mostly because I don't know what it does ;-). I added two entries:
ROX-Filer with the command ~/bin/rox (created by 0alias above)
OroboROX with the command ~/bin/OroboROX - The Current Session tab lists the session-aware programs that are currently running. The idea here is to run the programs you want by the normal means, and then save the current state. You have to be a bit careful, because it's easy to accidentally add web browsers, help viewers, etc to the default set!
(ROX-Filer is session-aware, but it would always restart the same version, without ever upgrading, so I added the 0launch command to the previous tab instead)
- The default window manager, Metacity, isn't much good for ROX, due to its raising behaviour. There are lots of window managers that work better; personally I tend to use either xfwm4 or OroboROX.
If you want to use xfwm4, then install it now like this:
$ sudo apt-get install xfwm4 xfce4-mcs-manager
- You can't run two window managers at the same time, so we'll need to kill metacity. To do that, we need to stop gnome-session from restarting it: select metacity and change the "Style" from "Restart" to "Deleted Items" and click on "Apply".
-
Now kill metacity and run your preferred window manager. You probably want to do this with a single command, since the desktop is hard to use in the period between stopping one window manager and starting another!
$ killall metacity; sleep 2; xfwm4 &
or
$ killall metacity; sleep 2; OroboROX &
- You should now have your new window manager running. XFWM4 will appear in the Current Session tab, and you can set the style to "Restart".
- Now we'll replace Nautilus and the lower gnome-panel with ROX-Filer's pinboard and panel. Set the style for "nautilus" to "Deleted Items" and "killall nautilus".
- If you don't want any GNOME panels, repeat the previous step for "gnome-panel". If you prefer to keep the top panel (users new to ROX will probably want keep it because it gives access to the familiar features) then just right-click on the bottom panel and choose "Delete this panel".
-
Run ROX-Filer in "session mode" this sets up the pinboard and panel:
$ rox -S
- ROX-Filer will now appear in the Current Session list. You should remove it from the current session, though, because we already added it manually above.
- Go to the Session Options tab and "Save the current session".
- Log out and log back in again.
You should now have a normal-looking ROX desktop, possibly including Ubuntu's top menu bar, if you opted to keep that. You should find that the volume buttons still work, etc:
You can now do any final configuration you want:
- If you didn't keep the top menu bar, you'll probably want to add SystemTrayN to the ROX panel so you can see the system tray icons.
-
To configure xfwm4, run:
$ xfce-setting-show
You'll probably want to go to the Focus tab and set "Raise window when clicking inside" to "off".
- To disable the GNOME splash screen, run:
$ gconf-editor
Turn off /apps/gnome-session/options/show_splash_screen.
Then, just grab ROX-All or AddApp and start adding programs...
Questions
Can we simplify / automate the above steps?
Can we do this for other session managers? E.g. people on slower machines will probably want to reconfigure an Xfce desktop rather than a GNOME one. I haven't tried this.
There are probably some more issues to work out. E.g. applets quitting before the filer will probably be removed from the panel.
- Thomas Leonard's blog
- Login to post comments
xchat icon
Where did you get that X-Chat icon in the first screenshot? I'm positive I made that icon almost 10 years ago! Talk about a surprise! I never saw anyone actually use it.
xchat
I probably got it from my old Debian system.
xchat icon
I've got it as well, in the wrapper I have for xchat. The wrapper came from George J. De Bruin, available as part of RoxWrap
I have it on my debian
I have it on my debian system on my server. Got it about 2 years ago.
Defaults
We also need to find a way to use ROX-Defaults from gnome-session. In the above setup there are no defaults defined, so clicking on a text file asks you to choose a text editor the first time, etc.
Re: Defaults
It turns out that this isn't all that hard after all, at least not if you're using XDM or GDM.
I've written about how to integrate with Xfce and the .xprofile/.xsession stuff should work just as well with GNOME.
The current shortcomings of the roxdefaults shell script shouldn't be hard to overcome in a python script.
Defaults for gnome-session
I've now added this functionality to the ROX-Defaults package itself in ROX-Defaults 0.2
XDG-Menu
I installed Ubuntu recently, and I've become quite fond of XDG-Menu. It's a menu applet that displays all software that has been installed through the package manger (since it uses the freedesktop.org XDG menu standard). You can also drag and drop any item in the menu to a directory to make a launcher.
Logout button
I wondered how I could logout from gnome-session without any panel with an special button on it. After a while of searching I found the solution: "gnome-session-save --kill" brings up the gnome-session logout dialog, which is definitely nicer than the one from rox-session, even more when running Ubuntu. So I was able to make an logout button with menu, providing the options to save or logout from the session or open the gnome-session-properties dialog.
re: Logout button
Ah, that's useful. I was using the power button on my laptop to get that dialog, but I'd been looking for a way to get an icon on the panel too. All I'd found was a way to do it with D-BUS, e.g.:
Metacity
What is it you don't like about Metacity's raising behaviour? Do you mean the way it raises a window when you click anywhere inside it? You can change it with the gconf key /apps/metacity/general/raise_on_click. There are several other "hidden" settings like that. Alas nothing to enable geometry captions or maximise in one direction at a time though AFAICT. But I've decided to use Metacity instead of OroboROX from now on due to some long-standing bugs in the latter.
Thanks!
Thanks!
I was sure I had seen it somewhere. Your comment was really helpful.
Restricted Drivers Manager
If I disable the Restricted Drivers Manager in Startup Programs the Gnome logout button and the laptop's power button stop working. OTOH if I try to run the RDM manually from the menu it just complains that I haven't got the linux-restricted-modules package for my kernel installed. I think it's just some way of managing 3rd party binary modules, and my laptop doesn't need any. Perhaps some laptops need them to do certain types of suspend or respond to custom buttons etc, hence the interaction with the Logout button.
Restricted Drivers Manager
That's odd. I have it disabled too and it's working for me.
In fact, I had to uninstall a whole load of restricted debs in order to get the nvidia driver to install (the open source one flickers horribly along the left side of the screen and the Ubuntu restricted one locks the machine after a few minutes of use).
OroboROX keybindings
Is it possible that without ROX-Session, OroboROX will have trouble with its settings? I am unable to choose the number of workspaces and to apply my keybindings with OroboROX's options.