Installing VNC server on Solaris 11

I tend to forget the exact command line for installing VNC on Solaris 11.

VNC isn't installed by default:

# vncserver
-bash: vncserver: command not found


But it is in the repository. (You need to use the --accept option because java/jre-7  requires BCL License acceptance )

# pkg install --accept solaris-desktop
           Packages to install: 463
           Mediators to change:   1
            Services to change:  16
       Create boot environment:  No
Create backup boot environment:  No
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            463/463   68277/68277  729.0/729.0  6.2M/s

PHASE                                          ITEMS
Installing new actions                   104012/104012
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           2/2
You have new mail in /var/mail/root


Now the VNC server is installed:

$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth:  file /home/jeff/.Xauthority does not exist

New 'my-host:1 (root)' desktop is my-host:1

Creating default startup script /home/jeff/.vnc/xstartup
Starting applications specified in /home/jeff/.vnc/xstartup
Log file is /home/jeff/.vnc/my-host:1.log


By default, you get the tiled window manager (twm), but I prefer Gnome.

# vi /home/jeff/.vnc/xstartup

At the bottom of xstartup, change "twm &" -to- "gnome-session &":

Kill the session running twm and restart with Gnome:

$ vncserver -kill :1
Killing Xvnc process ID 2392

$ vncserver

New 'my-host:1 (root)' desktop is my-host:1

Starting applications specified in /home/jeff/.vnc/xstartup
Log file is /home/jeff/.vnc/my-host:1.log


Now you're good to go. Visit the vncserver with a vncclient:

vnc.png

You may also want to review:

Hope this helps.

Comments:

This blog finishes with the system set up such that each user can ssh into the Solaris server and then start their own VNC server. The first user who starts VNC will have a server at port 5901. The second user who starts VNC will have a server at port 5902. And so on.

For additional steps to bring up a console at port 5900 with a login prompt, see http://unixed.com/blog/2014/09/setup-x11-access-to-the-solaris-gui-gnome-desktop/

Posted by guest on March 27, 2015 at 12:29 PM EDT #

Hi Guest,

Thanks for bringing this to my attention. I posted the following comment on Bill's blog.

If you set up the GDM graphical login, and a first user logins in, doesn't a second user have full access to the first user's session without any authentication or authorization? I'm not saying that vncpasswd is incredibly secure, but at least a second visitor is prompted for a password before they have 100% access the first user's session.

I think that is is better to allow each user to ssh into the box and launch their own vncserver. The first user who starts VNC will have a server at port 5901. The second user who starts VNC will have a server at port 5902. And so on. This approach allows multiple users to run independent graphical displays in parallel and also prevents users from accidentally using another user's session.

Jeff

Posted by Jeff on March 27, 2015 at 04:09 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jeff Taylor-Oracle

Search

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