Make Cardapio independent of the Desktop Environment

Bug #774865 reported by Thiago Teixeira
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cardapio
In Progress
Undecided
Unassigned

Bug Description

Right now, Cardapio is very much Gnome-oriented — which makes sense when you consider that the project started as a replacement for the Gnome panel. However, I think it is about time we start making Cardapio independent of the choice of Desktop Environment. I am especially interested in XFCE and LXDE compatibility.

So after a quick look at Cardapio's code, it turns out that most of the work is already done, and I can simply remove all the Gnome-related dependencies from the Debian control files to reflect that. Horray!

But a few quirks remain:

    ~

1) Control Center.
Right now if you don't have Gnome Control Center installed (or, more specifically, the "gnomecc.menu" file), Cardapio degrades to using the "settings.menu" (which is the de-facto standard filename for the settings menu) as it used to do many moons ago. But this is sub-optimal, since it removes that nice "Control Center" button from the bottom of the window.

So the question here is: do other DEs have an alternative to "gnomecc.menu"? If so, where is it located?

    ~

2) Launch in Terminal.
Cardapio currently uses Gnome's nice execute_terminal_shell function to launch scripts within the user's default terminal.

Is there a cross-desktop way of doing this?

    ~

3) Default tools of the DE.
Some of Cardapio's features require knowledge of which application is used to show the "About" dialog for the DE, the "logout" dialog, etc. So these need to somehow be made cross-desktop compatible. Here is a full list of the tools that are currently used in Cardapio:

notation:
[task] "example command line for Gnome / Ubuntu"

[opening the About DE dialog] "gnome-about"
[opening the About Distro dialog] "yelp ghelp:about-ubuntu"
[locking the screen] "gnome-screensaver-command --lock"
[showing the log out dialog] "gnome-session-save --logout-dialog"
[showing the shutdown dialog] "gnome-session-save --shutdown-dialog"
[editing menus] "alacarte"
[opening the GUI that lets you connect to a server] "nautilus-connect-server"

So my question is: what are the equivalent commands for performing the tasks above in other DEs / distros?

Also, what are the commands to directly shut down, restart, suspend, hibernate, log out, and switch users? (I don't know these commands in Gnome either)

    ~

4) Panel applet.

Can you post a link to a tutorial explaining how to create panel applets for your favorite DE?

Or, even better, can you volunteer to help us with the code? :)

FYI, Cardapio's applet API is quite simple: http://bazaar.launchpad.net/~tvst-hotmail/cardapio/cardapio/view/head:/cardapio/src/CardapioAppletInterface.py. To create a Cardapio applet for a given panel or dock, all you need to do is implement that interface, which is rather small :)

    ~

And that's all I can think of right now. Please post below if you know any of these answers. I will do the same if I end up discovering them on my own.

Thiago Teixeira (tvst)
description: updated
Thiago Teixeira (tvst)
description: updated
Thiago Teixeira (tvst)
Changed in cardapio:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.