|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
There are a few steps to launching a program, so i decided id put all the commands i need into a bash command, but one of the commands needs to be run as root. so i thought no problem i just sudo it. But the command needs to be run in X so it doesnt ask for the root password, it just skips the command and launchs the app which promptly breaks.
So how in a bash command do i open the nice looking run command a super user dialog? the command that i need to run is: Code:
/etc/init.d/vboxdrv start |
|
|||
|
If you want to launch programs in X for GNOME and KDE there are two commands you can use use, gnomesu and kdesu.
For the Virtual Box driver it could be easier to just add it as a module that gets loaded at boot using YaST > /etc/sysconfig Editor > System > Kernel > MODULES_LOADED_ON_BOOT , and file this last parameter vboxdrv (unless you don't always want it loaded). Cheers, Wj |
|
|||
|
yeah i was typing on auto pilot im gonna change "start" to "setup" so that i dont have to duck into terminal after kernel update to recompile the driver.
|
|
|||
|
Quote:
It would be good when they find a solution that keeps track of what drivers and modules get added/setup with a certain kernel version so they automatically get re-added when updating the kernel.But if it where that simple I guess it would have been there already. Cheers, Wj |
|
|||
|
ok this is the script that i wrote, it recompiles the Virtual Box Kernel module and then launches the given VM
Code:
#!/bin/bash gnomesu /etc/init.d/vboxdrv setup VBoxManage startvm "WindowsXP" |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|