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.

I have a few launchers in Unity that I might want to run as sudo once or twice, but I have no idea what to type into the terminal.

At the moment, crazily, I have to run the app, then search for likely candidates in System Monitor! I don't think the Unity Design team intend, ever, to give us a right-click action on the Dash, or a "Details" option if I right-click on a Launcher, so... how do I figure out what's actually being executed when I run a Launcher?

(for the curious, what I'm struggling with is Desura - it's not in the system path, so I can't just whereis desura, assuming desura is what's actually being run - I'd be guessing)

[EDIT : using the method I marked as the answer, I can see that Desura installs in my home directory and as it's a non-root install, it doesn't update the system path.]

share|improve this question

2 Answers 2

up vote 2 down vote accepted

To read the contents of the launcher file you can open gedit and drag&drop a launcher icon from the dash into it.

Gedit will then display the .desktop file for that launcher which is by the way stored in

/usr/share/applications

in my case for example

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Desura
GenericName=Game Manager
Comment=Download and play the best games
Exec=/home/daniel/desura/desura %U
TryExec=/home/daniel/desura/bin/desura
Path=/home/daniel/desura
MimeType=x-scheme-handler/desura;
Icon=/home/daniel/desura/data/desura.png
Terminal=false
Categories=Game;
StartupNotify=false

Now just look at the 'Exec=' line in that document in my case

Exec=/home/daniel/desura/desura %U

This will point you to where the executable is stored and tell you the name (desura).

By the way...normally it is neither necessary nor a good idea to run desura in root mode.

share|improve this answer
    
Very elegant solution. Thanks! Still wish they'd add a right-click menu though... :-) –  Scaine Aug 12 '12 at 22:42
    
Oh, and tried to run Desura as root to fix an issue and you're right - it doesn't want to do that. Found another way around the issue though, so no worries. –  Scaine Aug 12 '12 at 22:48

Use the starter file properties

Drag the icon onto the desktop, right click on it and select "Proprerties". The command is in the "Command" field:

enter image description here

Use Arronax

Install Arronax, open Arronax and drag the icon from the dash into Arronax. , the command is in the "Command" field:

enter image description here

share|improve this answer
    
Hadn't come across Arronax before, thanks. I tried to install Alacarte, but it wanted a pile of dependencies! –  Scaine Aug 12 '12 at 22:41

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.