Thursday, July 23, 2009

VNC & XDMP Configuration in OpenSolaris

My requirement was to be able to connect my VNC client to a system running OpenSolaris 2009.06 and to be able to login as root.

1. Check that the VNC Server is Installed

This should be present as it is part of the 2009.06 binary distribution, but I checked anyway.


# pkg info SUNWxvnc
Name: SUNWxvnc
Summary: X11/VNC server
State: Installed
Authority: opensolaris.org (preferred)
Version: 4.1.3
Build Release: 5.11
Branch: 0.111
Packaging Date: Fri Jun 13 17:49:25 2009
Size: 3.66 MB
FMRI: pkg:/SUNWxvnc@4.1.2,5.11-0.91:20080613T174925Z

2. Add this line to /etc/services

vnc-server 5900/tcp # Xvnc

3. Edit /etc/X11/gdm/custom.conf as below

[xdmcp]
Enable=true
[security]
DisallowTCP=false
AllowRoot=true
AllowRemoteRoot=true

4. Enable the Services

# svcadm enable xvnc-inetd
# svcs xvnc-inetd
STATE STIME FMRI
online 16:22:30 svc:/application/x11/xvnc-inetd:default
# svcadm enable gdm
# svcs gdm
STATE STIME FMRI
online 14:43:13 svc:/application/graphical-login/gdm:default

5. Connect to the Display with a VNC Client


You should now be able to connect to :5900 and you should see the gdm login screen.


If you cannot connect, try stopping & starting the services:

# svcadm disable xvnc-inetd gdm
# svcadm enable xvnc-inetd gdm

6. Making the Session Persist

This may or may not be desirable for you, but if you want the VNC session to persist if you exit the VNC client then do the following:

# svccfg -s xvnc-inetd

svc:/application/x11/xvnc-inetd> editprop

This take you into a vi session. Look for the line...

#setprop inetd/wait = boolean: false

Copy the line, uncomment it and set it to true. Save the file, exit svccfg and run the command...

# svcadm refresh xvnc-inetd

7. To set the VNC password just use the vncpasswd command:

pfexec vncpasswd /etc/X11/.vncpasswd


Then

Stop and restart the service:

svcadm disable xvnc-inetd gdm
svcadm enable xvnc-inetd gdm


Connect again with you VNC client. Now, when you exit/kill the VNC client, the session on the server will persist and you will be able to connect to it again.

9 comments:

Nitish Kumar said...

Good to see your blog. Just got to see your comment on jkites.

I was thinking that there are lesser people from JK out there giving their voices to this medium. Good approach and ways with which you are writing.

My suggestion is to keep the content and HTML Code behind more neater. Use Windows Live Writer. Its free and best out there.

Rest.. my best wishes with you.

Nitish Kumar
http://nitishkumar.wordpress.com

Unknown said...

Great tutorial... Thanks.

But, (open)solaris has /etc/services linked to /etc/inet/services (that is proper location).
I think it is worth to mention.

Best regards.

Selachimorpha said...

Thanks for the quick response
Infoligabola.org
Anekamasakan.web.id
Ligaindonesia.asia
Ligabolainggris.com
Absolutebsblog.net

Selachimorpha said...

I hope you're having a great week
Agen Judi Bola Joker338
Bandar Judi Bola Joker338
Situs Serverbola Online
Sbobet Online
Taruhan Bola di Joker338

culicidae said...

I hope you're having a wonderful day
Judi Bola di Serverbola
Judi Bola di Joker338
Judi Bola di Agen Joker338
sbobet online
taruhan sbobet online

culicidae said...

I hope you're having a great week
Berita Liga Bola
Aneka Masakan
Liga Indonesia
Liga Bola Inggris
Judi Bola

Odobenus rosmarus said...

Thanks for the quick response
Liga Spanyol
Chocolate Blog
Judi Online
Deposit Judi Online
Judi Bola

Odobenus rosmarus said...

I hope you're doing well
Jenis Game Android
Judi Over Under
Wisata Kota Tua
Sejarah Anjing
Bandar Joker338

Odobenus rosmarus said...

I hope you're having a great week
Situs Judi Bola Joker338
Agen Judi Bola Joker338
Judi Bola di Serverbola
Sbobet
Judi Bola di Joker338
Agen Sbobet Terpercaya