File: find-x-server.sh

package info (click to toggle)
gdm3 48.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,852 kB
  • sloc: ansic: 30,730; sh: 1,730; xml: 539; makefile: 81
file content (38 lines) | stat: -rwxr-xr-x 1,270 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# First check with "! -h" for /usr/X11R6 and /usr/X11 since they often
# symlink to each other, and configure should use the more stable
# location (the real directory) if possible.
#
# On Solaris, the /usr/bin/Xserver script is used to decide whether to
# use Xsun or Xorg, so this is used on Solaris.
#
# When testing for /usr/X11R6, first check with "! -h" for /usr/X11R6
# and /usr/X11 since they often symlink to each other, and configure
# should use the more stable location (the real directory) if possible.
#

if test -n "$X_BIN"; then
    # assume the user set these variables and don't second-guess them.
    echo "$X_BIN"
elif test -x /usr/bin/X; then
    echo "/usr/bin/X"
elif test -x /usr/X11/bin/Xserver; then
    echo "/usr/X11/bin/Xserver"
elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then
    echo "/usr/X11R6/bin/X"
elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then
    echo "/usr/X11/bin/X"
elif test -x /usr/X11R6/bin/X; then
    echo "/usr/X11R6/bin/X"
elif test -x /usr/bin/Xorg; then
    echo "/usr/bin/Xorg"
elif test -x /usr/X11/bin/X; then
    echo "/usr/X11/bin/X"
elif test -x /usr/openwin/bin/Xsun; then
    echo "/usr/openwin/bin/Xsun"
elif test -x /opt/X11R6/bin/X; then
    echo "/opt/X11R6/bin/X"
else
    echo ""
fi