application "run as" command in gnome?

Hi all. I’ve just made the switch from KDE to GNOME and I’m still working on making the transition and there is one thing that I can’t find.

In KDE, I had the ability to right-click on a desktop icon and go to the “run as” property and tell it to run this app as someone else (i.e. root). This was very useful for things like file manager if I wanted to crank it up in supervisor mode. I would like to find the same ability in GNOME but can’t seem to locate it.

In a similar vein, I’ve set up my repositories and I’ve tried to do auto-update but when I run it, it keeps stating I don’t have the authorization. I guess I need to run it as root but I can’t find a place on the icon to specify this setting.

Any advice for a GNOME newbie?

Is it Gnome Terminal you are looking for?

Use YaST to set repositories and updates. Your admin pw will be required when starting it up.

I am very new, so perhaps I am misunderstanding what you might be looking for, and I do not use KDE at all.

Good Luck.

I’ve set up the repositories. But when I try to run the updates, it says I’m not authorized. I am logged in a myself at the time.

Over in KDE, I had the ability to run an application as root even if I was logged in as myself but I can’t find the equivalent setting in GNOME.

I’d also like to be able to open nautilus as root. If I open it as myself and then try do to something like right-click on an RPM and run software installer, it also fails because I"m not root.

Use gnomesu to run apps as root. ALT+F2 will raise the run command, and ‘gnomesu app’ will run app with root permissions.

On 2010-12-16 00:36, jgosney wrote:

> I’ve set up the repositories. But when I try to run the updates, it
> says I’m not authorized. I am logged in a myself at the time.

What application? If you run yast from the menu, it will ask for root’s
password. You can copy the menu entry to the desktop and see what it uses
to become root.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I’m not sure if there’s a graphical frontend for this or something as quick as a shortcut… but you have ‘xdg-su’ which can be used… imagine you want to run nautilus as root… open a console and drop:

“xdg-su -u root -C nautilus”… you will get a popup asking for the password and then the app runs. :slight_smile: I know this isn’t as user friendly as you might liked, but it works in KDE as well and should work on other window managers. You you might want to know before using it:

xdg-su --help
man xdg-su

Hope it helps you… and yeah you can do a nautilus script to add it to the popup… just don’t ask me how…

And YEAH! The nice part you can make launchers with it if you really use it a lot :wink:

DISCLAIMER: I might be forgetting some easier option I’m unaware on the moment, try not to crucify me for that.

Thanks for all the suggestions so far. I’ve been playing with the gnomesu suggestion and that seems to work ok. If I want an icon to launch as root while I’m logged in as myself, I create a new icon for the app and add gnomesu to the command. For example, I wanted an icon to launch the nautilus file manager as root so I created a new icon with “gnomesu nautilus” as the command line. That seems to work OK.

But I’m still stuck on the update launcher. I’ve got a software updater icon on my taskbar and it informs me that there are X number of updates. I click it and it begins to install the updates but then says “authorization failed” but it doesn’t give an option to enter a root password. I can go into YAST, enter the root password from there, and install the updates with no problems but it seems strange that I would have a taskbar applet with no way to modify it to run as root.

There might be a problem with your PolicyKit configuration. I don’t know much about this, but it requires editing XML. You might find a clue in ‘/usr/share/polkit-1/actions/org.freedesktop.packagekit.policy.’ Scroll down and look for something like


    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>

and


    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>

Are your settings similar to this?

When the software indicator icon shows up for me on the task bar, it does show the available updates with ability to check which desired updates to install. I do immediately get another box that pops up asking for password to allow the updates to happen.

Are you getting that box? or does it just it just go to authorization failed?

OK…here we go… I want to mention this, and now that I am thinking about, make sure you move all other windows out of the way, minimize other applications when you do the update. I know for a fact that my authorization box requesting the password would often pop under any running app at the time. I remembe stuggling with Authorization Failed…well it did not fail, I never saw the box requesting the pw. I guess I forgot about that because I am in the habbit to minimize my apps. Actually since I am using Gnome preview, I will see all windows open on all desktops being used when I place the cursor in the upper left corner, so I would see it anyways there.

Hope this helps.

Yes, I have those settings in that file.

I verified that there is no hidden windows and no prompts for a root password stuck behind anything else. It’s the strangest thing. I guess its not that big of a deal. If the applet shows that there are updates available, I can just go into yast and install them from there.