Sunday, May 5, 2024
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 7956  / 3 Years ago, mon, july 5, 2021, 10:01:43

My knowledge of Ubuntu is still fairly limited, but I know I can switch terminals with Ctrl+Alt+F*.



I was just wondering if it's possible to load my VirtualBox (winXP in this case) in one of those, that would be super handy. I currently have it set to auto-load on the right of my 2 Workspaces, but still it sometimes messes up the host-key and stuff.



Just wondering!


More From » command-line

 Answers
5

You cannot get the VirtualBox GUI running in the virtual terminals 1 - 6, only 7 and 8. Basically, you need to start the X server on VT8 and make programs run on it.



If you do not need window borders and a titlebar (because you're running VirtualBox fullscreen anyway) or other fancy display manager functions like Alt + Tab, you will be fine with a simple X server. Note that this may not be compatible with user-switching or re-logging when the main X server crashed.



Start a detached X server



sudo X -quiet -nolisten tcp -noreset :4 vt8


This will switch you to VT8 (Ctrl + Alt + F8) which is initially black. Switch back to GDM/KDM?whatever at VT7 by pressing Ctrl + Alt + F7. To run Virtual Box in VT8, run:



DISPLAY=:4 virtualbox &


This command first sets the environment variable DISPLAY to :4 and then runs virtualbox. You need to switch manually to VT8. Notice that you don't have a title bar nor a window border. To quit the application, use the File -> Quit option. To stop the xserver, first determine the process ID of your X server (using ps uww -C Xorg | grep :4) and then run sudo kill PIDHERE.



This is somehow advanced stuff, I recommend to stay using different virtual desktops (Ctrl + F<number-of-desktop> because using a second X server makes you lose sound from the main X server too. If virtualization is not a requirement, consider using wine.


[#43346] Monday, July 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eballxeye

Total Points: 370
Total Questions: 91
Total Answers: 139

Location: Suriname
Member since Sat, Jan 1, 2022
2 Years ago
;