Thursday Jun 12, 2008

A simple VNC step-by-step experience on OpenSolaris

VNC is really a good tool for sharing desktops to your remote peers.
The following is my personal experience with VNC on OpenSolaris. I am
running OpenSolaris build 86. It should be the same case in other
builds.


1.
Check the binaries I am using:

$ which vncserver

/usr/bin/vncserver

$ which vncviewer

/usr/bin/vncviewer


2.
I add a new user "vncuser" with "Basic Solaris User" privilege.
(This step is just my personal favor. But it helps you to have a clean
test environment.)

# users-admin


3.
Try the first run.

$ su - vncuser

$ vncserver


Some files will be created in $HOME/.vnc/ directory, including "xstartup".

Connect to the vncserver.

$ vncviewer localhost:1


A VNC desktop window appears.


4.
The default window manager seems not that good. Edit the file
"xstartup" to use JDS desktop. Comment all lines, and add
"gnome-session" to it.

$ cat xstartup

#!/bin/sh


#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

#xsetroot -solid grey

#vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

#twm &

gnome-session


5.
Run vncserver again. This time I specify more options to customize
it a bit. (Check manpage vncserver(1) for details of the options.)

$ vncserver :16 -alwaysshared -deferupdate 100 -geometry 1024x768 -depth 16


Run vncviewer:

$ vncviewer localhost:16


I then see a nice desktop window appears.


BTW, to kill the VNC servers that are run above, just type:

$ vncserver -kill :1

$ vncserver -kill :16

About

Colin Zou is a software engineer enjoying improving operating systems. Besides sitting at a computer all day like a dull boy, he also likes hiking and the activities on the beach.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today