Posts

Showing posts with the label X11

Xclock does not work after switch to another user

suppose that user1 can run xclock and after switch to user2 xclock does not work does not matter if user1 or user2 is root you need to import the following values from user1 to user2 For KSH Shell $user1:/> xclock $user1:/>su - user2 $user2:/> xclock Error: Can't open display: $user2:/>exit  $user1:/>xauth list hostname/unix:10  MIT-MAGIC-COOKIE-1  630b2e7a7a794022834b0783b6f471fa hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69b9b3002484c4ea1e29a2ad5 hostname/unix:12  MIT-MAGIC-COOKIE-1  745ca626d4ef81101ef744589b4cfb09 $user1:/>echo $DISPLAY localhost: 11.0   (Hint : choose the matching values)  $user1:/>su - user2  $user2:/>xauth add hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69b9b3002484c4ea1e29a2ad5   $user2:/>export DISPLAY=localhost:11.0 $user2:/> xclock For CSH Shell $user2:/>xauth add hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69...

Create/rebuild a new .Xauthority file

This document describes the procedure for rebuilding a /$HOME/.Xauthority file. The information in this document applies to AIX 5.1 and higher. If you get an MIT magic cookie error when trying to gain remote access the CDE or Xdm, you may be able to solve the problem by rebuilding the .Xauthority file in the home directory of the user trying to log in. Follow these steps to create a /$HOME/.Xauthority file. Log in as user and confirm that you are in the user's home directory. Rename the existing .Xauthority file by running the following command mv .Xauthority old.Xauthority Generate a new .Xauthority file by running the following command: xauth generate :0 . trusted At the command line, create a new magic-cookie key by entering the following: randomkey=`/usr/bin/ksh -c 'echo $(( $RANDOM * $RANDOM * 2 ))'` Add a new entry for another server by running the following command: xauth add ${HOST}:0 . $randomkey To view a listing of the .Xauthority ...

Xmanger does not work

when i was trying to login by Xmanger give the following error usr/bin/X11/xauth: 1356-361 Timeout in locking authority file /home/user-name/.Xauthority the solution log to the server by command line and run the following command $ xauth -b "Attempting to break locks on authority file /.Xauthority Using authority file /.Xauthority" exit to test run xclock