dtlogin|Xsession/config: setup some env variables and fontpath for linux (and CSRG...
authorJon Trulson <jon@radscan.com>
Thu, 21 Jun 2012 23:55:57 +0000 (17:55 -0600)
committerJon Trulson <jon@radscan.com>
Fri, 22 Jun 2012 00:05:24 +0000 (18:05 -0600)
What we really need are more fonts installed, like all of the xf 75dpi
and 100dpi fonts.  100dpi looks much better than 75/72 dpi, especially
on any display larger than 1024x768.  Of course, in the far future, we
should use the anti-aliased TT fonts everyone else uses these days
anyway.

cde/programs/dtlogin/config/Xconfig.src
cde/programs/dtlogin/config/Xfailsafe.src
cde/programs/dtlogin/config/Xservers.src
cde/programs/dtlogin/config/Xsetup.src
cde/programs/dtlogin/config/_common.ksh.src

index f7898e051db64d79dbe4ff0da68e8d4dc16739fe..2f2d4305dacb6ed1f2775aff43182f62e5a3780b 100644 (file)
@@ -68,7 +68,7 @@ Dtlogin*startup:               Xstartup
 Dtlogin*reset:                 Xreset
 Dtlogin*setup:                 Xsetup
 
-#if defined (__hpux) || defined (_AIX) || defined (sun) || defined (__osf__)
+#if defined (__hpux) || defined (_AIX) || defined (sun) || defined (__osf__) || defined(CSRG_BASED) || defined(linux)
 Dtlogin*failsafeClient:        Xfailsafe
 #else
 Dtlogin*failsafeClient:        /usr/bin/X11/xterm
@@ -83,6 +83,9 @@ XCOMM Dtlogin.exportList:             ODMDIR NLSPATH TZ ...
 Dtlogin.exportList:            ODMDIR NLSPATH TZ
 #endif
 
+#if defined(CSRG_BASED) || defined(linux)
+Dtlogin.exportList:            NLSPATH LANG
+#endif
 
 XCOMM #########################################################################
 XCOMM  To specify the languages listed in the [Options] [Languages] menu.
@@ -132,6 +135,10 @@ XCOMM  To specify a default user PATH environment variable.
 XCOMM
 XCOMM  Dtlogin*userPath:          <path>
 
+#if defined(linux) || defined(CSRG_BASED)
+Dtlogin*userPath:          /bin:/usr/bin:/sbin:/usr/sbin:/usr/dt/bin
+#endif
+
 
 XCOMM #########################################################################
 XCOMM  To set a display to run the user's XDM $HOME/.xsession script as the
@@ -163,6 +170,11 @@ XCOMM  To specify how long the Login Manager waits to connect to an X-server.
 XCOMM
 XCOMM  Dtlogin*openTimeout:       <seconds>
 
+#if defined(CSRG_BASED) || defined(linux)
+Dtlogin*openTimeout:    15
+Dtlogin*serverAttempts: 3
+Dtlogin*wakeupInterval: 20
+#endif
 
 XCOMM #########################################################################
 XCOMM  To specify how often the Login Manager "pings" a remote display to 
index ec8b488db008a3aed9ed122b917d5a012f5ce0d0..b0c60ca63d0e4950dc5663a46998f496da8469f3 100644 (file)
@@ -53,7 +53,11 @@ XCOMM
 XCOMM
 XCOMM  Set background to default weave.
 XCOMM
-   $XDIR/xsetroot -default &
+#if defined(linux)
+   XDIR=/usr/bin
+#endif
+
+$XDIR/xsetroot -default &
 
 #if defined(_AIX) && defined(AIXV4)
 XCOMM
index cea4e966c4dffb59e5c0fc3984d679fa8703eb7c..f87fefd23fc53192d538a9f97a9057c4acf507da 100644 (file)
@@ -111,6 +111,8 @@ XCOMM   *  Local local_uid@console root /usr/bin/X11/X :0 -nice -2
 XCOMM   *      Local local@console /usr/bin/X11/X :0
 #elif defined (__uxp__)
    :0  Local local@console /usr/bin/X11/X :0
+#elif defined (linux)
+   :0  Local local_uid@tty1 root /usr/bin/X :0 
 #else
    *   Local local@console /usr/bin/X11/X :0
 #endif
index 10c1930e96f8ebb910b22508e75998d51f7e9a80..86f26178c3de2c5cabee3fddac9aacbfc581e9d5 100644 (file)
@@ -56,6 +56,8 @@ fi
 
 #ifdef sun
   XDIR=/usr/openwin/bin
+#elif defined(CSRG_BASED) || defined(linux)
+  XDIR=/usr/bin
 #else
   XDIR=/usr/bin/X11
 #endif
index 9f2bcdca90b3ef5650ffe8d587a471f37a697c5b..90154a6abfbf587e317756e2c5d1759984ab7a62 100644 (file)
@@ -36,6 +36,8 @@
   pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $5}')
 #elif defined(USL) && (OSMAJORVERSION > 1)
   pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $6}')
+#elif defined(linux) || defined(CSRG_BASED)
+  pexec=$(LC_TIME=C /bin/ps -p $PPID 2>/dev/null | awk 'NR==2 {print $4}')
 #else
   pexec=$(LC_TIME=C /usr/bin/ps -p $PPID | awk 'NR==2 {print $4}')
 #endif
@@ -467,3 +469,27 @@ SetKeyboardMap()
   fi
 #endif
 #endif
+
+#if defined(CSRG_BASED) || defined(linux)
+#ifdef cpp_Xsetup
+    if [ "$DTXSERVERLOCATION" != "remote" ]; then
+      fontpath=
+      FONTLIB=/usr/share/fonts/X11
+      for i in misc 75dpi 100dpi Speedo Type1 PJE
+      do
+        if [ -f $FONTLIB/$i/fonts.dir ];  then
+            if [ ! -z "$fontpath" ]; then
+               fontpath=$fontpath,$FONTLIB/$i/
+            else
+               fontpath=$FONTLIB/$i/
+            fi
+        fi
+      done
+
+      if [ ! -z "$fontpath" ]; then
+        $XDIR/xset fp+ $fontpath
+      fi
+    fi
+#endif
+#endif
+