Saturday, July 7, 2018

XCLOCK configuration on SUSE Linux

                                      



Hello everyone ,
In my last post i shared how to do X browser configuration on AIX. Now i am going to share  one incident where roor user was unable to run XCLOCK on SUSE 12 and then how this incident was  handled by our team ??
Lets see
xclock Error   "can't open dispaly"

After doing analysis on this ticket we found that in root user home directory ".Xauthority" file wasn't present and also found that "X11Forwarding” in /etc/ssh/sshd_config not set correctly it must be "X11Forwarding yes".after doing chnages to sshd_config file refresh sshd service once.

Also we crosscheck that required packages are installed on SUSE 12 server.
required package to run Xclock:

xorg-x11-essentials xorg-x11-fonts xorg-x11-server xorg-x11-libs xorg-x11-util-devel xorg-x11-Xvnc xorg-x11-devel gcc  gcc-c++ libaio-devel compat-libldap-2_3-0 xclock libstdc++-devel libstdc++-devel-32bit libstdc++33

you can check whether package is installed or not by following command 

target_server#zypper se xorg-x11-essentials xorg-x11-fonts xorg-x11-server xorg-x11-libs xorg-x11-util-devel xorg-x11-Xvnc xorg-x11-devel gcc  gcc-c++ libaio-devel compat-libldap-2_3-0 xclock libstdc++-devel libstdc++-devel-32bit libstdc++33

if packages are not installed then install using following command 

target_server#zypper in -y xorg-x11-essentials xorg-x11-fonts xorg-x11-server xorg-x11-libs xorg-x11-util-devel xorg-x11-Xvnc xorg-x11-devel gcc  gcc-c++ libaio-devel compat-libldap-2_3-0 xclock libstdc++-devel libstdc++-devel-32bit libstdc++33


in our case packages are already present on SUSE 12 server so one more thing we observed was when we execute "xauth" command getting error message that "xauth program not found".so we checked the SUSE linux server and found that there is some symbolic link for "xauth" command so we created that using following command.

target_server#cd /usr/X11R6/
target_server# mkdir bin
target_server# ln -s /usr/bin/xauth /usr/X11R6/bin 

xauth is used for editing and displaying authorization file information.

Then using nxclient(used for running graphical Linux)  do ssh login to root user  from Jump server to target SUSE Linux server and check that " .Xauthority" file generated or not .it should be there .
LinuxJumpServer#ssh root@target_server

.Xauthority" file stores credentials in cookies and that is used by xauth program for authentication at time of X session." 
if file is there execute following command to check "MIT-MAGIC-COOKIE" cookie are there in ".Xauthority" file.do not create .Xauthority file manually because when user login from remote server using ssh ,after successful login ".Xauthority" will be genrated.

target_server#xauth list
will show "MIT-MAGIC-COOKIE".

Then execute "xclock" from root user account if it showing following clock then you have successfully configured XCLOCK on SUSE 12.

target_server#xclock
.....................


using above mentioned method , we sorted out XCLOCK incident on SUSE 12.


Thanks !!!



1 comment: