How to fix tightvncserver grey screen?

303 views Asked by At

How to fix tightvncserver grey screen ?

Server I using Ubuntu 22.04, tightvncserver. Client I using MacOS, vncView. I used vncserver -list, and it show the error code

Couldn't start Xtightvnc; trying default font path. Please set correct fontPath in the vncserver script. Couldn't start Xtightvnc process.

I tryed to add xfonts-base, xfonts-100dpi, xfonts-70dpi, add the font directories, check the fontPath in the vncserver Script, check Hostname and /etc/hosts,

~/.vnc/xstartup:

#!/bin/sh

xrdb "$HOME/.Xresources"
#xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /etc/X11/xinit/xinitrc

/usr/bin/vncserver:

if (!$XFConfigPath) {
  foreach ("/etc/X11/xorg.conf", "/etc/X11/XF86Config-4", "/etc/X11/XF86Config" ){
      $XFConfigPath = $_;
      last if ( -e $XFConfigPath );
  }
}
if (!$fontPath) {
  &ReadXFConfigFont;
}
if (!$fontPath) {
  $fontPath = "/usr/share/fonts/X11/misc/,".
              "/usr/share/fonts/X11/Type1/,".
              "/usr/share/fonts/X11/75dpi/,".
              "/usr/share/fonts/X11/100dpi/"
}
if (!$colorPath) {
  &ReadXFConfigColor;
}
if (!$colorPath) {
  foreach ("/etc/X11/rgb", "/usr/share/X11/rgb", "/usr/X11R6/lib/X11/rgb"){
      $colorPath = $_;
      last if ( -e "${colorPath}.txt" );
  }
}
##########################################################

I have tried to modify xstartup, but it didn't work. Please tell me how to modify it if you can, or if there are other solutions.

0

There are 0 answers