[SOLVED] How to have desktop icon prompt for root password?

All questions and problems regarding the installation and upgrades of LXDE from USB Stick, Live CD or Web.
Locked
oldcpu
Posts: 4
Joined: Sun Feb 21, 2010 5:52 pm

[SOLVED] How to have desktop icon prompt for root password?

Post by oldcpu »

I'm very new to LXDE, and I'm trialing/testing its new implementation on openSUSE-11.3 milestone2 release.

How do I add an icon to the desktop, so as to have it prompt me for root permissions when clicked on ? I successfull added icons to the desktop via this blog: http://blogs.koolwal.net/2009/09/11/how ... e-desktop/ but when I then took that method and applied it to an application that required root permissions, it would only run with regular user permissions. My /usr/share/applications file:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=smart-software-manager
Comment=Direct-link-to-smart-software-manager-with-root
Exec=/usr/bin/smart --gui
Icon=/usr/share/pixmaps/smart.png
MimeType=text/plain
Terminal=false
Type=Application
MimeType=text/plain
Categories=System;Utility;Settings;PackageManager;System;
the application "smart" is run, but it does not run as root. I need to have it run as root.

As an aside, I'm running this on My "sandbox" PC is a 10 year old 32-bit AMD Athlon-1100 w/1GB RAM (running on an MSI KT3 Ultra motherboard) w/nVidia GeForce FX5200 graphics AGP card.
Last edited by oldcpu on Sun Feb 21, 2010 7:20 pm, edited 1 time in total.
oldcpu
Posts: 4
Joined: Sun Feb 21, 2010 5:52 pm

Re: How to have desktop icon prompt for root password?

Post by oldcpu »

Turns out this works:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=smart-software-manager
Comment=Direct-link-to-smart-software-manager-with-root
Exec=xdg-su -c 'smart --gui'
Icon=/usr/share/pixmaps/smart.png
MimeType=text/plain
Terminal=false
Type=Application
MimeType=text/plain
Categories=System;Utility;Settings;PackageManager;System;
One of the LXDE knowledegeable openSUSE users helped me on openSUSE forums. ...

I like LXDE, ... its a nice desktop. ...I have it (openSUSE 11.3 milestone2 with LXDE) running on an 10 year old 32-bit AMD Athlon-1100 w/1GB RAM (with an MSI KT3 Ultra motherboard) w/nVidia GeForce FX5200 graphics AGP card, and it runs well. I suspect even that 10 year old PC is too fast to show the light weight advantages of LXDE.
donaldjeo
Posts: 1
Joined: Thu May 20, 2010 6:58 am

Re: [SOLVED] How to have desktop icon prompt for root password?

Post by donaldjeo »

What desktop are you using? In KDE 3, you can open the desktop menu. Go to system --> File Manager --> File manager Super User Mode. It will prompt you for the "root" password, which you should have set when you installed. Then it's much like Windows. On the far left, there will be a row of icons. Click the one that looks like a red folder. Then navigate to /home/<your user name>/Desktop. Then you can right click each one you don't want and move it to trash.
Just make sure and don't delete the desktop directory.
Post by ccna
Locked