0

The computer that I am trying to connect to using vncviewer is a Ubuntu 18.04 system with dash-to-panel gnome extension.

When I used the first .vnc/xstartup , I only got black screen once connected.

When I used the second .vnc/xstartup , I got a nautilus file manager once connected and I could open pdf using evince by double-clicking on the pdf file itself. BUT I cannot open gedit by double-clicking on the text file itself as well as open terminal using right click menu. Why ?

enter image description here

I got the following journalctl log when I issued ssh destination_computer_username@destination_computer_ip_addr "DISPLAY=:2 nohup gnome-terminal" on my source computer terminal

Dec 20 14:06:13 UbuntuHW15 dbus-daemon[4137]: [session uid=1000 pid=4137] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.352' (uid=1000 pid=13704
Dec 20 14:06:13 UbuntuHW15 systemd[4111]: Starting GNOME Terminal Server...
Dec 20 14:06:13 UbuntuHW15 gnome-terminal-server[13707]: Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Dec 20 14:06:13 UbuntuHW15 gnome-terminal-server[13707]: Failed to parse arguments: Cannot open display:
Dec 20 14:06:13 UbuntuHW15 systemd[4111]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Dec 20 14:06:13 UbuntuHW15 systemd[4111]: gnome-terminal-server.service: Failed with result 'exit-code'.
Dec 20 14:06:13 UbuntuHW15 systemd[4111]: Failed to start GNOME Terminal Server.

First .vnc/xstartup

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

gnome-wm&
metacity&

Second .vnc/xstartup

# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
  • What do you want to happen? – Michael Prokopec Dec 20 '18 at 3:14
  • @MichaelProkopec I cannot edit text files using gedit !!!!!! Do you understand ? the gedit won't open even I double-click on the text file. Same applies to gnome-terminal. Strangely, I can open pdf using evince though – kevin998x Dec 20 '18 at 3:15
  • 1
    You might want to look into why gnome-panel, gnome-settings, metacity and nautilus are listed at the bottom of the one that is close to working. You might try adding gedit and gnome-terminal or just use the whole gnome-session. Keep calm and carry on... – Michael Prokopec Dec 20 '18 at 3:24
  • @MichaelProkopec adding gnome-session & prior to gnome-panel & does not solve the issue – kevin998x Dec 20 '18 at 3:30
  • Interesting... What is the computer you are connecting from running? – Michael Prokopec Dec 20 '18 at 3:40

Your Answer

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

Browse other questions tagged or ask your own question.