asked on
not able to see linux desktop after connecting vnc
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
ASKER
am geting this
springmvc@springmvc-VirtualBox:~$ dpkg -l | grep xserver-xorg
ii xserver-xorg-core-hwe-18.04 2:1.20.5+git20191008-0ubun tu1~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.0 4 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-0ubun tu1~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-1ub untu1~18.0 4.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
For example:
https://linuxconfig.org/how-to-install-minimal-gnome-on-ubuntu-20-04-focal-fossa-linux
or
https://linuxconfig.org/how-to-install-gnome-on-ubuntu-20-04-lts-focal-fossa
More instruction exist there also for older ones like:
https://linuxconfig.org/how-to-install-gnome-on-ubuntu-18-04-bionic-beaver-linux
ASKER
springmvc@springmvc-VirtualBox:~/Doc uments/spr ingmvn$ 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.
ASKER
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:+UseStringDeduplicatio n --add-modules=ALL-SYSTEM -jar /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE//pl ugins/org. eclipse.eq uinox.laun cher_1.5.6 00.v201910 14-2022.ja r -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE/Spr ingToolSui te4 -name SpringToolSuite4 --launcher.library /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE//pl ugins/org. eclipse.eq uinox.laun cher.gtk.l inux.x86_6 4_1.1.1100 .v20190907 -0426/ecli pse_1801.s o -startup /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE//pl ugins/org. eclipse.eq uinox.laun cher_1.5.6 00.v201910 14-2022.ja r --launcher.overrideVmargs -exitdata 1008034 -product org.springframework.boot.i de.brandin g.sts4 -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion =1.8 -Xms256m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplicatio n --add-modules=ALL-SYSTEM -jar /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE//pl ugins/org. eclipse.eq uinox.laun cher_1.5.6 00.v201910 14-2022.ja r
5660 ? Sl 0:36 /usr/lib/jvm/java-11-openjdk-amd64/b in/java -cp /home/springmvc/Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE/plu gins/org.s pringframe work.tooli ng.boot.ls _1.15.0.20 2001210741 /servers/s pring-boot -language- server/BOO T-INF/clas ses:/home/ springmvc/ Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE/plu gins/org.s pringframe work.tooli ng.boot.ls _1.15.0.20 2001210741 /servers/s pring-boot -language- server/BOO T-INF/lib/ * -Dsts.lsp.client=eclipse -Dlsp.completions.indentat ion.enable =true -Xmx1024m -XX:TieredStopAtLevel=1 -noverify -Dspring.config.location=f ile:/home/ springmvc/ Downloads/ spring-too l-suite-4- 4.5.1.RELE ASE-e4.14. 0-linux.gt k.x86_64/s ts-4.5.1.R ELEASE/plu gins/org.s pringframe work.tooli ng.boot.ls _1.15.0.20 2001210741 /servers/s pring-boot -language- server/BOO T-INF/clas ses/applic ation.prop erties org.springframework.ide.vs code.boot. app.BootLa nguagServe rBootApp --languageserver.hover-tim eout=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/passw d -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/T ype1/,/usr /X11R6/lib /X11/fonts /Speedo/,/ usr/X11R6/ lib/X11/fo nts/misc/, /usr/X11R6 /lib/X11/f onts/75dpi /,/usr/X11 R6/lib/X11 /fonts/100 dpi/,/usr/ share/font s/X11/misc /,/usr/sha re/fonts/X 11/Type1/, /usr/share /fonts/X11 /75dpi/,/u sr/share/f onts/X11/1 00dpi/ -co /etc/X11/rgb
9310 tty2 Sl+ 3:27 /usr/bin/java -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.defau lt=@user.h ome/eclips e-workspac e -XX:+UseG1GC -XX:+UseStringDeduplicatio n --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion =1.8 -Dosgi.dataAreaRequiresExp licitInit= true -Xms256m -Xmx1024m --add-modules=ALL-SYSTEM -jar /snap/eclipse/40//plugins/ org.eclips e.equinox. launcher_1 .5.300.v20 190213-165 5.jar -data /home/springmvc/Documents/ springmvn -os linux -ws gtk -arch x86_64 -showsplash /snap/eclipse/40//plugins/ org.eclips e.epp.pack age.common _4.11.0.20 190314-120 0/splash.b mp -launcher /snap/eclipse/40/eclipse -name Eclipse --launcher.library /snap/eclipse/40//plugins/ org.eclips e.equinox. launcher.g tk.linux.x 86_64_1.1. 1000.v2019 0125-2016/ eclipse_18 01.so -startup /snap/eclipse/40//plugins/ org.eclips e.equinox. launcher_1 .5.300.v20 190213-165 5.jar --launcher.appendVmargs -exitdata 1558008 -product org.eclipse.epp.package.ja va.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion =1.8 -Dosgi.instance.area.defau lt=@user.h ome/eclips e-workspac e -XX:+UseG1GC -XX:+UseStringDeduplicatio n --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion =1.8 -Dosgi.dataAreaRequiresExp licitInit= true -Xms256m -Xmx1024m --add-modules=ALL-SYSTEM -jar /snap/eclipse/40//plugins/ org.eclips e.equinox. launcher_1 .5.300.v20 190213-165 5.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/aut ostart
1131 tty1 Sl+ 0:00 /usr/lib/gnome-session/gnome-session -binary --autostart /usr/share/gdm/greeter/aut ostart
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=u buntu 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/
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