Showing posts with label vnc. Show all posts
Showing posts with label vnc. Show all posts

Thursday, February 26, 2009

VNCSERVER: Couldn't find "xauth" on your PATH

Attempting to run vncserver as non-root user gives me this error:
couldn't find "xauth" on your PATH
So I do a search for xauth:
find / -name xauth
which finds it in /usr/X11/bin

Also, knowing that when logged on as root I don't get this problem, I assume that root must have this in its path so I log on as root and run:
echo $PATH
This confirms that /usr/X11/bin is in the root users path.

I Log out of root session and add xauth to path:
PATH=$PATH:/usr/X11/bin && export PATH

vncserver now runs successfully but with some errors referring to permissions on the ~./vnc & ~./Xauthority folders.

For some reason root:root is owner of the .vnc in my root folder, presumably because I had run vncserver initially while su'ed from my non-root users session...

So:
pfexec -R marc:staff ~/.vnc
pfexec -R marc:staff ~/.Xauthority
Sorts that out!

vncserver -kill :1
vncserver
and all is working great!

Tuesday, February 24, 2009

Using VNC Server on Opensolaris

To set the VNC server password:
vncpasswd

To start VNC server:
vncserver
note the display number, i.e.: myserver:1 = display 1


Connect to the VNC server:

From the VNC client, use the following syntax: servername:display number.  I.E.: for a server called "myserver" with VNC server running on display 1:
myserver:1

To stop VNC server:
vncserver -kill :[display number]
i.e.: to stop display 1:
vncserver -kill :1

Enable gnome desktop:

Using your favourite text editor edit the/.vnc/xstartup file in your home folder:
vi ~/.vnc/xstartup
disable TWM (Timeless Window Manager) by commenting out:
#twm &
Add the following lines at the end:
unset SESSION_MANAGER
gnome-session & 
"unset SESSION_MANAGER" disables gnomes check for other session managers.  "gnome-session &" starts the gnome desktop.


My xstartup file:
#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &
unset SESSION_MANAGER
gnome-session &