xfce Package Manager

Anders F Björklund afb at algonet.se
Sat Oct 18 10:15:48 CEST 2014


Tim Tassonis wrote:

> Hi everybody

Hello there!

> I'm currently writing a package manager (like rpm or deb) and would also
> like to have a GUI for it. As I'm not the most proficient gui
> programmer, I wanted to ask if somebody has already started something
> like this, so I could adapt it to my needs, or knows of an existing one
> where I could "get some ideas" from (e.g rip out the actual package
> managing library calls and replace them with mine)?
> 
> The requirements would be:
> 
> - GTK2/3, no Gnome stuff
> - C Application no python interpreter stuff

I'm not sure what the world needs most is yet another package manager,
but if you want some ideas you can take a look at the Smart project ?
It is currently written in Python, though, so it might not fit your
requirements. But it presents a GTK+ interface, on top of rpm and deb.

http://github.com/smartpm/smart

There's also a panel plugin, for displaying update status in the panel.
So that you know when there are updates available. It's over on Goodies.

http://goodies.xfce.org/projects/panel-plugins/xfce4-smartpm-plugin


Otherwise gslapt for slapt-get seems to be most like to what you want,
it's an interface written in GTK for a package manager written in C...

http://software.jaos.org/

Or perhaps even look at the oldest of them all, the venerable Synaptic.
But it is written in C++, not C, so doesn't fit language requirements.

http://www.nongnu.org/synaptic/


> The GUI would really not have to do any lowlevel stuff, this is all
> written in a library, but display contents, list packages and start
> actions (install/remove) and display the progress in a terminal window.

The biggest issue here is that the GUI won't have any extra privileges.
And normally you can't install/remove anything, without authentication ?
This is why a lot of the existing applications use a client/server setup
or something like DBUS to send messages from a frontend to a backend...

In the old days you would run the entire application with setuid/gksudo,
but that is not allowed anymore (being a security risk, running as root)
If you don't want to write such a setup, you might look into writing a
new PackageKit GTK GUI and providing a backend for your package manager.

http://www.freedesktop.org/software/PackageKit

The daemon is written in C (with glib/dbus), so would fit your language.
But the official graphic interfaces are very much GNOME and KDE only...
(I do believe there used to be at least some code examples using GTK+
but the shiny new 3.14 version is all GNOME 3 and systemd and similar)

http://en.wikipedia.org/wiki/GNOME_Software


BTW:
Most users don't like it when you throw a terminal window in their faces
instead of a nice progress bar but even Ubuntu does it so it must be OK.

The Fedora Xfce spin uses Yum Extender in PyGTK for a graphic interface.

--anders



More information about the Xfce4-dev mailing list