home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!mips!mips!public!thad
- From: thad@public.BTR.COM (Thaddeus P. Floryan)
- Newsgroups: comp.sys.sun.admin
- Subject: Re: X11R5 installation problem on Sun..
- Message-ID: <7554@public.BTR.COM>
- Date: 29 Jul 92 06:47:32 GMT
- References: <1992Jul27.130206@ece.arizona.edu>
- Organization: BTR Public Access UNIX, Mountain View CA
- Lines: 97
-
- In article <1992Jul27.130206@ece.arizona.edu> mshah@ece.arizona.edu (Munil A. Shah) writes:
- >
- > I compiled and installed X11R5. I edited the makefile to change
- >the ProjectRoot. So binaries,libraries etc. were installed into non-default
- >directories. Now the problem is : While starting the xinit, it can't find
- >the fonts of the new lib directory. So it uses the default ones. When I
- >run 'xset q' command I can see that it is looking under the old directory
- >(/usr/lib...) for fonts.
- > Is there any way I can fix this problem, without replacing the
- >links in /usr/lib?.(The links in this directories currently point to
- >X11R4 and I don't want to disturb these links until I finally decides
- >to replace R4 by R5).
-
- Well, the following solution is "Brute Force" (tm :-), but it worked for
- me until the time I abandoned X11R4 completely. Given that "/usr/local/bin"
- is in my $PATH, invoking "x11r4" changes all the links for X11R4 usage, and
- invoking "x11r5" changes all the links for X11R5. Short source follows the
- reference dir listings:
-
- # pwd
- /usr/local/src/x11rN
- # ll
- total 1
- -rw-r----- 1 thad users 659 Apr 24 06:17 x11rN.c
- # cd /usr/local/bin
- # ll x11*
- lrwxrwxrwx 1 root daemon 5 Apr 24 07:44 x11r4 -> x11r5*
- -rwsr-xr-x 1 root daemon 24576 Apr 24 07:43 x11r5*
-
- Compile/link simply by entering "cc -O -s -o x11r5 x11rN.c" followed by the
- symlink to x11r4.
-
- Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 07/29/1992 06:43 UTC by thad@cosmic
- # Source directory /usr/local/src/x11rN
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 659 -rw-r----- x11rN.c
- #
- # ============= x11rN.c ==============
- if test -f 'x11rN.c' -a X"$1" != X"-c"; then
- echo 'x - skipping x11rN.c (File already exists)'
- else
- echo 'x - extracting x11rN.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'x11rN.c' &&
- X#include <stdio.h>
- X
- X#define SYS_BIN "/usr/bin/X11"
- X#define SYS_LIB "/usr/lib/X11"
- X#define SYS_INC "/usr/include/X11"
- X
- X#define LNK_BIN "/h1/X11R%c/bin"
- X#define LNK_LIB "/h1/X11R%c/lib"
- X#define LNK_INC "/h1/X11R%c/include"
- X
- Xmain(argc, argv)
- X int argc;
- X char *argv[];
- X{
- X int base_char;
- X char path_name[80];
- X
- X base_char = *(argv[0] + (strlen(argv[0]) - 1)); /* get '4' or '5' */
- X
- X unlink(SYS_BIN);
- X sprintf(path_name, LNK_BIN, base_char);
- X symlink(path_name, SYS_BIN);
- X
- X unlink(SYS_LIB);
- X sprintf(path_name, LNK_LIB, base_char);
- X symlink(path_name, SYS_LIB);
- X
- X unlink(SYS_INC);
- X sprintf(path_name, LNK_INC, base_char);
- X symlink(path_name, SYS_INC);
- X
- X return 0;
- X}
- SHAR_EOF
- chmod 0640 x11rN.c ||
- echo 'restore of x11rN.c failed'
- Wc_c="`wc -c < 'x11rN.c'`"
- test 659 -eq "$Wc_c" ||
- echo 'x11rN.c: original size 659, current size' "$Wc_c"
- fi
- exit 0
-