vncserver has no xstartup file

fortytwo ulist at gs1.ubuntuforums.org
Fri Jan 28 10:29:12 UTC 2005


Ok, I finally got mine working, here's what I had to do.

First of all, I made some changes to my vnc.conf.  Notice that I mainly
just uncommented a few things and wrote some lines following his
examples of things that seem like they should be in there, such as the
authority file, etc.  The main change I made was doing:
$vncStartup = "/home/brian/.vnc/xstartup"; 
instead of:
$vncStartup = /etc/X11/Xsession";

My username is brian, so swap where applicable if you copy it, here's
what the file looks like:


Code:
--------------------
    
  # /etc/vnc.conf written by Marcus Brinkmann. This file is in the Public Domain.
  #
  # This is the configuration file for the vncserver package.
  # It is perl syntax, but only variable assignment is allowed.
  # A semicolon will be added if missing.
  # Every value has suitable defaults, so you probably don't need any file.
  #
  # This file will be sourced by `vncserver' and `vncpasswd'.
  # After this file, $(HOME)/.vncrc will be sourced, so values can be
  # overwritten on a per-user basis. If you want to reactivate the default
  # value there, you have to specify an empty value. For example, $fontPath
  # will set to the default value after
  #
  # $fontPath = "/foo";
  # $fontPath = "";
  #
  # If you are missing something, please let me know.
  # Marcus.Brinkmann at ruhr-uni-bochum.de
  
  # System configuration
  # --------------------
  #
  # This section contains entries that should be true for all users.
  
  # $vncClasses should be the path to the java classes of server.
  # $vncClasses = "/usr/share/vncserver";
  
  # $XFConfigPath   can be set to the global XF86Config file. This will be
  #                 parsed to gain default values for $fontPath and $colorPath.
  #                 If you want to disable this feature, point it to an
  #                 invalid file, "/foo" for example.
  # $XFConfigPath = "/etc/X11/XF86Config";
  
  # $fontPath should be a comma seperated list of fonts to be added to the font
  #           path. If not specified, and $XFConfigPath is valid, vncserver
  #           will read the $fontPath from there. If both are not set, the
  #           default will apply.
  # Example: $fontPath = "tcp/localhost:7100";     # would make vnc to use xfs.
  # Example: $fontPath = "";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/misc/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/Type1/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/Speedo/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/freefont/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/sharefont/";
  # I don't know what the default is, though.
  
  # $colorPath should be the RGB file to be used by X. This can also be taken from
  #            XF86Config file if specified by $XFConfigPath
  # $colorPath = "/usr/X11R6/lib/X11/rgb";
  
  # User configuration
  # ------------------
  #
  # This section contains entries that may change from user to user.
  
  # $vncUserDir contains the filename for the log files directory of Xvnc
  #             (the server) and the viewers that are connected to it.
  # $vncUserDir = "$ENV{HOME}/.vnc";
  
  # $vncPasswdFile contains the filename of the password file for Xvnc.
  # $vncPasswdFile = $vncUserDir . "/passwd";
  
  # $vncStartup points to a script that will be started at the very beginning.
  # $vncStartup = "/etc/X11/Xsession";
  $vncStartup = "/home/brian/.vnc/xstartup";
  
  # $xauthorityFile should be the path to the authority file that should be used
  #                 by your vnc X server.
  $xauthorityFile = "$ENV{HOME}/.Xauthority";
  
  # $defaultDesktopName should be set to the default name of the desktop.
  #                     This can be changed at the command line with -name.
  # $defaultDesktopName = "X";
  
  # $geometry sets framebuffer width & height. Default will be calculated if
  #           server is started from within a running X servers. Can be changed at
  #           the commandline (-geometry). A fixed default will be used if
  #           vncserver is not invoked in a running X session.
  # Example:  $geometry ="640x480";
  $geometry = "1024x768";
  
  # $depth       sets the framebuffer color depth. Must be between 8 and 32.
  # $pixelformat sets the default pixelformat.
  #              The default will be calculated if none of both is specified
  #              and when vncserver is called from within a running X servers.
  #              Can be changed at the command line with option -depth.
  #              A fixed default value will be used if vncserver is not
  #              invoked in a running X session.
  # Example:  $depth = "16";
  #           $pixelformat = "rgb565";
  #depth = "16";
  $pixelformat = "rgb656";
  
  # $getDefaultFrom sets the display from which you can query the default of
  #                 the above three options, if you don't want to start vncserver
  #                 from within a running X server. It will be added to the call
  #                 of xdpyinfo.
  #                 It is useful to get the default from the X server you will
  #                 run xvncviewer in.
  # Example:  $getDefaultFrom = "-display localhost:0"
  
  # $rfbwait sets the maximum time in msec to wait for vnc client viewer.
  # $rfbwait = "120000";
  # /etc/vnc.conf written by Marcus Brinkmann. This file is in the Public Domain.
  #
  # This is the configuration file for the vncserver package.
  # It is perl syntax, but only variable assignment is allowed.
  # A semicolon will be added if missing.
  # Every value has suitable defaults, so you probably don't need any file.
  #
  # This file will be sourced by `vncserver' and `vncpasswd'.
  # After this file, $(HOME)/.vncrc will be sourced, so values can be
  # overwritten on a per-user basis. If you want to reactivate the default
  # value there, you have to specify an empty value. For example, $fontPath
  # will set to the default value after
  #
  # $fontPath = "/foo";
  # $fontPath = "";
  #
  # If you are missing something, please let me know.
  # Marcus.Brinkmann at ruhr-uni-bochum.de
  
  # System configuration
  # --------------------
  #
  # This section contains entries that should be true for all users.
  
  # $vncClasses should be the path to the java classes of server.
  # $vncClasses = "/usr/share/vncserver";
  
  # $XFConfigPath   can be set to the global XF86Config file. This will be
  #                 parsed to gain default values for $fontPath and $colorPath.
  #                 If you want to disable this feature, point it to an
  #                 invalid file, "/foo" for example.
  # $XFConfigPath = "/etc/X11/XF86Config";
  
  # $fontPath should be a comma seperated list of fonts to be added to the font
  #           path. If not specified, and $XFConfigPath is valid, vncserver
  #           will read the $fontPath from there. If both are not set, the
  #           default will apply.
  # Example: $fontPath = "tcp/localhost:7100";     # would make vnc to use xfs.
  # Example: $fontPath = "";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/misc/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/Type1/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/Speedo/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/freefont/,";
  #       $fontPath .= "/usr/X11R6/lib/X11/fonts/sharefont/";
  # I don't know what the default is, though.
  
  # $colorPath should be the RGB file to be used by X. This can also be taken from
  #            XF86Config file if specified by $XFConfigPath
  # $colorPath = "/usr/X11R6/lib/X11/rgb";
  
  # User configuration
  # ------------------
  #
  # This section contains entries that may change from user to user.
  
  # $vncUserDir contains the filename for the log files directory of Xvnc
  #             (the server) and the viewers that are connected to it.
  # $vncUserDir = "$ENV{HOME}/.vnc";
  
  # $vncPasswdFile contains the filename of the password file for Xvnc.
  # $vncPasswdFile = $vncUserDir . "/passwd";
  
  # $vncStartup points to a script that will be started at the very beginning.
  # $vncStartup = "/etc/X11/Xsession";
  $vncStartup = "/home/brian/.vnc/xstartup";
  
  # $xauthorityFile should be the path to the authority file that should be used
  #                 by your vnc X server.
  $xauthorityFile = "$ENV{HOME}/.Xauthority";
  
  # $defaultDesktopName should be set to the default name of the desktop.
  #                     This can be changed at the command line with -name.
  # $defaultDesktopName = "X";
  
  # $geometry sets framebuffer width & height. Default will be calculated if
  #           server is started from within a running X servers. Can be changed at
  #           the commandline (-geometry). A fixed default will be used if
  #           vncserver is not invoked in a running X session.
  # Example:  $geometry ="640x480";
  $geometry = "1024x768";
  
  # $depth       sets the framebuffer color depth. Must be between 8 and 32.
  # $pixelformat sets the default pixelformat.
  #              The default will be calculated if none of both is specified
  #              and when vncserver is called from within a running X servers.
  #              Can be changed at the command line with option -depth.
  #              A fixed default value will be used if vncserver is not
  #              invoked in a running X session.
  # Example:  $depth = "16";
  #           $pixelformat = "rgb565";
  #depth = "16";
  $pixelformat = "rgb656";
  
  # $getDefaultFrom sets the display from which you can query the default of
  #                 the above three options, if you don't want to start vncserver
  #                 from within a running X server. It will be added to the call
  #                 of xdpyinfo.
  #                 It is useful to get the default from the X server you will
  #                 run xvncviewer in.
  # Example:  $getDefaultFrom = "-display localhost:0"
  
  # $rfbwait sets the maximum time in msec to wait for vnc client viewer.
  # $rfbwait = "120000";
  
--------------------


Secondly, my xstartup file looks like this:

Code:
--------------------
    
  #!/bin/sh
  
  unset SESSION_MANAGER
  exec /etc/X11/xinit/xinitrc
  
--------------------


The final problem I had was that, in all of my editing, xinitrc and
xstartup had lost execute perms, so make sure to do a chmod a+x on
those two files.  Should work!


-- 
fortytwo




More information about the ubuntu-users mailing list