Is there a way to start a GUI software on a remote Linux PC via SSH?
=>
We just need to run export DISPLAY=:0 in ssh session and programs run will run on the remote display.
ex:
[email protected]:~$ ssh tim [email protected]:~$ export DISPLAY=:0 [email protected]:~$ firefox
or
#we can shorten this all down into one command that will connect, export the display in-line and start the application in a way that won‘t close it after the ssh session dies
ssh tim "DISPLAY=:0 nohup firefox"
时间: 2024-08-02 08:08:35