Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to start a virtual machine on another window panel, but I'm not sure what the command for this would be.

I have:

virtualbox --startvm myvin &

in my autostart.sh.

share|improve this question

1 Answer 1

If you have a "EWMH/NetWM compatible X Window Manager", and you probably do (here is a list), then you can use wmctrl to move the program to another desktop/workspace after it is already started. VirtualBox appears to put the VM name in the Window title, so something like this will probably work for you:

virtualbox --startvm myvin &
sleep 2 # adjust accordingly
wmctrl -r myvin -t 1 # move window containing title 'myvin' to the 2nd desktop

wmctrl may not be installed by default. Install it using your distribution's package-manager if necessary (i.e. apt-get install wmctrl on debian based systems).

Helpful for troubleshooting:

wmctrl -d lists the available desktops.

wmctrl -l lists the available windows (includes window title value).

share|improve this answer
    
thanks for the reply. I'm using openbox. I will give this a try. –  asdfa Aug 25 '11 at 19:49

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.