Sponsored Content
Full Discussion: X windows issue
Top Forums UNIX for Advanced & Expert Users X windows issue Post 303029592 by DOkuwa on Tuesday 29th of January 2019 10:57:39 AM
Old 01-29-2019
Thanks

Like I said it is running on my windows PC I mean x-windows

--- Post updated at 11:57 AM ---

hello,

I am now having this error message when I run the script as root
Code:
/installer
No matches found, authority file "-" not written

MobaXterm X11 proxy: Unsupported authorisation protocol
Error: Can't open display: localhost:11.0

This is the code of the script I am running

Code:
# more installer
#!/bin/ksh
#

full_name=$0
ori_dir_name=`pwd`
error_should_exit="0"
dir_name=`/usr/bin/dirname $full_name`
host_name=`uname -n`
os_rev=`uname -r`
CPU=`uname -p`

if [ "`uname -s`" = "SunOS" ]
then
    if [ $os_rev = "5.8" ] || [ $os_rev = "5.7" ]
    then
        echo "This platform is not supported.\n"
        error_should_exit="1"
    fi
    prg_name=`/usr/bin/basename $full_name`
    arp=/usr/sbin/arp
    xauth=/usr/openwin/bin/xauth
    setup=setupsun.exe
    ID=`/bin/id`
elif [ "`uname -s`" = "Linux" ]
then
    echo $os_rev | grep '^2.4' > /dev/null
    if [ $? = 0 ]
    then
        echo "This platform is not supported.\n"
        error_should_exit="1"
    fi
    prg_name=`/bin/basename $full_name`
    arp=/sbin/arp
    # xauth is in /usr/bin on Red Hat 5 and /usr/X11R6/bin on Red Hat 4
    export PATH="$PATH:/usr/X11R6/bin:/usr/bin"
    xauth=xauth
    setup=setuplin.exe
    ID=`/usr/bin/id`
fi

export HOSTNAME=$host_name

set $ID
if [ ! -z $DISPLAY ]
then
  DISPLAYHOST=`echo $DISPLAY | awk -F: '{ print $1 }'`
  DISPLAYIP=`$arp $DISPLAYHOST | awk -F\( '{ print $2 }' | awk -F\) '{print $1}'`
  LOCALHOST=`hostname`
  LOCALIP=`$arp $LOCALHOST  | awk -F\( '{ print $2 }' | awk -F\) '{print $1}'`
  if [ "A$DISPLAYIP" != "A$LOCALIP" ]
  then
    REMOTEDISPLAY="1"
  else
    REMOTEDISPLAY="0"
  fi
else
  REMOTEDISPLAY="0"
fi
if [ -x $dir_name/$setup ]; then
  if [ ! -z $DISPLAY ] && [ "A$REMOTEDISPLAY" = "A0" ]; then
    export tmp_file="/tmp/installer_auth_$USER_$DISPLAY"
    touch $tmp_file
    chmod 600 $tmp_file
    $xauth extract - $DISPLAY > $tmp_file
    export XAUTHORITY="/.Xauthority"
  fi
fi

#
# User is now root.
#

check_for_patch()
# ./installer
No matches found, authority file "-" not written

MobaXterm X11 proxy: Unsupported authorisation protocol
Error: Can't open display: localhost:11.0
# more installer
#!/bin/ksh
#

full_name=$0
ori_dir_name=`pwd`
error_should_exit="0"
dir_name=`/usr/bin/dirname $full_name`
host_name=`uname -n`
os_rev=`uname -r`
CPU=`uname -p`

if [ "`uname -s`" = "SunOS" ]
then
    if [ $os_rev = "5.8" ] || [ $os_rev = "5.7" ]
    then
        echo "This platform is not supported.\n"
        error_should_exit="1"
    fi
    prg_name=`/usr/bin/basename $full_name`
    arp=/usr/sbin/arp
    xauth=/usr/openwin/bin/xauth
    setup=setupsun.exe
    ID=`/bin/id`
elif [ "`uname -s`" = "Linux" ]
then
    echo $os_rev | grep '^2.4' > /dev/null
    if [ $? = 0 ]
    then
        echo "This platform is not supported.\n"
        error_should_exit="1"
    fi
    prg_name=`/bin/basename $full_name`
    arp=/sbin/arp
    # xauth is in /usr/bin on Red Hat 5 and /usr/X11R6/bin on Red Hat 4
    export PATH="$PATH:/usr/X11R6/bin:/usr/bin"
    xauth=xauth
    setup=setuplin.exe
    ID=`/usr/bin/id`
fi

export HOSTNAME=$host_name

set $ID
if [ ! -z $DISPLAY ]
then
  DISPLAYHOST=`echo $DISPLAY | awk -F: '{ print $1 }'`
  DISPLAYIP=`$arp $DISPLAYHOST | awk -F\( '{ print $2 }' | awk -F\) '{print $1}'`
  LOCALHOST=`hostname`
  LOCALIP=`$arp $LOCALHOST  | awk -F\( '{ print $2 }' | awk -F\) '{print $1}'`
  if [ "A$DISPLAYIP" != "A$LOCALIP" ]
  then
    REMOTEDISPLAY="1"
  else
    REMOTEDISPLAY="0"
  fi
else
  REMOTEDISPLAY="0"
fi
if [ -x $dir_name/$setup ]; then
  if [ ! -z $DISPLAY ] && [ "A$REMOTEDISPLAY" = "A0" ]; then
    export tmp_file="/tmp/installer_auth_$USER_$DISPLAY"
    touch $tmp_file
    chmod 600 $tmp_file
    $xauth extract - $DISPLAY > $tmp_file
    export XAUTHORITY="/.Xauthority"
  fi
fi

#
# User is now root.
#

check_for_patch()
{
  typeset -i PATCHREV
  typeset -i REV
  typeset -i retval
  typeset -i lastrev
  PATCHNUM=$1
  PATCHREV=$2
  retval=1
  lastrev=0
  PATCHES=`/usr/bin/showrev -p | nawk -F: '{ print $2 $3 }'| sed -e "s/,/ /g"`
  for i in ${PATCHES}
  do
      NUM=`echo $i | nawk -F- '{ print $1}'`
      if [ ${NUM} == ${PATCHNUM} ]
      then
          REV=`echo $i | nawk -F- '{ print $2}'`
          if [ ${REV} -gt ${lastrev} ]
          then
              lastrev=${REV}
          fi
          if [ ${lastrev} -ge ${PATCHREV} ]
          then
              retval=0
              break
          fi
      fi
  done
  if [ ${retval} -ne 0 ]
  then
    echo
    echo "SPECTRUM Installation requires a patch to function properly."
    echo "Please contact your System Administrator and have them install"
    echo "patch $1-$2 or greater before proceeding with the"
    echo "SPECTRUM Installation.\n"
    error_should_exit="1"
  fi

}


#
# Check to see if required patch is installed
#
if [ $os_rev = "5.9" ]
then
  echo "Checking for patches required to run the installer.\c"
  check_for_patch "111711" "12"
  echo ".\c"
  check_for_patch "112963" "22"
  echo ".\c"
else
  if [ $os_rev = "5.10" ]
  then
    echo "Checking for patches required to run the installer.\c"
    check_for_patch "117461" "4"
    echo ".\c"
    check_for_patch "119963" "4"
    echo ".\c"
  fi
fi

echo

if [ $error_should_exit = "1" ]
then
    echo "Press RETURN to exit."
    read data
    exit
fi

cd $ori_dir_name
$dir_name/$setup
exit 0

 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix in a Windows environment issue

What types of error messages would I recieve if the backbone of the network is setup for both Unix and Windows systems? (6 Replies)
Discussion started by: Aisha Sturkey
6 Replies

2. Windows & DOS: Issues & Discussions

Drive issue under Windows

I recently got myself a new 2 TB drive. However everytime I connect the drive it doesn't have a drive letter, so I have to open the diskmgmt.msc and manually reassign it (EVERY TIME I connect the Drive...) Also the Drive appears to have no Recycle Bin. It always prompts to instantly delete... (4 Replies)
Discussion started by: pasc
4 Replies

3. Windows & DOS: Issues & Discussions

Windows XP issue...

Hi, I have a desktop it's about seven to eight years old. It has Windows XP. When I open I.E or Firefox or Google Chrome, I get so many other popup. I did install CClearner and spybot search & Destroy. But still I am getting lot of popup. crazy picture of girls comes on the screen. ... (8 Replies)
Discussion started by: samnyc
8 Replies

4. Shell Programming and Scripting

ksh - variable to be set to windows path issue

Greetings Experts, I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies

5. Red Hat

Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX

Hello Friends, I have observed one recent issue about ftp from windows to Linux. Initially we had Solaris unix and any file sent from windows to solaris via ftp (binary or ascii) worked smoothly. Say for e.g if I sent a shell script to soalris from windows, that script used to run corectly.... (17 Replies)
Discussion started by: Albert_Pinto7
17 Replies

6. Windows & DOS: Issues & Discussions

Plink issue in windows

I had a simple automation process to take config backup from san switches to windows via SSH. This can be accomplished using plink. My script was working fine earlier but from last few days it is not collecting data and the error which i am getting is below. "":confused: I have done the... (6 Replies)
Discussion started by: nirjhar17
6 Replies

7. UNIX for Beginners Questions & Answers

X Windows Security Issue

Hi there, I am trying to understanding the difference between X11, host- based versus user-based access controls. And how vulnerability can the X11 settings be and why it is recommended to turn it off. (1 Reply)
Discussion started by: alvinoo
1 Replies
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy