0

Have VPS server. Trying to set the display variable. Have always had problems with the correct value.

setenv $DISPLAY = :0.0

export $DISPLAY

Tring to get xinit not to fail due to no VT being set or found. xhost + and setting the $DISPLAY variable will allow all X Sessions to run and any gui will come up. I am 3 weeks into CentOs and come from a Unix environment so for the bash shell what is the correct way to get gui's up for CentOs 6.8-x_64.

Regards-

migrated from serverfault.com Oct 30 '16 at 3:37

This question came from our site for system and network administrators.

2

If you have a headless CentOS and want to run GUI Apps by logging in remotely you will need to :

  1. yum install xorg-x11-xauth
  2. yum install xorg-x11-apps
  3. ssh -X yourserver
  4. xclock

Obvioulsy you need to run ssh -X from the system running X11 server.

  • If you are on Linux - no extra steps needed.
  • If you are on Mac OS X - install XQuartz
  • If you are on Windows - use either xming, mobaxterm, Exceed or anything else that adds X11 support.
0

If you're using bash and you need to set the DISPLAY variable (I'd expect it to be set automatically in general) then the correct syntax is

export DISPLAY=:0.0

or

DISPLAY=:0.0; export DISPLAY

setenv is a csh command so not used here. Note that you mustn't use the dollar sign with the variable name and no spaces either side of the equals sign.

  • Still can't get xserver started! Maybe I can't on this server? – Chris Russo Oct 30 '16 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.