Skip to content
Advertisement

ssh -X oracle is not working properly

I run the following command to switch to oracle user on linux.

ssh -X oracle@hostname

This is suppose to set environmental variable DISPLAY. I ran xclock command but it throws the following error

Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: localhost:16.0

How should i set environmental variable DISPLAY correctly to run GUI application?

Advertisement

Answer

You may have logged in as Oracle with -l option, if that is the case your DISPLAY variable won’t set correctly when you switch user to root and then issue the command

shh -X oracle@servername

you need to exit out from the current shell. Login as root and then issue the command

shh -X oracle@servername

Hope, this will correctly set your DISPLAY variable.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement