Sunday Jul 06, 2008

Script to Configure VNC Server in Solaris 10 5/08 and Solaris Express (Nevada)

I have been using a script for a while to configure VNC server displays for Solaris Express (Nevada) and I just found out that the same script works on Solaris 10 5/08 (Solaris 10 Update 5) as it includes Xvnc also.

I always do a  full install of Solaris. If you don't, then maybe Xvnc will not be installed on your system. You can easily check:

# pkginfo | grep  xvnc
system      SUNWxvnc                         X11/VNC server

You run the below script once after OS installation is complete. It sets up two VNC displays and you connect to them with a  VNC client as <hostname>:1 and <hostname>:2 . The second display is shared.

#!/bin/sh
#
# config_Xvnc_s10+snv.sh
#
# Run this script once after OS installation is completed.
#
# This has been tested with Solaris 10 5/08 and Solaris Express (Nevada) b87 onwards
#

#add vnc display 1
svccfg -s application/x11/x11-server add display1
svccfg -s application/x11/x11-server:display1 addpg options application
svccfg -s application/x11/x11-server:display1 addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display1 addpropvalue options/server_args astring: '"SecurityTypes=None"'

#add vnc display 2, which is shared
svccfg -s application/x11/x11-server add display2
svccfg -s application/x11/x11-server:display2 addpg options application
svccfg -s application/x11/x11-server:display2 addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display2 addpropvalue options/server_args astring: '"SecurityTypes=None"'
svccfg -s application/x11/x11-server:display2 addpropvalue options/server_args astring: '"-alwaysshared"'

# Configure dtlogin to start it
if [ ! -d /etc/dt/config ] ; then
        mkdir -p /etc/dt/config
fi
if [ ! -f /etc/dt/config/Xservers ] ; then
        cp /usr/dt/config/Xservers /etc/dt/config/Xservers
fi

echo "   :1   Local local_uid@none root /usr/X11/bin/Xserver :1" >> /etc/dt/config/Xservers
echo "   :2   Local local_uid@none root /usr/X11/bin/Xserver :2" >> /etc/dt/config/Xservers

pkill -HUP dtlogin

#End

The displays persist when you disconnect the VNC client, so you can come back to a session at  later time and all the windows and applications will be as you left them. Any jobs you kicked off will have continued to run.

You can get VNC client software from http://www.realvnc.com. There is a Free Edition and an enhanced Personal Edition for which you need a license.

If you have an older release of Solaris 10 than 5/08 then take a look at my earlier blog entry about how to configure VNC.

References: 1, 2

Saturday Sep 01, 2007

New SAMBA focused blog on blogs.sun.com

Jiri Sasek, one of the Engineers who maintains the version of SAMBA that ships with Solaris, has just started blogging. His first entry if all about how to set up a SAMBA Server as a client in an Active Directory Environment. Thanks Jiri!!

Sunday Aug 26, 2007

Doing More With SAMBA

SAMBA Logo

My personal SAMBA needs are simple and I doubt that I will be experimenting with any of the more complex configuration possibilities, such as ADS integration, unless a project demands it.

I will continue to blog about my work with SAMBA, but if you want to deploy more complex configurations than I do then there are books on SAMBA that you can buy or download. As a first port of call I suggest that you take a look at the Books section of the SAMBA Documentation page; it looks like most of the books listed can be downloaded for free if you wish. I read through some parts of SAMBA3-ByExample and really liked the approach it took. There is also the SAMBA3-HOWTO book.

If anyone has any personal recommendations about SAMBA related books and internet forums please add comments to this entry, Thanks :-)

Saturday Aug 25, 2007

SAMBA and SWAT in Solaris 10 Update 4 (Solaris 10 8/07)

I have previously blogged on how to enable SAMBA and SWAT as shipped with Solaris 10.

In Solaris 10 Update 4 (AKA Solaris 10 8/07 - available real soon now) Sun is shipping SAMBA 3.0.25a, and for the first time we are supporting SAMBA's Active Directory Service (ADS) integration.

What caught me out when I installed this new release of Solaris was that the way you stop and start SAMBA and SWAT have changed.

SAMBA processes are now managed using the Service Management Facility (SMF). You configure SAMBA as before, but to start the services you type:

root# svcadm enable samba wins

To stop SAMBA.........

root# svcadm disable samba wins

To check the status of the services....

root# svcs samba wins
STATE          STIME    FMRI
online         Aug_24   svc:/network/samba:default
online         Aug_24   svc:/network/wins:default

To enable SWAT you no longer have to edit any files, you just enable the service as below...

root# svcadm enable swat

And here is how to check the status of the service...

root# svcs swat
STATE          STIME    FMRI
online         Aug_23   svc:/network/swat:default

You still connect to SWAT on port 901, just point your browser at http://servername:901.

Monday Jul 09, 2007

Update on VNC and Solaris 10

[Update July 6 2008: If you are running Solaris 10 5/08 (Solaris 10 Update 5) or later then go here.]

In an old blog entry I went through the process of how to set up VNC on Solaris 10, or rather, I referenced some work others have done.

I have recently been building a system with Solaris 10 11/06 (aka Solaris 10 Update 3) on a server and I decided to see if newer versions of the VNC packages I had previously used are available now. It turns out that they are, and that only two of the three previously required packages are now needed.

Here is what I did to ensure that I had the most up to date VNC packages:

  1. Downloaded the "old" packages and scripts via BigAdmin as previously described, and unpacked them.

  2. Downloaded the new SFWgcmn & SFWvnc packages from the Solaris 10 11/06 OS Companion Software DVD. You can go here and download the individual packages you need.

  3. Had a look at the unpacked software and replaced the instances of the old downloaded packages with the new ones.

  4. Modified the script configsol10vnc.ksh so that it only looked for SFWgcmn.pkg & SFWvnc.pkg..that is just a one line change...

    packages="SFWgcmn.pkg SFWgcc34l.pkg SFWvnc.pkg"

    Becomes....

    packages="SFWgcmn.pkg SFWvnc.pkg"

  5. I also hashed out this line in configsol10vnc.ksh with no ill effects:

    # fix_gnome_bug

You can now use the configsol10vnc.ksh script to install and configure VNC as before.

It is not vital that you do this, the old packages work fine, but it is always nice to have the latest stuff running..isn't it!

Wednesday Jul 04, 2007

First Encounter with EFI Disk Labels

Working with a Sun Fire x4500 server (running Solaris 10) last week, I was mystified by the "weird" look disk labels on the 500GB SATA disks. It turns out this was my first encounter with EFI disk labels!!

It is always strange when something you are completely familiar with changes radically, so if you find yourself in the same puzzled position as I was, take a look at the Solaris System Administration Guide:Devices and File Systems. I found pages 189-191 & 195 particularly helpful, they explain the old and new style disk labels and also how SPARC and x86 platforms differ.

About

Tim Thomas

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
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