How can I add "root" privileges in LxPanel launcher?

7,756

Solution 1

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.

Solution 2

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:
7,756

Related videos on Youtube

Petr
Author by

Petr

Updated on September 18, 2022

Comments

  • Petr
    Petr over 1 year

    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?