home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / admin / 5059 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  3.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!mips!mips!public!thad
  2. From: thad@public.BTR.COM (Thaddeus P. Floryan)
  3. Newsgroups: comp.sys.sun.admin
  4. Subject: Re: X11R5 installation problem on Sun..
  5. Message-ID: <7554@public.BTR.COM>
  6. Date: 29 Jul 92 06:47:32 GMT
  7. References: <1992Jul27.130206@ece.arizona.edu>
  8. Organization: BTR Public Access UNIX, Mountain View CA
  9. Lines: 97
  10.  
  11. In article <1992Jul27.130206@ece.arizona.edu> mshah@ece.arizona.edu (Munil A. Shah) writes:
  12. >
  13. >    I compiled and installed X11R5. I edited the makefile to change
  14. >the ProjectRoot. So binaries,libraries etc. were installed into non-default
  15. >directories. Now the problem is : While starting the xinit, it can't find
  16. >the fonts of the new lib directory. So it uses the default ones. When I 
  17. >run 'xset q' command I can see that it is looking under the old directory
  18. >(/usr/lib...) for fonts.
  19. >    Is there any way I can fix this problem, without replacing the 
  20. >links in /usr/lib?.(The links in this directories currently point to
  21. >X11R4 and I don't want to disturb these links until I finally decides
  22. >to replace R4 by R5).
  23.  
  24. Well, the following solution is "Brute Force" (tm :-), but it worked for
  25. me until the time I abandoned X11R4 completely.  Given that "/usr/local/bin"
  26. is in my $PATH, invoking "x11r4" changes all the links for X11R4 usage, and
  27. invoking "x11r5" changes all the links for X11R5.  Short source follows the
  28. reference dir listings:
  29.  
  30.     # pwd
  31.     /usr/local/src/x11rN
  32.     # ll
  33.     total 1
  34.     -rw-r-----  1 thad     users         659 Apr 24 06:17 x11rN.c
  35.     # cd /usr/local/bin
  36.     # ll x11*
  37.     lrwxrwxrwx  1 root     daemon          5 Apr 24 07:44 x11r4 -> x11r5*
  38.     -rwsr-xr-x  1 root     daemon      24576 Apr 24 07:43 x11r5*
  39.  
  40. Compile/link simply by entering "cc -O -s -o x11r5 x11rN.c" followed by the
  41. symlink to x11r4.
  42.  
  43. Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]
  44.  
  45. ---- Cut Here and feed the following to sh ----
  46. #!/bin/sh
  47. # This is a shell archive (produced by shar 3.49)
  48. # To extract the files from this archive, save it to a file, remove
  49. # everything above the "!/bin/sh" line above, and type "sh file_name".
  50. #
  51. # made 07/29/1992 06:43 UTC by thad@cosmic
  52. # Source directory /usr/local/src/x11rN
  53. #
  54. # existing files will NOT be overwritten unless -c is specified
  55. #
  56. # This shar contains:
  57. # length  mode       name
  58. # ------ ---------- ------------------------------------------
  59. #    659 -rw-r----- x11rN.c
  60. #
  61. # ============= x11rN.c ==============
  62. if test -f 'x11rN.c' -a X"$1" != X"-c"; then
  63.     echo 'x - skipping x11rN.c (File already exists)'
  64. else
  65. echo 'x - extracting x11rN.c (Text)'
  66. sed 's/^X//' << 'SHAR_EOF' > 'x11rN.c' &&
  67. X#include <stdio.h>
  68. X
  69. X#define SYS_BIN "/usr/bin/X11"
  70. X#define SYS_LIB "/usr/lib/X11"
  71. X#define SYS_INC "/usr/include/X11"
  72. X
  73. X#define LNK_BIN "/h1/X11R%c/bin"
  74. X#define LNK_LIB "/h1/X11R%c/lib"
  75. X#define LNK_INC "/h1/X11R%c/include"
  76. X
  77. Xmain(argc, argv)
  78. X    int    argc;
  79. X    char    *argv[];
  80. X{
  81. X    int    base_char;
  82. X    char    path_name[80];
  83. X
  84. X    base_char = *(argv[0] + (strlen(argv[0]) - 1));    /* get '4' or '5' */
  85. X
  86. X    unlink(SYS_BIN);
  87. X    sprintf(path_name, LNK_BIN, base_char);
  88. X    symlink(path_name, SYS_BIN);
  89. X
  90. X    unlink(SYS_LIB);
  91. X    sprintf(path_name, LNK_LIB, base_char);
  92. X    symlink(path_name, SYS_LIB);
  93. X
  94. X    unlink(SYS_INC);
  95. X    sprintf(path_name, LNK_INC, base_char);
  96. X    symlink(path_name, SYS_INC);
  97. X
  98. X    return 0;
  99. X}
  100. SHAR_EOF
  101. chmod 0640 x11rN.c ||
  102. echo 'restore of x11rN.c failed'
  103. Wc_c="`wc -c < 'x11rN.c'`"
  104. test 659 -eq "$Wc_c" ||
  105.     echo 'x11rN.c: original size 659, current size' "$Wc_c"
  106. fi
  107. exit 0
  108.