Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

how can I add "root" privileges in LxPanel launcher (in Lubuntu)? I would like have launcher for Synaptic, but Synaptic need root privileges.

Have anyone any idea how it do it?

share|improve this question
    
Not sure what you are asking - are you asking how to edit the menu options to add gksudo synaptic ? does my answer here help in any way? askubuntu.com/questions/54303/gui-for-editing-menu-in-xubuntu/… –  fossfreedom Dec 9 '11 at 12:58
    
Not, i ask on launcher applet in lxpanel. I have in launcher Chromium and Synpatic, but if i click on Synaptic then it start in non-root. –  Petr Dec 9 '11 at 13:38
    
Add gksu in front of the command, and you'll be asked to input your password when you run it, and it'll run as root. –  Jo-Erlend Schinstad Dec 9 '11 at 14:04
    
How? In Xfce it i can, but in Lxde it´s not. –  Petr Dec 9 '11 at 14:41

2 Answers 2

up vote 1 down vote accepted

enter image description here

You can achieve this without needing to install any extra packages.

  1. Add your application (synaptic) to the panel
  2. Open a lxterminal and navigate to ~/.config/lxpanel/Lubuntu/panels
  3. type the following to open the file leafpad panel
  4. find the line id=/usr/share/applications/synaptic.desktop
  5. change this line to id=synaptic.desktop
  6. save and exit leafpad
  7. create a local applications menu folder mkdir -p ~/.local/share/applications
  8. copy the master synaptic.desktop file: cp /usr/share/applications/synaptic.desktop ~/.local/share/applications
  9. edit the newly copied file: leafpad ~/.local/share/applications/synaptic.desktop
  10. find the line Exec=synaptic-pkexec
  11. change this to Exec=gksudo synaptic-pkexec
  12. save, exit leafpad, logout and login.
share|improve this answer

Graphical option -

Try LxMenuEditor Add in a custom command gksu nautilus or gksu synaptic

Sereenshots (I did not add them directly as they are large)

http://forum.lxde.org/download/file.php?id=262

http://forum.lxde.org/download/file.php?id=263

To install the dependencies

sudo apt-get install lxshortcut zenity

LxMenuEditor itself is a script, save it in ~/bin

mkdir ~/bin
cd bin
wget http://opendesktop.org/CONTENT/content-files/138298-LxMenuEditor
mv 138298-LxMenuEditor LxMenuEditor
chmod a+x LxMenuEditor

to run it manually, ~/bin/LxMenuEditor

Once you log out and log back in, ~/bin will be on your path and you can either make a menu entry of it or open a terminal and type LxMenuEditor

Your other option is to manually edit your menu or write a launcher. Writing a launcher is not too hard , they are located in /usr/share/applications as *.desktop files. You can use most any .desktop as a template, just set an icon and use gksu synaptic as the action / command.

For details, see

https://wiki.archlinux.org/index.php/LXDE#Application_Menu_Editing

http://standards.freedesktop.org/desktop-entry-spec/latest/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.