1

I have installed Ubuntu Server 16.04 and on top of it GNOME in a VirtualBox VM. Since I updated the system, I can boot the VM, access the terminal console and log in - but when I run startx in order to start the graphical GNOME desktop environment, I receive the following error message:

ubuntu@ubuntu:~$ startx

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-45-generic x86_64 Ubuntu
Current Operating System: Linux ubuntu 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-81-generic root=UUID=99c624b7-abf7-459e-9f58-a1ffe335794f ro
Build Date: 02 November 2016  10:06:10PM
xorg-server 2:1.18.4-0ubuntu0.2 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.33.6
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/ubuntu/.local/share/xorg/Xorg.0.log", Time: Fri Jun 30 08:18:56 2017
(==) Using default built-in configuration (39 lines)
(EE) 
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/home/ubuntu/.local/share/xorg/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Cannot assign requested address
xinit: server error
Couldn't get a file descriptor referring to the console

Among the updates were some kernel packages. Does anyone know how to solve this problem?

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
lewis4u
  • 4,866
  • It sound like that the user 'ubuntu' lacks environment variables. a.o. DISPLAY=:0. By the way, is there a display manager (f.e. lightdm) running? –  Jun 30 '17 at 09:52
  • How can i check that? I have installed only the minimal-server and then when i got into terminal i run sudo apt install gnome – lewis4u Jun 30 '17 at 10:03
  • A true minimal server does not have anything graphical installed. Perhaps just running sudo apt install gnome does not install all required components to turn the server into a desktop machine. This link may prove helpfull on detecting and/or installing a display manager: https://askubuntu.com/questions/829108/what-is-gdm3-kdm-lightdm-how-to-install-and-remove-them –  Jun 30 '17 at 11:21
  • I have gdm3 for display manager – lewis4u Jun 30 '17 at 11:46

2 Answers2

2

The problem might be due to the installed VirtualBox guest additions and may occur when a new kernel gets installed. Reinstall the vbox guest additions, important is that the version matches the installed VirtualBox version. Reboot the virtual machine afterwards ... it should solve the problem.

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
0

Your system seems capable to create X-session on its console.
Why are you entering the startx command in a terminal? The display manager is probably already running. You do realize the terminal can not be used as the output device of an Xsession, I hope? You only connect via terminal to a server (or any machine) to perform actions on command line.

I just installed a fresh Ubuntu Server 16.04 in VMWorkstation, installed openssh-server. connected via terminal (ssh) and installed gdm and rebooted. I now see a graphical login screen.

enter image description here

  • I had that also 3 months before.....and when i have run sudo apt update and sudo apt upgrade i get into black screen and it blinks a while and then it stops....i can login but can't start gui as a user. But now i have tried with sudo startx and it works! But why doesn't it work immediately as a user – lewis4u Jun 30 '17 at 12:34
  • Ah... that is vital information you did not mention in your question. You could try to install a new display manager; for ex. lightdm - sudo apt-get install lightdm, configure it for lightdm and reboot. –  Jun 30 '17 at 12:50
  • I still didn't fix it....I have a saved image that works fine until I do sudo apt update and sudo apt upgrade.....after that gui doesn't work anymore! – lewis4u Jul 02 '17 at 08:17
  • I gather the upgrade has actually turned the installation back into a server again; removed the gui stuff. It means you have repeat the above again. Or decide to install the real desktop version on the machine. –  Jul 02 '17 at 18:51
  • Something happened to vbox additions with new kernel and the screen had no usable configuration. And when I reinstalled the vboxlinuxadditions and rebooted that fixed the problem – lewis4u Jul 02 '17 at 18:54
  • 1
    Well... at least you learned a lot from this ... ;-) –  Jul 02 '17 at 18:59