Solved Video resolution as guest on VirtualBox

Luca79

Member


Messages: 24

I have FreeBSD/Openbox as guest on VirtualBox... i already use virtualbox-ose-addictions, and can get the ideal resolution using the command xrandr.
I wish to make this permanent, but don't know if i should add the xrandr comand to /boot/loader.conf.
 

xavi

Active Member

Reaction score: 98
Messages: 136

but don't know if i should add the xrandr command to /boot/loader.conf
A common way to execute X related scripts is the use of ~/.xinitrc or ~/.xprofile files in a user's home directory.
Put the line of code for xrandr in one of these files and it will be executed on every X startup to make settings permanent.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

Add VBoxClient-all to your ~/.xinitrc (just before you start the WM/DE). Then your display will automagically resize to whatever the size of the virtualbox window is.
 

teo

Aspiring Daemon

Reaction score: 22
Messages: 535

Add VBoxClient-all to your ~/.xinitrc (just before you start the WM/DE). Then your display will automagically resize to whatever the size of the virtualbox window is.

Hello SirDice, and how is the procedure, is it this way?

# vi ~/.xinitrc
Code:
VBoxClient-all
Or of this form?

# vi ~/.xinitrc
Code:
exec /usr/local/bin/VBoxClient-all
I remember I already tried VBoxClient-all and it didn't work on the virtualized machine for window managers.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

Don't exec(1) it. Only the last thing (usually your DE/WM) has to be exec(1)'ed.

Code:
VBoxClient-All
exec your-wm
 
Top