From 191e1849a632d33df8caac1fbf77e1c5214ba8bc Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 21 Jun 2012 17:55:57 -0600 Subject: [PATCH] dtlogin|Xsession/config: setup some env variables and fontpath for linux (and CSRG) systems. 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 | 14 ++++++++++- cde/programs/dtlogin/config/Xfailsafe.src | 6 ++++- cde/programs/dtlogin/config/Xservers.src | 2 ++ cde/programs/dtlogin/config/Xsetup.src | 2 ++ cde/programs/dtlogin/config/_common.ksh.src | 26 +++++++++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtlogin/config/Xconfig.src b/cde/programs/dtlogin/config/Xconfig.src index f7898e05..2f2d4305 100644 --- a/cde/programs/dtlogin/config/Xconfig.src +++ b/cde/programs/dtlogin/config/Xconfig.src @@ -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: +#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: +#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 diff --git a/cde/programs/dtlogin/config/Xfailsafe.src b/cde/programs/dtlogin/config/Xfailsafe.src index ec8b488d..b0c60ca6 100644 --- a/cde/programs/dtlogin/config/Xfailsafe.src +++ b/cde/programs/dtlogin/config/Xfailsafe.src @@ -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 diff --git a/cde/programs/dtlogin/config/Xservers.src b/cde/programs/dtlogin/config/Xservers.src index cea4e966..f87fefd2 100644 --- a/cde/programs/dtlogin/config/Xservers.src +++ b/cde/programs/dtlogin/config/Xservers.src @@ -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 diff --git a/cde/programs/dtlogin/config/Xsetup.src b/cde/programs/dtlogin/config/Xsetup.src index 10c1930e..86f26178 100644 --- a/cde/programs/dtlogin/config/Xsetup.src +++ b/cde/programs/dtlogin/config/Xsetup.src @@ -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 diff --git a/cde/programs/dtlogin/config/_common.ksh.src b/cde/programs/dtlogin/config/_common.ksh.src index 9f2bcdca..90154a6a 100644 --- a/cde/programs/dtlogin/config/_common.ksh.src +++ b/cde/programs/dtlogin/config/_common.ksh.src @@ -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 + -- 2.25.1