4

Is anyone willing to assist me in changing the screen resolution of my Ubuntu Server.

I'm running virtualbox (ubuntu server guest) on a Windows 10 host.

I've checked every link I could possibly find and no luck.

I've also installed the guest additions for it.

  • By default Ubuntu Server doesn't have a gui interface. Which desktop manager did you install? – L. D. James Aug 18 '15 at 11:49
  • @L.D.James We usually don't install GUI on a server, because of the performance implications. – linux64kb Jun 01 '18 at 04:11
  • @linux64kb I agree. There are lots of things installed on a Desktop installation that are not commonly used or installed on a server. I don't think having the GUI installed on the server has a noticeable impact unless there is an occasion to run the GUI. I've seen some occasions where clients wanted the server installation because of the server applications that were installed by default but also wanted the GUI installed for lack of computer space, to allow the server to also function as a workstation in conjunction as the server. – L. D. James Jun 01 '18 at 04:18

4 Answers4

8

1. Get supported video mode info (to achieve this, I had to install hwinfo)

>sudo apt-get install hwinfo

Then check supported modes (I was interested in setting the resolution to 1280x1024 and set the highest color depth available, so I'm going to check this.)

    sudo hwinfo --framebuffer |grep 1280x1024

The best available mode was shown like this

    > Mode 0x031b: 1280x1024 (+3840), 24 bits
    > Mode 0x0345: 1280x1024 (+5120), 24 bits

Strange as it is, 0x0345 worked from the above two modes only.

2. Edit /etc/default/grub

    sudo nano /etc/default/grub

Uncomment #GRUB_GFXMODE="some value", and change it to your resolution, also add GRUB_GFXPAYLOAD_LINUX line, like in the example below. Also modify GRUB_CMDLINE_LINUX_DEFAULT to reflect the video mode chosen.

    GRUB_CMDLINE_LINUX_DEFAULT="video=0x0345"
    GRUB_GFXMODE=1280x1024x24
    GRUB_GFXPAYLOAD_LINUX=1280x1024x24

Save the changes you have done.

3. Update grub

    sudo update-grub

4. Reboot:

    sudo reboot

If all went smooth, Ubuntu will boot in the resolution you set, for me 1280x1024x24 was fine.

Finally I managed to refine this solution, it's not partial any more.

If connecting with putty, cygwin, you will not experience this issue and the settings above will not change your terminal experience.

elbedoit
  • 121
0

Quick answer:

Go to the control on the top right of the screen -> (click) System Settings -> Displays -> [Click on the Resolution Drop-down option and select your preference].

Another way (which doesn't always work):

Click the View option to have the resolution automatically set by the windows size. This might not work unless you have compatible drivers for your installed system.

Please note: Some of the details will depend on the desktop GUI that you install. None is installed during the initial install.

L. D. James
  • 25,036
  • Thank you for taking the time to post. There isn't an option under Settings/Displays (negative). As for the view option, I do see a virtual screen with different resolutions available but they are all grayed out. – user435195 Aug 18 '15 at 01:38
  • I didn't say settings. I don't know what you are looking at when you say settings. But if you click on System Settings at the top right hand corner of the screen (while you're logged in off course), you'll see around 20 icons. Two of them will look like monitors. One of them is titled Displays. If you don't have this, it would appear that you don't have a proper install of Ubuntu. – L. D. James Aug 18 '15 at 02:27
  • Either a) I'm completely oblivious or b) you are speaking of Ubuntu desktop, not server. – user435195 Aug 18 '15 at 02:42
  • @user435195 Sorry. You're right. I was looking at a desktop feature. I'll look for the server equivalent and update my answer. – L. D. James Aug 18 '15 at 02:49
0

I realize I'm a little late to the party, but...

This is a more native method, but the upside is that you get to skip the Guest Additions stuff. I never got that to work despite the 150 different "guides". The downsides are that you have to do this every time you've ran sudo update-grub and the window doesn't auto-resize.

sudo nano /boot/grub/grub.cfg

Find this entry: menuentry 'Ubuntu' --class ubuntu --class gnu etc.

Below that line, find the indented line that looks something like this: linux /vmlinuz-4.2.0-16-generic root=/dev/mapper/dev--vg-root ro

At the end of that line, append the following: vga=somevaluehere

VGA values here: http://www.pendrivelinux.com/vga-boot-modes-to-set-screen-resolution/

I'm using linux /vmlinuz-4.2.0-16-generic root=/dev/mapper/dev--vg-root ro vga=792 which is large enough for a 24 inch. Any larger than that and it gives you scroll bars in the VM window.

Vegard
  • 101
  • 4
0

There is no need to run commands nor install guest additions. I just hit shift+ctrl+c so it takes the guest host to scale mode, and then you can adjust the scale factor from settings display and adjust it for larger.