• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3617
  • Last Modified:

vnc server will not start automatically xauth not in the path error

I get an error on my console when booting my Solaris 8 sparc system (it shows briefly) XAUTH path error.
vncserver will not start automatically.

However vncserver will run no problem
#/etc/rc2.d/S99vncserver start

S99vncserver contains a line:
perl /usr/local/bin/vncserver :1 -name root

#which xauth

#echo $PATH

So it looks like at boot time Solaris does not have the correct PATH prior to executing rc2.d/S99vncserver.

Francois Koutchouk
Francois Koutchouk
  • 7
  • 7
1 Solution
Brian UtterbackPrinciple Software EngineerCommented:
In Solaris 8, the directory /usr/openwin/bin is added to your path by xsession when you log into the X server. It is not on the default path. So, when your vncserver startup script runs at system boot time, /usr/openwin/bin is not on root's path, so vncserver cannot find the xauth executable. When you log in and run it manually, the path is inherited from your session, so it works then.

Just change the startup script to add /usr/openwin/bin to the path before starting the vncserver.
Francois KoutchoukCTOAuthor Commented:
Thanks.  Where do I make that change?
Brian UtterbackPrinciple Software EngineerCommented:

That assumes that /etc/rc2.d/S99vncserver is correctly set as a hard link to the above file.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Francois KoutchoukCTOAuthor Commented:
there is no /etc/init.d/vncserver  
The file is in /usr/local/bin/
S99vncserver has the line:
/usr/bin/perl /usr/local/bin/vncserver :1 -name root

I modified the lines system to include the path as follows:
system("/usr/openwin/bin/xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
system("/usr/openwin/bin/xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie");

but I still get the same error.
Any other thoughts?
Brian UtterbackPrinciple Software EngineerCommented:
If you have a file /etc/rc2.d/S99vncserver, you should also have a file /etc/init.d/vncserver and they should be hard links to one another. But actually it shouldn't hurt if you do not.

In any case, in the file /etc/rc2.d/S99vncserver, near the beginning, you need to add /usr/openwin/bin to the PATH environment variable and then export the variable. The S99vncserver file should be a bourne shell script, so you should be able to just add these lines to the script:

export PATH
Francois KoutchoukCTOAuthor Commented:
Thanks, based on your information I also added the path for Xvnc and the HOME
export PATH
export HOME

vncserver does come up automatically, and I can connect to it.  But there is no CDE UI -- just a grey screen and the Solaris mouse pointer.
Almost there... any thoughts?
Brian UtterbackPrinciple Software EngineerCommented:
You need to also start up the CDE window manager.  It is dtwm.

Look in /.vnc for a file called xstartup. You need to add a line to it that starts dtwm and puts it in the background:

dtwm &
Francois KoutchoukCTOAuthor Commented:
Thank you.
already contains
/usr/dt/bin/dtwm &

In the blade150:1.log I see the following:
Got connection from client
Protocol version 3.3
Pixel format for client
8 bpp, depth 6
true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
rfbProcessClientNormalMessage: ignoring unknown encoding type -239
<same as above> -223
<same as above> 16
<same as above> 15
Using hextile encoding for client
... and some more stuff

It may not be relevant, of course.
Brian UtterbackPrinciple Software EngineerCommented:
When you are connected to the vncserver, in another session run the ptree command and find the vncserver and the subtree with its children. Post that section of the ptree output.
Francois KoutchoukCTOAuthor Commented:
I launched the vnc client for user sol1a (grey screen, just a terminal session)
Then I started another vnc client and connected as user root (that works fine). In a terminal session I then issued the ptree command.
The output is listed in the code below
49    /usr/lib/sysevent/syseventd
57    devfsadmd
62    /usr/lib/picl/picld
142   /usr/sbin/rpcbind
166   /usr/sbin/inetd -s
  382   rpc.ttdbserverd
  476   rpc.rstatd
179   /usr/lib/nfs/statd
177   /usr/lib/nfs/lockd
194   /usr/sbin/syslogd
185   /usr/lib/autofs/automountd
  186   /usr/lib/autofs/automountd
202   /usr/sbin/cron
231   /usr/lib/power/powerd
218   /usr/lib/lpsched
212   /usr/sbin/nscd
236   /usr/lib/utmpd
246   /usr/sbin/vold
243   /usr/sadm/lib/smc/bin/smcboot
  244   /usr/sadm/lib/smc/bin/smcboot
264   /usr/lib/ab2/dweb/sunos5/bin/dwhttpd /usr/lib/ab2/dweb/data
  265   /usr/lib/ab2/dweb/sunos5/bin/dwhttpd /usr/lib/ab2/dweb/data
306   /usr/dt/bin/dtlogin -daemon
  316   /usr/openwin/bin/Xsun :0 -nobanner -auth /var/dt/A:0-TGaqMa
  317   /usr/dt/bin/dtlogin -daemon
    397   /bin/ksh /usr/dt/bin/Xsession
      407   /usr/openwin/bin/fbconsole
      446   /usr/dt/bin/sdt_shell -c       unset DT;      DISPLAY=:0;        /u
        449   -bash -c       unset DT;      DISPLAY=:0;        /usr/dt/bin/dtse
          459   /usr/dt/bin/dtsession
            461   dtwm
              581   /usr/dt/bin/dtexec -open 0 -ttprocid 2.196tZa 01 458 128963
                582   /usr/bin/admintool
            462   /usr/dt/bin/dtfile -geometry +700+0
              489   /usr/dt/bin/dtfile -geometry +700+0
            463   /usr/dt/bin/dthelpview -helpVolume Intromgr
            465   /usr/dt/bin/sdtperfmeter -f -H -t cpu -t disk -s 1 -name fppe
            771   /usr/dt/bin/dtexec -open 0 -ttprocid 1.196tZa 01 458 12896370
              772   /usr/dt/bin/dtscreen -mode blank
309   /usr/local/sbin/sshd
322   /usr/openwin/bin/fbconsole -d :0
376   /usr/lib/saf/sac -t 300
  379   /usr/lib/saf/ttymon
361   /usr/lib/snmp/snmpdx -y -c /etc/snmp/conf
  383   mibiisa -r -p 32792
377   /usr/lib/saf/ttymon -g -h -p blade150 console login:  -T sun -d /dev/cons
370   /usr/lib/dmi/snmpXdmid -s blade150
369   /usr/lib/dmi/dmispd
411   /usr/openwin/bin/speckeysd
447   /usr/dt/bin/dsdm
458   /usr/dt/bin/ttsession
467   /bin/ksh /usr/dt/bin/sdtvolcheck -d -z 5 cdrom,zip,jaz,dvdrom,rmdisk
  488   /bin/cat /tmp/.removable/notify467
1037  Xvnc :1 -desktop X -httpd /usr/local/vnc/classes -auth /home/sol1a/.Xauth
1045  xterm -geometry 80x24+10+10 -ls -title X Desktop
  1046  -sh
    1104  twm
1069  Xvnc :2 -desktop root -httpd /usr/local/vnc/classes -auth //.Xauthority -
1074  xterm -geometry 80x24+10+10 -ls -title root Desktop
  1075  -bash
    4301  -bash
      4537  -bash
        4876  ptree
1077  /usr/dt/bin/dtwm
1079  ttsession -s -d unix:2.0
  1377  /bin/sh -c dtfile -noview
    1378  dtfile -noview
      1381  dtfile -noview

Open in new window

Brian UtterbackPrinciple Software EngineerCommented:
Okay, it looks to me like the vncserver did not start up any child processes or run anything to get the session going.

Where did you get the vncserver package you are using?
Francois KoutchoukCTOAuthor Commented:
I downloaded it from www.sunfreeware.com.  The package is vnc-3.3.3r2-sol8-sparc-local.gz
vncserver runs just fine, ie. with CDE UI under the following conditions when launched at startup or manually and vnc client logs in as root
(I launch two a :1 for sol1a and :2 for root in S99vncserver)
In other words, :2 works fine.

Looking further into the problem, I am wondering if it isn't related to something else.  When I get to the console (not often), upon login as sol1a, the screen turns weird: mouse but dark screen, with the CPU meter occasionally popping in the upper left corner.  Login as root works fine, with CDE UI.

In other words, maybe the fact I do not see the UI is caused by a UI problem with the useraccount itself.
Is there an easy way to "reset" the user UI to "default" so that I can see if it also solves the vncserver problem?
Brian UtterbackPrinciple Software EngineerCommented:
You could delete the .dt directory in the home directory.

In general, it is a bad idea to have a gui session running as root. It is better to have another user and then su to root in the xterm sessions as necessary.
Francois KoutchoukCTOAuthor Commented:
I never solved my problem fully.  But with the information provided by BLU in his/her multiple answers, I believe others will have more luck.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now