I have an application (VirtualBox) which I need to run as root user. I can run sudo VirtualBox just fine, but I want to have a shortcut on my Desktop which I only have to click on to start VirtualBox as root user. I tried chown root:root, but that doesn't do anything.

Thanks!

Btw: I'm running Debian Squeeze.

link|improve this question
possible duplicate of Configuring sudo to work without password – mailq Oct 22 '11 at 10:38
1  
I should tell you that you haven't set up VirtualBox correctly - it does not normally require root to run. – Kvisle Oct 22 '11 at 13:07
Kvisle is right, VirtualBox doesn't normally require root-access. But (at least on debian) virtualbox-users should normally belong to the vboxusers-group. – olemd Nov 9 '11 at 18:33
feedback

1 Answer

up vote 4 down vote accepted

You can still use sudo to run programs without having to type a password. You can do this by running the visudo command and adding a line in for VirtualBox:

sudo visudo

Add the following line to the file

yourusername ALL = NOPASSWD: /path/to/virtualbox

Then create a desktop shortcut to sudo /path/to/virtualbox and it should run as root without a password.

link|improve this answer
Thanks a lot! That worked like a charm! – LinuxNewbie Oct 22 '11 at 12:01
feedback

Your Answer

 
or
required, but never shown

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