8

I'm using Virtual Box on my windows 8.1 host machine. I have installed CentOS & Ubuntu in 'Graphical Mode' and had sufficient practice. But now I wanted to switch to 'Command Line Mode" completely. Therefore created a machine for that purpose and installed 'CentOS6.6 Basic Server'/'CentOS7 Minimal.

On Graphical Mahines, I could easily install VBox Guest Additions with these few commands.

yum update
yum install gcc
yum install kernel-devel
sh VBoxLinuxAdditions.run (From mounted Location For CDrom)

But since I installed CLI machine and when tried same commands on it, it does not install properly, gives this error: Could not find X.Org or Xfree86 Window System, skipping.

  • Maybe there is some way to install the non-X-server based bits from the Guest Addition. Try running the command as follows: ./VBoxLinuxAdditions.run --nox11 – shivams May 30 '15 at 14:18
  • Does askubuntu.com/questions/299975/… (look at the answer from David) help? – guntbert May 30 '15 at 14:54
  • That's not an error, it's a warning. Ignore it, you have correctly installed guest additions. – terdon May 30 '15 at 14:58
  • @guntbert I tried smiliar commands with yum, but it says nothing to do after searching repo database, indicating no such packages found. – Sollosa May 30 '15 at 15:07
10

I just installed this on my Ubuntu CLI VM using these commands:

sudo mount /dev/cdrom /mnt
sudo /mnt/VBoxLinuxAdditions.run

I found a page suggesting installing dkms first but I seem to have had that already installed. If you don't, run this command before those above (this should work on the Ubuntu, but you can probably find the equivalent yum command):

sudo apt-get install dkms

Now, this ran correctly. I also got the error you mention ("Cannot find the X.Org or XFree86 Window System, skipping) but that's just a warning. That's why it says "skipping". It simply skipped installing the parts of the guest additions that deal with X. The rest was installed correctly.

  • I read about dkms and other packages too on ubuntu, will check it on a ubuntu server machine later. this was the detailed command on ubuntu though. # sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r) but for now, I can't figure it out for centos version 6 or 7. I tried yum with same package names but it mostly says nothing to do after searching repo database. oh and it did not resize after skipping as you suggesting. – Sollosa May 30 '15 at 15:04
  • @Sollosa it wasn't supposed to resize. If I understand you correctly, what you want is to change the resolution of your CLI guest system. That won't be done by installing guest additions. This is how you install guest additions from the CLI and you have probably already done so. I suggest you ask a new question explaining what your final objective is and see if anyone can help. – terdon May 30 '15 at 15:12
  • ok sorry I thought installing Vbox guesst additions help resize screen of host machine, it used to do for my graphical machines, so it's how I used to think about it. Looks like I was wrong. – Sollosa May 30 '15 at 15:24
  • @Sollosa The VB guest additions have features for X11 (such as clipboard synchronization and resizing based on the size of the VB window) but not for the Linux console. Nobody cares about the Linux console. If you only want a command line, just use SSH. – Gilles May 30 '15 at 23:17
3

As per the question, OP wants to install the Guest Addition so that he can change the resolution of his Guest. This is not possible. Guest Additions can only change the resolution when there is an X-server installed.

To quote from Wikipedia:

The Guest Additions for Windows, Linux, Solaris, OpenSolaris, or OS/2 guests include a special video-driver that increases video performance and includes additional features, such as automatically adjusting the guest resolution when resizing the VM window or desktop composition via virtualized WDDM drivers .

However, if you do want to install the Guest Addition, you can try this command:

./VBoxLinuxAdditions.run --nox11

But then again, even if it works, it is not going to solve your problem. Because you wouldn't be able to change the resolution of your non-graphical guest OS.

UPDATE

However, if you want to work on the command line in a bigger resolution, you can just ssh into your virtual machine using putty. This is the standard procedure.

  • of course my machine is a guest operating system, as I'm using it on Virtual Box. So isn't there a way to install guest additions on a 'CLI' based machine or is there a way around? – Sollosa May 30 '15 at 13:56
  • The real question is why do you want to install Guest Addition? It provides no benefit (as far as I know) on a Guest which has no graphical user interface (i.e. X-server). – shivams May 30 '15 at 13:57
  • thank you shivams! I want to know about it so that I could resize the resolution of my guest operating system. why else would I be asking or searching for it? – Sollosa May 30 '15 at 13:59
  • 1
    @Sollosa : Okay. But unfortunately, this is not how Guest Addition works. It can not resize the resolution of a non-graphical guest OS. It is able to do only when there is some graphical system installed. – shivams May 30 '15 at 14:03
  • For example, even when you have a graphical system installed and when you are booting, you might notice that the resolution is low and window size is small. It gets enlarged only when you reach on the login prompt of your graphical OS. – shivams May 30 '15 at 14:03
2

The solution posted here addresses the problem. The solution is to change the terminal window size within the VM machine.

If setting in grub2 using this solution the entries as:

GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD=keep
GRUB_GFXPAYLOAD_LINUX=keep

did only change the Grub menu resolution (even if putting the 1024x768x32 on the PAYLOAD entries) and did not solve the problem. I had to add the vga=0x344 to the GRUB_CMDLINE_LINUX

1

I know that this is not an answer to the question above but it is an answer to the problem that Sollosa actually wanted to address.

If you are on a computer with a very high resolution screen, the VirtualBox window and the font on the terminal can be tiny!

I have a very easy solution to this problem. You could simply use the shortcut: CTRL + C

Then, you will be able to stretch the VirtualBox window and, as a result, increase the font size.

If your "Host Key" is something else, you will have to replace the "CTRL" key with your "Host Key".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.