Bashing sudo

Hi,

I tried to save a client a buck or two and, as usual, I lose.

I need to run 2 virtual machines on a computer. The host is openSUSE
12.2. I am using vmplayer which only allows 1 VM. I setup 2 accounts
and run vmplayer in each account which works but is a little unwieldy.

So then in a terminal in User1’s account I “su - user2” then run
vmplayer. This works too and is a little less unwieldy.

Now I want to script this so it will run automagicly. sudo seems to be
lacking or I don’t understand.

sudo -u user2 -H /user/bin/vmplayer
user2’s password:
DISPLAY is not set,

So I need to set DISPLAY and pass in the password.

After this is fixed I get to go home and barbeque a pizza.

Have a nice day.

Hi
Add it to the sudoers file via visudo…

user2 ALL = NOPASSWD: /usr/bin/vmplayer

Does the system cpu support kvm (eg vt flag)? If so look at using
kvm…or esxi?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 11:54, 3 users, load average: 0.05, 0.04, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

Good heavens… is there a reason you don’t just use a better product,
like VirtualBox? Also free, cross-platform, allows any number of VMs…
downside?

Good luck.