GnomePanelEnhancementsIdeas

Differences between revisions 6 and 7
Revision 6 as of 2005-07-09 05:47:42
Size: 1855
Editor: S01060040f4442ef1
Comment: idea feedback
Revision 7 as of 2005-07-26 10:42:47
Size: 2970
Editor: dan75-4-82-239-58-38
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:

=== Quick solution for Breezy ===

I have already coded a quick and easy solution for Ubuntu : since all the sudoers are in the "admin" group, the program only needs to check whether the user belongs to this group. However, this will only work with Ubuntu (but is retro-compatible for breezy, hoary, warty, and previous versions).

=== More general, but harder, solution ===

The process needs to be setuid root. It could simply lookup the /etc/sudoers file, but its syntax can be very complex, and I would probably need to import a large part of the code from "sudo", which is also very long and complex.

Another solution, which I find much more elegant, is to contact the people who worl on sudo, and to help them (if they agree) add an option for sudo, for example "t" for "test" :

sudo -t synaptic

This line would tell the user whether he is allowed to run the command or not, '''without''' requiring him to enter his password. That way, each menu entry that has a "RootRequired=yes" field would run the sudo -t command, and hide the item if the user doesn't have the necessary authorization.

This is the "ideas" web page for the "Gnome Panel Enhancements" project. This project has been accepted as part of Google's [http://code.google.com/summerofcode.html Summer of Code] program ; the student is ManuCornet.

This project was at first a bounty, described [http://udu.wiki.ubuntu.com/GnomePanelEnhancements here].

Desktop entries and sudo

Purpose

The idea here would be to know, for each menu item, whether the user needs to be sudoer (eg Synaptic) or not. If it does and the user is not sudoer, then this item does not need to be shown in the menu.

Coding

  • Add a "RootRequired=yes|no|optional" field in the desktop entry spec

  • Added a "user_is_sudoer" function into gnome-menus/libmenu/desktop-entry.c
  • Added a few lines to the get_flags_from_key_file function (in the same *.c file) : if the "RootRequired" key has the "yes" value AND the user is not sudoer, hide the menu item

Quick solution for Breezy

I have already coded a quick and easy solution for Ubuntu : since all the sudoers are in the "admin" group, the program only needs to check whether the user belongs to this group. However, this will only work with Ubuntu (but is retro-compatible for breezy, hoary, warty, and previous versions).

More general, but harder, solution

The process needs to be setuid root. It could simply lookup the /etc/sudoers file, but its syntax can be very complex, and I would probably need to import a large part of the code from "sudo", which is also very long and complex.

Another solution, which I find much more elegant, is to contact the people who worl on sudo, and to help them (if they agree) add an option for sudo, for example "t" for "test" :

sudo -t synaptic

This line would tell the user whether he is allowed to run the command or not, without requiring him to enter his password. That way, each menu entry that has a "RootRequired=yes" field would run the sudo -t command, and hide the item if the user doesn't have the necessary authorization.

The "Add to panel" dialog

Here's what the "Add to Panel" dialog looks like :

http://www.manucornet.net/GNOME/Add_to_panel_before.png

And that's what I would like to make it look like.

http://www.manucornet.net/GNOME/Add_to_panel_after.png

This is not a real capture : I just played a little with GIMP/Photoshop. I haven't started coding at all, and I absolutely don't know what is possible and what isn't. I only wanted to give a preview, in order to start discussing before I really begin :o) Some of the entries were translated from my French version, sorry for the mistakes !

Nice idea, but a major thing that needs to be merged is the custom application launcher/launcher thing. What about integrating the gnome-app chooser thing? CoreyBurger

Of course, the category distribution is also a first draft. All suggestions welcome !

Panel sizing based on screen resolution and size

GnomePanelEnhancementsIdeas (last edited 2008-08-06 16:14:43 by localhost)