How can I specify a display?

前端 未结 11 938
挽巷
挽巷 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 05:56

    I through vnc to understand the X11 more. To specify the display to get a many-displayed program, export DISPLAY=IP:DisplayNum.ScreenNum

    For example,

    vncserver :2
    vncserver -list
    echo '$DISPLAY'=$DISPLAY 
    export DISPLAY=:2  # export DISPLAY=IP:DisplayNum or export DISPLAY=:DisplayNum for localhost; So that can vnc connect and see the vnc desktop :2 if $DISPLAY is not :2.
    echo '$DISPLAY'=$DISPLAY
    

提交回复
热议问题