[wuug-list] [wuug-forum] ezod: How-To: Adding Sessions to Dtlogin in Solaris

Windsor UNIX Users Group mavrinac at gmail.com
Thu Apr 26 14:46:39 EDT 2007


Author: ezod
Username: ezod (dyn216-8-173-187.ADSL.mnsi.net)
Subject: How-To: Adding Sessions to Dtlogin in Solaris
Forum: Solaris
Link: http://www.wuug.org/read.php?6,4,4#msg-4
Approved: Yes

November 14, 2002


Description

This document describes how to add custom window manager and desktop environment X Window System sessions to Dtlogin in Solaris 9 with CDE 1.5 (which includes the Dtlogin session manager). Having some experience setting up X sessions (using .xinitrc, for example) is helpful and recommended.


Procedure

Create /etc/dt if it does not exist already (this is to ensure files are not overwritten by patches or upgrades). Make a subdirectory "config" here and create the following files owned by root:other:

755  Xinitrc.SESSION
755  Xsession.SESSION
755  Xsession2.SESSION

Where SESSION is the name of the session you wish to create (e.g. GNOME-2.0, WindowMaker). Also, create a subdirectory "C" and a subdirectory "C/Xresources.d". Create the following file in this directory:

644  Xresources.SESSION

Now, fill in these 4 files with the text below, customizing where necessary (indicated by italicized text).


Xinitrc.SESSION

# X session startup script
export PATH="custom path"
export ANY_OTHER_ENV_VARS

/usr/openwin/bin/xrdb -merge << EOF
! Default CDE resources
*WindowColor:		#8A008A008A00
*WindowForeground:      #FF0000000000
*DataBackground:        #0000FF000000
*DataForeground:        #FF0000000000
*WorkspaceColor:        #8A008A008A00
*Color.Background:      #FF000000FF00
*Color.Foreground:      #0000FF000000
*foreground:            #000000000000
! Hack for Dtmail
*XmText*background: seashell
*XmTextField*background: seashell
*Message_List*background: seashell
*background:    #AE00B200C300
Dthello*string:  Your Custom Dthello String
EOF

if [ -f $HOME/.Xdefaults ]; then
    xrdb -merge $HOME/.Xdefaults
fi

/usr/openwin/bin/speckeysd

echo "Starting Session Name"

exec /path/to/session/executable


Xsession.SESSION

#!/bin/ksh

DTDSPMSG=/usr/dt/bin/dtdspmsg

export SESSIONTYPE="altDt"
export SDT_ALT_SESSION="/etc/dt/config/Xsession2.SESSION"
export SDT_ALT_HELLO="/bin/true"
export SDT_NO_DSDM=""

/usr/dt/bin/Xsession


Xsession2.SESSION

#!/bin/ksh

unset SDT_ALT_SESSION
unset SDT_ALT_HELLO
unset SDT_NO_DSDM

XINITRC="/etc/dt/config/Xinitrc.SESSION"

if [ -x /usr/dt/bin/xmbind ]; then
  /usr/dt/bin/xmbind
fi

/bin/ksh $XINITRC


Xresources.SESSION

Dtlogin*altDtsIncrement:  True

Dtlogin*altDtName:  Session Display Name
Dtlogin*altDtKey:  /path/to/session/executable
Dtlogin*altDtStart:  /etc/dt/config/Xsession.SESSION
Dtlogin*altDtLogo:  LogoFile


! Default CDE resources
*WindowColor:           #8A008A008A00
*WindowForeground:      #FF0000000000
*DataBackground:        #0000FF000000
*DataForeground:        #FF0000000000
*WorkspaceColor:        #8A008A008A00
*Color.Background:      #FF000000FF00
*Color.Foreground:      #0000FF000000
*foreground:            #000000000000
! Hack for Dtmail
*XmText*background: seashell
*XmTextField*background: seashell
*Message_List*background: seashell
*background:    #AE00B200C300
Dthello*string:  Your Custom Dthello String


Creating the Logo File

This is a 237 x 237 pixel XPM format file (preferably 256 colors, otherwise it will not work on 8-bit or pseudocolor displays). Put this file in /usr/dt/appconfig/icons/C. Rename it with the extension .pm but do not include this extension in the "LogoFile" string described in the Xresources.SESSION file. For example, if you name your logo file Wmlogo.pm, simply enter "Wmlogo" in Xresources.SESSION.


After you have completed these steps, your custom session should be up and running. For the sake of completeness I included resources for the X Window System in the session files (colors, etc.), which can be customized to your taste for each session.

This method has been tested and works on Solaris 9 on the UltraSPARC architecture with CDE 1.5, with GNOME 2.0, WindowMaker 0.80.0 and Blackbox 0.65.0.



More information about the wuug-list mailing list