How can I add "root" privileges in LxPanel launcher?
Solution 1
You can achieve this without needing to install any extra packages.
- Add your application (synaptic) to the panel
- Open a
lxterminal
and navigate to~/.config/lxpanel/Lubuntu/panels
- type the following to open the file
leafpad panel
- find the line
id=/usr/share/applications/synaptic.desktop
- change this line to
id=synaptic.desktop
- save and exit leafpad
- create a local applications menu folder
mkdir -p ~/.local/share/applications
- copy the master synaptic.desktop file:
cp /usr/share/applications/synaptic.desktop ~/.local/share/applications
- edit the newly copied file:
leafpad ~/.local/share/applications/synaptic.desktop
- find the line
Exec=synaptic-pkexec
- change this to
Exec=gksudo synaptic-pkexec
- 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/
Related videos on Youtube
Petr
Updated on September 18, 2022Comments
-
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?