Solaris 11 Essentials Text

Console Mode in Solaris 11 Gnome Desktop

How do I open a console window in the Solaris 11 Gnome Desktop?

This question comes up occasionally- especially in my transition courses where I have administrators migrating from previous version of Solaris.  In those versions of Solaris, administrators used the Java Desktop (Solaris 10) and the Common Desktop Environment also called CDE (Solaris 9).  The console window was a special window where system generated messages were displayed.  Any messages sent to /dev/console by syslogd appeared in this window.

When using the Gnome Desktop in Solaris 11, there is an option to open a terminal window, but not a console window.   To view the console messages from the Gnome Desktop, use these keystrokes:

Press Ctrl+Alt+F1 and the screen switches out of the GUI environment into console mode

solaris console login:

You can switch to several different consoles by pressing Alt+F1 (F2, F6)   The login prompt will change for each console

solaris vt2 login:

Press Alt F3

solaris vt3 login:

When you want to return back to the Gnome Desktop environment, press Alt+F7

Note:  The Ctrl+Alt_F# also works for servers installed with the Text Installer that do not have Gnome desktop installed. When using the Text console, sometimes you want to open another console window.  USe the Ctrl+Alt+F# to open a new console window while the other window is busy.  It does NOT work for Putty sessions though.

Remember, the Gnome Desktop is not just for x86 users, it’s also available on the SPARC platform.  If you want more details on how to setup and access the Gnome Desktop on the SPARC platform, go to my blog entry on this topic.

Viewing the Console During the Boot Process

On Solaris x86 systems, when the Gnome Desktop is installed, you don’t see the console messages displayed during the boot process.  You only see the white splash screen shown in figure 1:

 bootscreen
Figure 1

 

You could simply press Ctrl+Alt+F1 when you see the splash screen and the console screen will be shown.  The Ctrl+Alt+F1 toggles the screen from the GUI mode to the console mode.   But, the system will boot in a quiescent mode and the detailed boot messages will still not be displayed.

To change the configuration, so that boot messages are displayed during the boot process, edit the GRUB menu.   The GRUB menu can be changed either temporarily or permanently.

Make a temporary change to the boot screen by pressing the “e” key when the GRUB menu is displayed during the boot process as shown in figure 2

Grub

 Figure 2

 

The edit screen will open as shown in Figure 3:

edit_grub

Figure 3

Change the following line from “graphics“:

$multiboot /ROOT/solaris/@/$kern -B console=graphics -B $zfs_bootfs

to “text” as follows:

$multiboot /ROOT/solaris/@/$kern -B console=text -B $zfs_bootfs

After making the edit, press Ctrl+x to start the boot process in text mode.

By default, the system boots in a quiescent mode.  You can specify which messages you want to view during bootup.   Add -m verbose  to the end of the line as shown next, to display all of the SMF services as they start:

$multiboot /ROOT/solaris/@/$kern -B console=text -B $zfs_bootfs -m verbose

The following SMF messages will be displayed, showing all f the services starting up:

m_verbose

Add -v to the end of the line to display the kernel messages, but not the SMF service messages:

$multiboot /ROOT/solaris/@/$kern -B console=text -B $zfs_bootfs -v

kernel_msgs

Or view ALL of the boot messages by specifying both options as follows:

$multiboot /ROOT/solaris/@/$kern -B console=text -B $zfs_bootfs -m verbose -v

To make a permanent change to the boot process on the x86 platform, you’ll need to use the bootadm utility from the command line to modify the GRUB menu.  First display the current GRUB configuration as follows:

# bootadm list-menu
 the location of the boot loader configuration files is: /rpool/boot/grub
 default 0
 console graphics
 timeout 30
 0 Oracle Solaris 11.1

In the above example, the GRUB menu has one entry, entry 0 with a title of “Oracle Solaris 11.1."    To permanently change entry 0 in the GRUB menu so that it boots in verbose mode, type:

# bootadm change-entry -i 0 kargs="-v"

Also, you need to change the console to text as follows:

# bootadm set-menu console=text

Now, display the change:

# bootadm list-menu
 the location of the boot loader configuration files is: /rpool/boot/grub
 default 0
 console text
 timeout 30
 0 Oracle Solaris 11.1

The above list shows that the console is set to text, but it does not display the -v option which was also set.   You’ll need to list the details for entry 0 in the GRUB menu to see the boot string for that entry as follows:

# bootadm list-menu "Oracle Solaris 11.1"
 the location of the boot loader configuration files is: /rpool/boot/grub
 title: Oracle Solaris 11.1
 kernel: /platform/i86pc/kernel/amd64/unix
 kernel arguments: -v
 boot archive: /platform/i86pc/amd64/boot_archive
 bootfs: rpool/ROOT/solaris

Now, every time the system boots, you’ll see the kernel boot messages displayed.  After the system boots, the Gnome Desktop login will be displayed.

I hope this helps out and if you have questions, please submit them in the comment section at the bottom of this page.  Be sure to check out one of my online courses too!

gnome1

Setup X11 Access to the Solaris GUI Gnome Desktop

Many of my blog posts come from questions that I receive in the classroom as I travel around the world teaching Solaris, Linux, AIX and HP-UX.  I tell my students that I learn something in every class that I teach- even when I teach the Fundamentals UNIX course.   It’s because there are so many different ways to accomplish the same task in Solaris.  Furthermore, those new to Solaris system administration tend to ask questions that I may have never thought of.  Whenever students ask a question, I don’t usually just answer it off the cuff.  I create slides and write up a procedure on how to perform the task.  I guess it’s because I love to write, but also, I want to make myself perfectly clear.  I try to share some of those procedures in my blog postings.  How many times have you read documentation and that one important step is left out?  I’ll try not to do that to you in my blog entries and if I do, make sure you call me out on it.

This question comes up quite often from new system admins:


How do I access the GUI desktop environment on a Solaris 11 SPARC server from my Windows, MAC, Solaris or Linux desktop computer?


Because SPARC based servers are installed using the Oracle Solaris 11 Text Installer (installing the solaris-large-server group of software packages), the desktop environment is not installed.  Therefore, the only option for connecting remotely to the server is with an SSH client and getting a command line prompt.  I typically use putty for this.  Another great tool, and there’s a free version, is MobaXterm.  Setting up desktop access using MobaXterm is the topic I’ll cover here.

Students using SPARC servers, especially those new administrators, frequently ask how to setup their Windows, MAC, Solaris or Linux desktop to display the Gnome GUI desktop environment when connecting to their SPARC server.  In otherwords, they want this this screen:

gnome1

Not this screen:

ssh

Here’s how to setup your Windows, MAC or Linux desktop to display the Solaris Gnome GUI environment.

Overview of the Setup

To accomplish this, you’ll need to follow these three steps:

  1. Install the Gnome desktop environment on your SPARC server.

Note – If you use the text installation method, the Oracle Solaris Desktop package (solaris-desktop) is not installed on your system by default.

  1. Enable XDMCP connections on the SPARC server.

XDMCP is a remote desktop protocol used by several UNIX systems, including Solaris. With XDMCP, your desktop computer running X11 can connect to the SPARC server  (also running X11) and interact with the SPARC server as if you were physically at the SPARC server.

  1. Install an X Server program on your desktop.  I’ll use the free version of MobaXterm.  Download and install MobaXterm (free) on your Windows, MAC, Solaris or Linux desktop from http://mobaxterm.mobatek.net/

 

Step 1 – Install the Gnome desktop environment on your SPARC server

Log into the SPARC server as root.   The server needs to have access to a software repository so that you can install the solaris-desktop package as follows:

# pkg install solaris-desktop

Note: If your system does not have access to a repository, that’s a topic for another time, but it is covered in my book.  Add a comment below this post if you would like me to post this procedure.  Another source of information is Oracle explains how in their documentation.

The installation of the solaris-desktop will take several minutes.  Here’s a sample installation:

# pkg install solaris-desktop
  Packages to install: 337
  Create boot environment: No
 Create backup boot environment: Yes
  Services to change: 14
DOWNLOAD PKGS FILES XFER (MB) SPEED
 Completed 337/337 50991/50991 528.9/528.9 0B/s
PHASE ITEMS
 Installing new actions 82278/82278
 Updating package state database Done
 Updating image state Done
 Creating fast lookup database working 
 Creating fast lookup database Done
 You have new mail in /var/mail/root

Step 2 – Enable XDMCP connections on the SPARC server

When the installation is complete, enable XDMCP connections by editing the /etc/gdm/custom.conf file. Add this line to the end of the file:

[xdmcp]
Enable=true

Enable xvnc-inetd as follows:

# inetadm -e xvnc-inetd

Restart the graphical login service (gdm) as follows:

# svcadm restart svc:/application/graphical-login/gdm:default

Check the state of the gdm service by typing:

# svcs -vx

The service might be in a maintenance state like this:

svc:/system/consolekit:default (ConsoleKit)
 State: maintenance since September 5, 2014 09:11:20 PM UTC
Reason: Restarting too quickly.
 See: http://support.oracle.com/msg/SMF-8000-L5
 See: man -M /usr/share/man -s 1m console-kit-daemon
 See: /var/svc/log/system-consolekit:default.log
Impact: 1 dependent service is not running:
 svc:/application/graphical-login/gdm:default

Reboot the server

Verify that all of the services are running normal by typing:

# svcs -vx

The following output shows that the svc:/application/texinfo-update:default service is offline*   This indicates that the service is still starting. Eventually, the svcs –vx command should return only a shell prompt when everything is running:

svc:/application/texinfo-update:default (texinfo documentation directory update)
 State: offline* transitioning to online since September 5, 2014 09:26:33 PM UTC
Reason: Start method is running.
 See: http://support.oracle.com/msg/SMF-8000-C4
 See: man -M /usr/share/man -s 1 install-info
 See: /var/svc/log/application-texinfo-update:default.log
Impact: This service is not running.

When the service is running, the svcs -vx command will return only a prompt as follows:

# svcs -vx
#

Step 3 – Install an X Server program on your desktop

I’ll use the free version of MobaXterm to connect my PC to the Gnome desktop on the SPARC server.  Download and install MobaXterm (free) on your Windows, MAC, Solaris or Linux desktop from http://mobaxterm.mobatek.net/

Another popular free program is Xming.

After installing MobaXterm, click on the MobaXterm icon to open the program.

Click on the Sessions Icon:

mobaterm1

Click on the Xdmcp icon:

mobaterm2

Select the “Specify server to connect to:” radio button and enter the IP address of the SPARC server:

mobaterm3

Note: You can also select the radio button to “Connect to any server” and the login prompt should appear.
Once connected, the following login should appear:

gnomelogin

 

This same procedure could be setup for providing GUI access to your non-global zones. 

If you have any questions, please add them in the comments section below and I’ll try my best to address them.