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

Posted on 2008-11-11
Medium Priority
Last Modified: 2013-12-27
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.

Question by:Francois Koutchouk
  • 7
  • 7
LVL 22

Expert Comment

by:Brian Utterback
ID: 22938882
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.

Author Comment

by:Francois Koutchouk
ID: 22943079
Thanks.  Where do I make that change?
LVL 22

Expert Comment

by:Brian Utterback
ID: 22943419

That assumes that /etc/rc2.d/S99vncserver is correctly set as a hard link to the above file.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

by:Francois Koutchouk
ID: 22943913
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?
LVL 22

Accepted Solution

Brian Utterback earned 1000 total points
ID: 22944072
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

Author Comment

by:Francois Koutchouk
ID: 22945785
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?
LVL 22

Expert Comment

by:Brian Utterback
ID: 22946438
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 &

Author Comment

by:Francois Koutchouk
ID: 22946888
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.
LVL 22

Expert Comment

by:Brian Utterback
ID: 22948100
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.

Author Comment

by:Francois Koutchouk
ID: 22951938
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

LVL 22

Expert Comment

by:Brian Utterback
ID: 22952988
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?

Author Comment

by:Francois Koutchouk
ID: 22953167
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?
LVL 22

Expert Comment

by:Brian Utterback
ID: 22953543
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.

Author Closing Comment

by:Francois Koutchouk
ID: 31515843
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.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question