X windows issue


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users X windows issue
# 1  
Old 01-29-2019
X windows issue

Hello,

I am trying to fire up a GUI in my Unix server as root
and it comes out with this error
Code:
 MobaXterm X11 proxy: Unsupported authorisation protocol
Error: Can't open display: localhost:11.0

Is this to do with the Xauthority file as I have added this command to it
Code:
xauth add `hostname`/unix:10 MIT-MAGIC-COOKIE-1

# 2  
Old 01-29-2019
Quote:
Originally Posted by DOkuwa
I am trying to fire up a GUI in my Unix server as root
Usually you cannot do that. An "X-Server" runs on the client, not the server. You might want to read my little introduction about X-Windows for a clcarification on how X-Windows works.#

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 3  
Old 01-29-2019
Sorry it was my message the x-windows is running on the client (PC) and not the server

--- Post updated at 08:58 AM ---

Code:
 xauth list
localhost.localdomain/unix:12  MIT-MAGIC-COOKIE-1  2592e2600c7bbd86b824fc0c725b5fd3

I am just wondering if this is correct as why is localhost.localdomain/unix instead of localhost only
# 4  
Old 01-29-2019
Quote:
Originally Posted by DOkuwa
I am just wondering if this is correct as why is localhost.localdomain/unix instead of localhost only
Probably because of the name resolution is as it is. Try
Code:
nslookup 127.0.0.1

and you probably get the same result.

If the server runs on your client, then how comes this "mobaxterm" message? Do you try to run MobaXTerm as an X-Server under Windows?

I hope this helps.

bakunin
# 5  
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

# 6  
Old 01-29-2019
When I see : Error: Can't open display: localhost:11.0 I think more of ssh...
Is X11 forwarding/tunnelling over ssh is enabled on your server? ( not the Xserver on your PC...)


This little article may be helpful:
Tunneling X11 | SSH Tectia Server 4.4 Unix Administrator's Guide
xorg - How to forward X over SSH to run graphics applications remotely? - Unix & Linux Stack Exchange

Last edited by vbe; 01-29-2019 at 12:37 PM.. Reason: added link to read...
# 7  
Old 01-29-2019
Thanks

yes in the sshd_config and ssh_config file in etc/ssh
Code:
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3

Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

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. 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

6. 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

7. 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
Login or Register to Ask a Question