Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

not able to see linux desktop after connecting vnc

hi am not able to see my linux desktop after connecting with vnc
User generated imageUser generated image
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you installed a GUI on your Linux VM ?

Does your Linux VM display a GUI in virtualbox ?

This question may Answer your question also, because a similar question was asked, as to why his Ubuntu VM, does not have a GUI

https://www.experts-exchange.com/questions/29172202/Open-an-image-with-GUI-UBUNTU.html
Avatar of noci
noci

You are running the linux system inside virtualbox?...


Then you can use VNC to the Virtualbox host, using the port configured as console.....

(asked in previous question is a VM was involved... it wasn't answer afaict.).


In the virtualbox on the host the VNC portnumber can be configured if remote access to the console is needed.

You can connect to that console using VNCViewer VIrtualBOXHOST and portnumber needed.

Hi,


that is probably because vnc connects to a session defined in ~/.vnc/xstartup. Probably to another display than 0.


For complete desktop sharing you can try Vino.


Cheers




Avatar of chalie001

ASKER

so how do install gnome i can't see instaruction
am geting this
springmvc@springmvc-VirtualBox:~$ dpkg -l | grep xserver-xorg
ii  xserver-xorg-core-hwe-18.04                2:1.20.5+git20191008-0ubuntu1~18.04.1        amd64        Xorg X server - core server
ii  xserver-xorg-hwe-18.04                     1:7.7+19ubuntu8~18.04.2                      amd64        X.Org X server
ii  xserver-xorg-input-all-hwe-18.04           1:7.7+19ubuntu8~18.04.2                      amd64        X.Org X server -- input driver metapackage
ii  xserver-xorg-input-libinput-hwe-18.04      0.28.1-1~18.04.1                             amd64        X.Org X server -- libinput input driver
ii  xserver-xorg-input-wacom-hwe-18.04         1:0.36.1-0ubuntu1~18.04.1                    amd64        X.Org X server -- Wacom input driver
ii  xserver-xorg-legacy-hwe-18.04              2:1.20.5+git20191008-0ubuntu1~18.04.1        amd64        setuid root Xorg server wrapper
ii  xserver-xorg-video-all-hwe-18.04           1:7.7+19ubuntu8~18.04.2                      amd64        X.Org X server -- output driver metapackage
ii  xserver-xorg-video-amdgpu-hwe-18.04        19.0.1-1~18.04.1                             amd64        X.Org X server -- AMDGPU display driver
ii  xserver-xorg-video-ati-hwe-18.04           1:19.0.1-0ubuntu1~18.04.1                    amd64        X.Org X server -- AMD/ATI display driver wrapper
ii  xserver-xorg-video-fbdev-hwe-18.04         1:0.5.0-1ubuntu1~18.04.1                     amd64        X.Org X server -- fbdev display driver
ii  xserver-xorg-video-intel-hwe-18.04         2:2.99.917+git20171229-1ubuntu1~18.04.1      amd64        X.Org X server -- Intel i8xx, i9xx display driver
ii  xserver-xorg-video-nouveau-hwe-18.04       1:1.0.16-1~18.04.1                           amd64        X.Org X server -- Nouveau display driver
ii  xserver-xorg-video-qxl-hwe-18.04           0.1.5-2build2~18.04.1                        amd64        X.Org X server -- QXL display driver
ii  xserver-xorg-video-radeon-hwe-18.04        1:19.0.1-0ubuntu1~18.04.1                    amd64        X.Org X server -- AMD/ATI Radeon display driver
ii  xserver-xorg-video-vesa-hwe-18.04          1:2.4.0-1~18.04.1                            amd64        X.Org X server -- VESA display driver
ii  xserver-xorg-video-vmware-hwe-18.04        1:13.3.0-2build1~18.04.1                     amd64        X.Org X server -- VMware display driver
i did this
springmvc@springmvc-VirtualBox:~/Documents/springmvn$ sudo apt install gnome-session gnome-terminal
[sudo] password for springmvc:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-terminal is already the newest version (3.28.2-1ubuntu1~18.04.1).
gnome-session is already the newest version (3.28.1-0ubuntu3).
gnome-session set to manually installed.
The following packages were automatically installed and are no longer required:
  gir1.2-geocodeglib-1.0 libllvm8 ubuntu-web-launchers
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.

What does the following show:


ps ax | grep X

ps ax | grep gdm


if those show a process the desktop is already running on the Console.....


Again check in on the virtual box host in virtualbox: 

Open the settings of the VM in question, goto display section, advanced tab, and check the server is enabled. 

(if port 3389 (or near there) is shown you need  RDP if 59xx is needed you need VNCViewer.

Not that you can chose the protocol,  you can choose the portnumber

Some VMhosts use RDP others use VNC as protocol.

I GOT
springmvn$ ps ax|grep X
1155 tty1     S+     0:00 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
 1351 tty2     Sl+    5:53 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
 5492 ?        Sl     4:50 /usr/bin/java -Dosgi.requiredJavaVersion=1.8 -Xms256m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -jar /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE/SpringToolSuite4 -name SpringToolSuite4 --launcher.library /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426/eclipse_1801.so -startup /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar --launcher.overrideVmargs -exitdata 1008034 -product org.springframework.boot.ide.branding.sts4 -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.8 -Xms256m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -jar /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
 5660 ?        Sl     0:36 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE/plugins/org.springframework.tooling.boot.ls_1.15.0.202001210741/servers/spring-boot-language-server/BOOT-INF/classes:/home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE/plugins/org.springframework.tooling.boot.ls_1.15.0.202001210741/servers/spring-boot-language-server/BOOT-INF/lib/* -Dsts.lsp.client=eclipse -Dlsp.completions.indentation.enable=true -Xmx1024m -XX:TieredStopAtLevel=1 -noverify -Dspring.config.location=file:/home/springmvc/Downloads/spring-tool-suite-4-4.5.1.RELEASE-e4.14.0-linux.gtk.x86_64/sts-4.5.1.RELEASE/plugins/org.springframework.tooling.boot.ls_1.15.0.202001210741/servers/spring-boot-language-server/BOOT-INF/classes/application.properties org.springframework.ide.vscode.boot.app.BootLanguagServerBootApp --languageserver.hover-timeout=225
 8313 pts/1    S      0:00 Xvnc4 :1 -desktop springmvc-VirtualBox:1 (springmvc) -auth /home/springmvc/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/springmvc/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
 9310 tty2     Sl+    3:27 /usr/bin/java -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Xms256m -Xmx1024m --add-modules=ALL-SYSTEM -jar /snap/eclipse/40//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar -data /home/springmvc/Documents/springmvn -os linux -ws gtk -arch x86_64 -showsplash /snap/eclipse/40//plugins/org.eclipse.epp.package.common_4.11.0.20190314-1200/splash.bmp -launcher /snap/eclipse/40/eclipse -name Eclipse --launcher.library /snap/eclipse/40//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1000.v20190125-2016/eclipse_1801.so -startup /snap/eclipse/40//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar --launcher.appendVmargs -exitdata 1558008 -product org.eclipse.epp.package.java.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Xms256m -Xmx1024m --add-modules=ALL-SYSTEM -jar /snap/eclipse/40//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar
 9642 pts/1    S+     0:00 grep --color=auto X


=====
springmvn$ ps ax | grep gdm
 1096 ?        Ssl    0:00 /usr/sbin/gdm3
 1106 ?        Sl     0:00 gdm-session-worker [pam/gdm-launch-environment]
 1127 tty1     Ssl+   0:00 /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
 1131 tty1     Sl+    0:00 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
 1327 ?        Sl     0:00 gdm-session-worker [pam/gdm-password]
 1349 tty2     Ssl+   0:00 /usr/lib/gdm3/gdm-x-session --run-script env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu
 1351 tty2     Rl+    5:55 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
 9688 pts/1    S+     0:00 grep --color=auto gdm


# apt-get install gnome gnome-a* gnome-colors* gnome-control* gnome-b* gnome gnome-d* gnome-menus gnome-nettool gnome-p* gnome-session* gnome-t* gnome-u* gnome-shell* gnome-system* gnome-settings-daemon metacity nautilus gnome-terminal desktop-* display-dhammapada -y

and use this xstartup file

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

Gnome already has been installed and it IS running on the console:
 /usr/bin/Xwayland :1024   (It is not using X, it is using wayland).

Did you verify the VM management menu on the VBoxhost?...

For VNC this articale may help:
https://modusmundi.com/2018/03/10/wayland-is-painful-for-vnc/

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.