How can I specify a display?

前端 未结 11 940
挽巷
挽巷 2020-12-02 05:40

When I run some programs over SSH, such as firefox &, I get an error

Error: no display specified 

I would like to open ma

11条回答
  •  不知归路
    2020-12-02 06:22

    login to your server via

    ssh -X root@yourIP
    

    edit /etc/ssh/sshd_config file, and add this line to it.

    X11UseLocalhost no
    

    Restart sshd. for CentOS (check your distribution)

    /sbin/service sshd restart
    

    check your DISPLAY

    echo $DISPLAY
    

    you should see this

    yourIP:10.0
    

    Enjoy

    firefox
    

    for more info

提交回复
热议问题