Search code examples
linuxubuntusshdropboxdropbox-api

When I run the script on a remote server it starts up on the local machine


I have nautilus-dropbox installed package on my remote server.

I connect to the remote server by ssh, then run command:

dropbox start

And it starts up on my local machine, how it's possible?


Solution

  • Linux systems use the X11 protocol for most GUI systems.

    The X11 server renders the image and accepts mouse and keyboard input.

    The application acts as a client and connects to whatever X11 server you tell it to. This is done with an environment variable.

    When you connect over SSH, a tunnel is created back to your local X11 server, and the shell spawned by SSH has the environment variable set to point along that tunnel to your local display.