28/04/16

Change of screen resolution of Linux/BunsenLabs-Debian on Virtual Box

So, I don't have enough priviledges on my office machine. As I want to work with my own suite of stuff, I'm installing a fresh BunsenLabs (the supposed child of the discontinued CrunchBang) - always Debian-based - via VirtualBox.

The problem is that it fails to recognize the right screen resolution and I was stuck on 1024x768.

I first tried to install guest-additions (Devices > Install Guest Additions on the VirtualBox window of the running virtual system). The cd was mounted automatically, all I had to do was to open a terminal in the cd directory, and run:

> sudo ./VBoxLinuxAdditions.run

and then reboot.

I had better resolution as a result:

> xrandr

VBOX0 connected 1600x1200+0+0 0mm x 0mm
   1024x768      60.00 +  60.00
   1600x1200     60.00*
   1440x1050     60.00
   1280x960      60.00
   800x600       60.00
   640x480       60.00  


But still I didn't have the right resolution of the screen. (Update: I discovered that the guest additions weren't installed correctly. This determined the error. Reading the messages after running VBoxLinuxAdditions.run I installed the missing libraries and the system was correctly aligned. I leave the following part as it still provides a way to proceed in case of problems.)

I went on the original system anche checked which it was:

> xdpyinfo  | grep 'dimensions:'
  dimensions:    1680x1050 pixels (474x303 millimeters)


a (first-time seen for me) 1680x1250 resolution!

So I checked which options I should use:

> gtf 1680 1250 60
  # 1680x1250 @ 60.00 Hz (GTF) hsync: 77.64 kHz; pclk: 176.40 MHz  Modeline "1680x1250_60.00"  176.40  1680 1792 1976 2272  1250 1251 1254 1294  -HSync +Vsync


And I created the new mode, copying the result of the previous command:

> xrandr --newmode "1680x1250_60.00" 176.40  1680 1792 1976 2272  1250 1251 1254 1294  -HSync +Vsync
I added it

> xrandr --addmode VBOX0 "1680x1250_60.00"

and run it, to test if it worked, yes!

> xrandr --output VBOX0 --mode "1680x1250_60.00"

now, in order to put it the screen into the system for the next reboot, edit /home/.config/openbox/autostart (BunsenLabs-related, may be different for other distros), adding all the lines:

xrandr --newmode "1680x1250_60.00" 176.40  1680 1792 1976 2272  1250 1251 1254 1294  -HSync +Vsync
xrandr --addmode VBOX0 "1680x1250_60.00"
xrandr --output VBOX0 --mode "1680x1250_60.00"


Voilà. After the login, we have the new screen resolution!

Nessun commento:

Posta un commento