Ever see how SGI machines come up in the window system?
Ever get bit
by a
customer asking you "Why can't Sun do that?"?
Well, Sun *can* do that. We've been able to for a long time. It's controlled by a program called "xdm".
If you don't know what xdm is, it's like a login process that brings up the X server and prompts you for a login and password inside of a "login widget" instead of the tty based login process that we use by default.
You can change the colors of the login widget text and background, set the background of the screen to a color or bitmap or image or whatever you like.
The change to bring xdm up is very easy and I recommend using this on any loaner or demo gear. It makes the system look better and it's easier to use.
The steps to start xdm under 2.4 are (as root):
It's best to do this on a machine that is accessible from the network. If the only account on the machine is root, make sure you uncomment the CONSOLE=/dev/console line /etc/default/login first otherwise, you'll end up booting from cdrom to fix any potential problems.
What you'll see is the default xdm look. If you want to alter how xdm looks or functions, all of the files that you need to edit are in /usr/openwin/lib/xdm. For instance, if you want to change the text and background colors of the login widget, edit the file Xresources. There are two lines:
*Foreground: white *Background: grey
which can be changed to more attractive colors. I use:
*Foreground: yellow2 *Background: midnightblue
You can also change the greeting banner:
xlogin*greeting: Welcome To OpenWindows
to "Welcome to Hostname" or whatever.
To set the background of the screen, modify the file Xsetup_0. I use
xsetroot -bitmap /usr/openwin/share/etc/workspace/patterns/swirl2.xbm -bg \#b298bf -fg \#e5b7b7
but you can use any of the bitmaps in that directory, or create your own
or use xsetbg to load an image or whatever.
One of the features of xdm is that it brings up xconsole along with the login widget. When a user logs in, xconsole *does not* go away. This can be fixed by editing the file GiveConsole. I have:
pid=`/usr/ucb/ps axc | fgrep xconsole | awk '{ print $1 }'` if [ -n "$pid" ]; then kill $pid fi
That way, cmdtool -C won't have a fit when it's started.
The files in the /usr/openwin/lib/xdm directory are different on Solaris 2.3 as compared to 2.4 but still work. There are some differences though to make xdm work like 2.4 on 2.3.
The foreground and background colors for the login widget may not change on some machines. I've seen it work on cg6 but not work on cg3. If you change the *Foreground and *Background resources and the login widget still has the wrong colors, you may need to remove the #ifdef COLOR and just define the colors outright:
*Foreground: yellow2 *Background: midnightblue xlogin*Foreground: yellow2 xlogin*Background: midnightblue
Normally, when you log in, your entire environment is set up in the shell before running openwin. In the xdm environment, the window system is started before any environment is created and the first environment is in the xterm or shelltool or cmdtool that is started under the X server. Therefore, if you have a customized .openwin-init, .openwin-menu, or .xinitrc that depends on variables set in your .cshrc, .login, or .profile then you will find things don't work as expected. This is especially true for anyone using the softdist menus since the softdist .login file defines the OLWMMENU environment variable to use the softdist menu. Without this, olwm defaults to the wrong menu.
If you want to set any environment variables, such as OLWMMENU, you can set them in the Xsession file. Specifically, you will *want* to set the LOGNAME variable. On 2.3, the Xsession file is fairly brief. On 2.4 it looks more like the openwin script. In either place, you can add
LOGNAME=`/bin/id | /bin/sed -e 's/).*$//' -e 's/^.*(//'` export LOGNAME
to get the LOGNAME variable defined. If you have a heavily customized environment (as I do) it can get very strange very quickly.
xlock: can't get the user password. Exiting ... You need to run xlock in setuid root mode on your local machine. Contact your system administrator.
This is a confusing message since xlock *is* setuid root. I've overcome this problem by grabbing the latest version of xlock from ftp.x.org. It not only does not exhibit this problem but also has a lot more really neat modes available (try xlock -mode bat; it's pretty funny). This version of xlock can be obtained from ftp://newstop.ebay/sun/tech-mktg/misc.