Exotic Ideas..
Angad's Blog
About this blog
I am Angad Singh. I have served as the Sun Campus Ambassador of JIIT University, Noida (India) from August 2007 to July 2008 and as a Campus Ambassador Tech Lead from July 2008 to July 2009. This was my sun blog. Here I jotted down all my random scribblings, reports on all activities I conducted as CA at my university, my little projects, hacks, geeky stuff and new technology I came across, all the way to things I learnt in my exciting journey with Sun..
About Me
View Angad Singh's profile on LinkedIn
Technorati Authority
View blog authority
Subscribe
Search

10 Recent Entries
Archives
« February 2010
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
      
       
Today
Links
My..
Blogs that interest me
 

Today's Page Hits: 549

Best Viewed in..

Mozilla Firefox

Locations of visitors to this page
« JumpStart Workshop... | Main | Campus Ambassador... »
Thursday Jan 31, 2008
Instant Thin-Client Access to Solaris from Windows!
These are my notes on a recent experience I've had which required me to get Solaris up and running on 47 systems in our computer lab on a very short notice. I'm posting on it on my blog in order to document this effort in the form of a step by step guide so that it may help other sun campus ambassadors or anyone else who ever happens to fall in a similar situation.

The Problem

Let me make the problem clearer. You have to get solaris running on all these systems (having only Windows XP installed) and you neither have enough time in your hands nor the permission to install Solaris on all of them. Oh, and they don't have CD/DVD drives, so booting Live CD's like Belenix is not an option either.

Possible Solutions

There are lot many ways to do this. These are the possible solutions that came to my mind that time:

  1. Network Installation of Solaris- Solaris 10 provides a lot of ways to do a automated network installation of Solaris on many machines having the same or even different hardware configuration: Web Start, Custom JumpStart Instalation, Solaris Flash Archives, etc. (Note that this is not an option if you're not permitted to install Solaris or if the target systems don't meet the hardware requirements of Solaris)
  2. Booting a Live CD: The simplest solution (if the target systems do have CD/DVD drives) is to burn a lot of copies of Belenix, Nexenta or Schillix LiveCD's and to boot all the systems off of them.
  3. Booting Solaris from USB drives: This is something that was accomplished by one of the very active and successful campus ambassadors of last year, Anil Gulecha, who is now our Tech Lead :). He was the first CA to make such a great contribution to the OpenSolaris community.
  4. Booting a Live CD's ISO over the network: This is one of the more trickier ways. This goes one step ahead of just booting the systems off of live cd's, to first network booting the Solaris GRUB on all the systems, mounting the live cd's iso (eg. belenix) from the network (via NFS / FTP / etc.) and then booting from the network mounted ISOs. This would however require a lot of Network bandwidth and good I/O speed on the server as all these systems would repeatedly access data over the network from the server for almost each and every action, application opened, and command run.
  5. Remote Desktop Sessions using a Windows X-Server/XDMCP client, to a Solaris VM running on a high-end windows server (i.e. Instant Thin-Client Access to Solaris from within Windows!)

The last solution is the one I finally used. Its IMHO, the easiest and most elegant solution involving no software installation / tricky stuff on the client systems at all. It does not put any load on the clients and puts very little load on the server. It involves the following steps...

  1. Installation of Solaris inside a Virtual Machine:
    Here's a step-by-step guide (PDF with screenshots) for configuring a virtual machine and installing Solaris 10 on it. At the end you'll be able to run the virtual machine inside VMware Workstation 5.5 or inside VMware Player 1.0.

    OR

    Download the Solaris Virtual Appliance, a preinstalled, fully configured virtual machine made available by SDN.

    Notes:
    • Set connection mode to "Bridged mode" in the VM. (in my case the VM got an IP address automatically by DHCP. If there is no DHCP in your network, then you may have to set the IP address settings yourself using ifconfig in Solaris)



    • You might also want to install VMware Tools for Solaris 10, which provides more ease of use with the virtual machine - copy/paste functionality, leave and enter the VM window without pressing Ctrl+Alt, etc.

  2. Configure XDMCP on the Solaris server:
    There are many ways of doing it (both GUI and console). Its so much simpler than doing the same thing on Linux (no painful textfile manipulation!). Make sure you are logged in as root.

    Using the console:
    1. Open a terminal
    2. Type gdmsetup
    3. A dialog box will appear, go to the XDMCP tab and click the box that says "Enable XDMCP"
    4. Configure all the relevant options like maximum number of connections, time limit, etc.

    Using GUI (Java Desktop System):



    1. Launch -> Applications -> Utilities -> Administration -> Login Screen Setup
    2. Go to the XDMCP tab and click the box that says "Enable XDMCP".
    3. Configure all the relevant options like maximum number of connections, time limit, etc.

      Note: Please remember the XDMCP port you set here (default is 177) and make sure it is not blocked by the firewall on the client systems.
          Finally, restart your system (in this case the virtual machine) for the settings to take effect.
  1. Creating users on the Solaris VM for the remote sessions:

    Now that we have a Solaris virtual machine up and ready, we need to create some users in it, which we will use for concurrently connecting the remote sessions from the many client systems. To do that, follow these simple steps:

    1. Make sure you are logged in as Root.
    2. Open a terminal and run the command 'smc' to open the Sun Management Console.



    3. Once the Sun Management Console screen shows up, select This Computer from the list



    4. Under Navigation, go to System Configuration > Users > User Accounts.



    5. Right click anywhere in the main window > Add Multiple Users > With Wizard..



    6. Now the Add Multiple Users Wizard starts up.



      Choose the 3rd option: "Automatically generate a series of user names"

    7. Step 2:



    8. Step 3:



    9. Step 4:



    10. Step 5:


      5
    11. Step 6:



    12. Step 7:



    13. Step 8:



    14. Step 9:



    15. Step 10:



    16. Thats it. Solaris automatically creates N number of users with preconfigured settings for us in the background :)
  1. Choose and install a good X Server port for windows:
    The Solaris graphics system (gnome, JDS, etc.) uses the X windows client-server architecture. X windows is as equally at home across the network as it is on a local machine and thus all we need to connect remotely to our Solaris system from Windows is a good X windows server ported to windows. There are many open source as well as commercial X server ports available for windows.

    Following is a short list I know of:

I chose Xming owing to its simplicity and easy of use. All you have to do is download it from its SourceForge.net project page and follow the simple installation wizard (which creates icons for you on your desktop and start menu).

Note: We will install Xming only on one machine. After installation, copy all the files from the Xming installation folder (default: "C:\Program Files\Xming") to a folder on your desktop, and then you may even uninstall Xming. We will simply share this folder over the network, so that the client systems can open the share and run Xming directly (without installation).

  1. Using XMing to do Solaris on Windows Magic
    • Simple XDMCP session to the remote Solaris VM
      1. Start the Solaris virtual machine on the server system
      2. Open a terminal and type ifconfig -a to get the IP address of the system. Note this IP address.
      3. Share the installed Xming folder obtained in step 3
      4. On a client system, open the network shared folder.
      5. Run Xlaunch.exe
      6. On the first screen select "One window", let the display number be 0, press Next.



      7. Choose "Open session via XDMCP" (third option) as the session type and press next again.



      8. Choose "Connect to host" and specify the server's IP address you noted in step 4.2



      9. Press next and next again and then finish.



        Voila!

        After some time Xming starts up and you see a beautiful Solaris 10 login screen :)



        And here's Solaris Java Desktop System :)

        Now all you need to do is to do the same thing on all the client windows systems you want to remotely run Solaris on.

        Note: In order to run multiple instances of Xming, you need to specify a new Display Number at the Display Settings screen (first screen) of the Xlaunch wizard.

    • Using Putty (with X11 Port Forwarding) and XMing to run specific applications and for more security.

      1. Configuring SSH in Solaris:
        In the Solaris VM, open the file /etc/ssh/sshd_config in a text editor and make sure it has the following lines:

        # X11 tunneling options
        X11Forwarding yes
        X11DisplayOffset 10
        X11UseLocalhost yes

        If you made any changes to the above file, restart the ssh daemen by running the following command:

        # svcadm restart svc:/network/ssh

      2. Installing and Configuring Putty for X11 Forwarding
        1. Download and install Putty (the best free telnet/SSH client)
        2. Open Putty. In the Session screen enter the VM's IP address (type ifconfig -a in a terminal on Solaris to get it). Leave everything else as is.



        3. Go to the SSH > Tunnels screen and check "Enable X11 Forwarding", then set X display location as "locahost:0". Leave the rest of the options as is.



        4. It's usually a good idea to save the putty session (in the Session screen) so that you can easily load the above configuration anytime.

      3. After finishing the above configuration, click on the "Open" button to connect to the SSH server on Solaris.
      4. Press Yes on the Putty Security Alert (it wont trouble you again.)
      5. You will get a login prompt. Due to some security restriction, you cannot login as root, so you have to login as some other user (see step 3 to learn how to create users using the Solaris Management Console).
      6. Now run Xlaunch. Choose Multiple Windows on the first screen and Start no client on the next. Finish the wizard. Xming will now start in the system tray.
      7. In the putty window, open any solaris application and it's GUI will get forwarded to the locally running X server if all went well.



And.. The Solaris Thin-Client Experience enlivened on 47 systems at JIIT University!


Cheers! :)

Posted at 11:20PM Jan 31, 2008 by Angad Singh in OpenSolaris  |  Comments[10]  |  del.icio.us digg slashdot technorati Stumble It! Share on Facebook furl reddit Share on Twitter    

Comments:

Well done Angad - nice and clear description and it seems that you have covered all potential pitfalls.
Cheers!

Posted by RSM on April 07, 2008 at 11:48 AM IST #

Pffffffffffff...... if you knew how long it took me to find this clear manual....
There are several versions of solaris and they all have their own way to enable Xwindow stuff.

FFYI, i had to skip the gdmsetup and scm parts since the server was already running on a distant location. I only installed Xming (for the 100 time..) and made the proposed settings in Putty. I have tried this for months without succes, but on a freshinstalled solaris unit i tried to login with putty and it reported:
Last login: Tue Apr 15 21:16:52 2008 from 10.0.0.103
/usr/openwin/bin/xauth: creating new authority file
/home/Home_user/.Xauthority
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

I changed to SU And fired a java program. It complained about DISPLAY settings. I entered:
#DISPLAY=[mywindowsPC-IP]:0.0
#export DISPLAY

and restarted the program..

*BANG* Xming fired up and it all works!

Posted by Roelof on April 16, 2008 at 01:14 AM IST #

I followed all the steps shown for putty but its not getting connected.
connection timeout is the dialog box i see. please help me in solving this.

Posted by krishna on August 28, 2008 at 12:52 PM IST #

Are you sure the SSH daemon is running in solaris? Try doing ssh from another solaris machine to yours.

Posted by Angad Singh on August 28, 2008 at 01:56 PM IST #

Hey man. Thanks for this nice share. Took 2 hour to configure it on small number of pcs. But worked well.

Posted by Ashish on September 09, 2008 at 11:52 AM IST #

We have a couple of thin-clients from Igel. Within our companynetwork there is no need for SSH. I just made a shortcut on the Igels for the X-term sessions on our server. I works great. ( i even installed VirtualBox on the Sun server, so they can use Windows XP on the Sun server)

Posted by roelof on October 26, 2008 at 06:15 PM IST #

Question regarding putty (x11 port forwarding) and Xming. I'm new to this. You were able to get to the Solaris login screen through XDMCP. How do you get to the Solaris login screen when you use putty and xming through SSH. After I connect to the server and login with putty I don't know what to do at the putty command prompt. Is there a specific command I have to give to bring up the Solaris login screen. Nothing pops up automatically even with Xming running in the background. Thanks

Posted by derek on February 11, 2009 at 08:44 PM IST #

The command is gnome-session

Posted by Proz on March 12, 2009 at 06:24 PM IST #

Hi everyone. I am new to puTTy and this forum. I have installed solaris10 latest release(aug08) in vmware workstation and my os win XP. I have configured each and everything as it is. But i am not able to get solaris desktop. when i Launch xlaunch.exe i am getting a new window with grey zigzag lines and nothing visible and even i waited for long time, but no use. could any one please send me detailed info abt it to my mail. And if anyone know about sharing windows data(drives/folders) in to solaris box( which is installed in vmware) please let me know. Thanks in advance.

my ID is : mr.svnprasad@gmail.com

Posted by prasad on April 26, 2009 at 11:20 PM IST #

Thanks for sharing Angad, really useful. :)

Posted by Justin on June 02, 2009 at 06:36 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
Creative Commons License

This work by Angad Singh is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.