Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm frequently using application launchers to run personal bash scripts and thus I often use gksudo in case I do administrative tasks. The problem is that when I execute a command with gksudo,the execution is successful, but afterwards gksudo waits for about 5 seconds before it closes/finishes. In some scripts I use gksudo multiple times, resulting in execution times of a few minutes, even though everything should be done in a few seconds.

Can anyone help me here?

PS: here are my main /etc/sudoers-settings (might have something to do with my problem):

Defaults    env_reset,!tty_tickets,timestamp_timeout=2
phoenix ALL= NOPASSWD: /bin/mount,/bin/umount,/usr/sbin/firestarter,/usr/bin/truecrypt,/usr/bin/apt-get
share|improve this question

closed as too localized by James Mar 1 '12 at 16:15

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Why are you using gksudo over sudo, or are these GUI applications? – david6 Nov 30 '11 at 8:35
OP are you still looking for an answer? – Ringtail Feb 25 '12 at 22:23
This question appears to be abandoned, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. :) – Ringtail Feb 26 '12 at 5:34
The wait here was likely caused by the setting to no tty_tickets (!tty_tickets). In sudo 1.7.4+ that can cause some unwanted affects, in the above case really nothing to be gained anyway, the timeout only applies per instance – doug Mar 1 '12 at 0:17

By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user. However, since the Root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorised users (normally "Administrative" users; for further information please refer to AddUsersHowto) to run certain programs as Root without having to know the root password.

This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you would normally run as Root.

Basically boils down to this:

Use gksudo=GUI applications

Use sudo=CLI applications

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.