Re: (Possible) menu code rewrite
Forgive me if I'm saying something that has already been said here -
I've only just joined this list.
Erich Schubert wrote:
There's some additional stuff possible here:
We do have menu entries that need root access (like gkdebconf).
These entries should be displayed if the user is root (will root ever
use menu's?) but also if the user "knows a way to become root" - this
could be any of "sudo" "super" "su" "gnome-sudo"...
which probably should be configureable.
It appears to me that there are two separate issues here - one is
allowing the menu to specify a user as which the command should be run,
and the other is determining whether a user is capable of running the
command as that user and adjusting the menu appropriately. As it is not
really possible to detemine whether a user happens to know the root
password, I'd say that running the programme through some su equivalent
should be a fallback for all users unless explicitly disabled in a
configuration file. Basically, I'd use the following logic:
1. Does the config file explicitly prevent this user from changing to
the required uid?
if no: don't display menu item and don't worry any more.
if yes: go on to (2)
2. Is a suitable sudo-equivalent installed, and is the user allowed to
use it to change to the required uid?
if no: go to (3)
if yes: display a menu item which runs the programme through the
3. Is a suitable su-equivalent installed?
if no: don't display a menu item.
if yes: display a menu item to run the programme through the su-equivalent.
I use su-equivalent and sudo-equivalent because su and sudo, being
command-line programmes aren't really suitable for running a graphical
application from the gnome/kde menu - the best you'd do would be for an
ugly terminal window to pop up and ask for a password.
Of the above, 2 is probably the only difficult bit. Ideally having some
sort of graphical su/sudo combination would be useful which could be run
in both the yes and no case and would prompt for the appropriate
password having looked at /etc/sudoers, although I have no idea whether
such a thing exists.
For the already suggested "user-level" setting, "novice" etc.:
Nautilus 1 had such a thing in the menus, and it was removed for naut2
At least the Gnome Interface Team do NOT like that i fear...
Their usual argument is that the menu, settings etc. should be kept that
simple that anyone understands them, whereas experienced users should
use for example gconf-editor to tweak their settings.
I'm not sure if i do agree with that, and if it does apply here.
But instead of leaving some entries out of the menu completely, i'd
prefer just having submenus for the extended programs.
So that even a user preferrring the simpler menus does find all apps in
I personally think that predefined categories is a bad idea as it makes
assumptions about what novice users can do / want to do, and also
assumes that they all want to do the same things. I'd agree with the
Gnome Interface Team on this one.
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com