Run application on local machine and show GUI on remote display












34














Is it possible to run an application on my local desktop but display the GUI on my laptop (remote X)?



I'm wondering if it is possible to emulate a dual-monitor setup using 2 distinct lan connected machines.



I have installed synergy and I can easily control my laptop with the desktop keyboard/mouse, but I would also like to just run something on the desktop and display the GUI on the laptop screen.



From my limited experience with X, I know that I can run a program on a remote machine and use the display of the first to show the output, but not the other way around.



Any pointers would be of great help. Thank you



P.S. Running XFCE 4.10 on Ubuntu 12.10










share|improve this question





























    34














    Is it possible to run an application on my local desktop but display the GUI on my laptop (remote X)?



    I'm wondering if it is possible to emulate a dual-monitor setup using 2 distinct lan connected machines.



    I have installed synergy and I can easily control my laptop with the desktop keyboard/mouse, but I would also like to just run something on the desktop and display the GUI on the laptop screen.



    From my limited experience with X, I know that I can run a program on a remote machine and use the display of the first to show the output, but not the other way around.



    Any pointers would be of great help. Thank you



    P.S. Running XFCE 4.10 on Ubuntu 12.10










    share|improve this question



























      34












      34








      34


      26





      Is it possible to run an application on my local desktop but display the GUI on my laptop (remote X)?



      I'm wondering if it is possible to emulate a dual-monitor setup using 2 distinct lan connected machines.



      I have installed synergy and I can easily control my laptop with the desktop keyboard/mouse, but I would also like to just run something on the desktop and display the GUI on the laptop screen.



      From my limited experience with X, I know that I can run a program on a remote machine and use the display of the first to show the output, but not the other way around.



      Any pointers would be of great help. Thank you



      P.S. Running XFCE 4.10 on Ubuntu 12.10










      share|improve this question















      Is it possible to run an application on my local desktop but display the GUI on my laptop (remote X)?



      I'm wondering if it is possible to emulate a dual-monitor setup using 2 distinct lan connected machines.



      I have installed synergy and I can easily control my laptop with the desktop keyboard/mouse, but I would also like to just run something on the desktop and display the GUI on the laptop screen.



      From my limited experience with X, I know that I can run a program on a remote machine and use the display of the first to show the output, but not the other way around.



      Any pointers would be of great help. Thank you



      P.S. Running XFCE 4.10 on Ubuntu 12.10







      xorg xfce remote-x-session






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 20 '12 at 9:49







      Vlad Balmos

















      asked Oct 19 '12 at 19:44









      Vlad BalmosVlad Balmos

      1481311




      1481311






















          7 Answers
          7






          active

          oldest

          votes


















          36














          Variant A - Shooting X Windows to another DISPLAY:





          1. See to it, that the Xserver on your Laptop starts up listening to tcp connections. Sadly X11-Networking is disabled by default in most distributions. Since the Xserver is started by your display manager (gdm, lightdm) this has to be configured there:



            Whatever display manager you use, some configuration file in /etc/ will probably contain the responsible XServer parameter. Run grep -r 'nolisten tcp' /etc/ on your Laptop to find out which config file is responsible and remove the part where it says -nolisten tcp (not the entire line, just this parameter). Restart X on your Laptop.



            Your Laptop should now have a display running on tcp port 6000 (try running nmap -p6000 Laptop on your Desktop PC, if the port reported as "open", you came this far).




          2. Make your X-display available to the desktop computer. X11 uses an authentication mechanism to grant access to a display. You have to allow the desktop PC to shoot Windows onto the Laptop. Normally by exchanging a display cookie.



            For starters perform this step with hands on your notebook. Once you have gotten the concept with the DISPLAY variable and everything, you can do this via ssh.



            Quick and dirty: You can run xhost +desktops.computers.ip.address on your laptop to grant X access to the desktop computer. Note that every user on your laptops computer can use your laptops X display this way. Note that this is sufficient i.e. for installing a keylogger on your laptops display. Use this method only for testing.



            Correct and secure: run xauth extract cookie-file :0 on your laptop to export your display access secret to "cookie-file". Transfer the cookie to your Desktop machine. Run xauth merge cookie-file. Or in one short step (from your desktop) ssh Laptop xauth extract - :0 |xauth merge - Note: if your laptop and desktop are sharing a home directory i.e. via nfs you don't need to exchange any credentials. The credential database is the .Xauthority file in your home dir, and can be shared among different machines.



          3. Run the program: In a terminal on your desktop PC run export DISPLAY=Your.Laptops.IP.Address:0, run any X program in the same terminal. It should appear on the notebooks display.



          Variant B - Using SSH with a twist.



          SSH accomplishes X11 forwarding by forwardin a local X11 socket (normally a Unix Domain Socket) to a local TCP socket on the remote machine, then negotiating the display cookie, then setting the DISPLAY-Environment on the remote machine. This way all X11 traffic is encrypted over the ssh tunnel. The normal use case is to forward the local display to the remote machine (meaning allow remote applications to display x windows locally).



          The advantage of using ssh is, that you don't need to put your X-Server into tcp listen mode (since the unix socket is used). And ssh handles the credential exchange.




          1. SSH to your laptop from your desktop computer (you don't need to use -X yet).

          2. In the remote shell enter export DISPLAY=:0 this makes the already running display on your notebook available to the shell you got via ssh. If you run any X command now, it will already appear on your notebook screen, but still run on your laptop (try it out to be safe).

          3. From this shell ssh back to your desktop computer, use -X this time. You now have a shell on the machine on which the ssh session originated but this time with working X. Run xeyes or xcalc to test it.


          4. echo $DISPLAY shows you the designation, your laptops X display has now on your desktop computer. I.e. :10 or :11.


          5. You can minimize the terminal now. Anytime you enter export DISPLAY=:10 (see what display number you got) on your desktop computer now, each program you run afterwards in the same shell will appear on you notebooks screen.



            This Variant is easy but slow, since all X11 traffic is forwarded via SSH.




          Variant C - The original thinclient concept:



          You can use your laptop to Open a desktop session running entirely on your desktop computer.




          1. Configure the display manager on your Desktop to answer to XDMCP Broadcasts. How to do this depends on your display manager. Some display managers don't support this at all, i.e. slim. XDM, KDM, WDM, GDM do support it.



          2. Start a X-Server on your Laptop, which requests the display manager from your desktop. Either a nested X: Xephyr :1 -query desktop or Xephyr :1 -broadcast
            Or by shutting down your Notebooks X-Server and enter on a System Terminal sudo Xorg :0 -broadcast



            The display manager will see to it, that credentials are generated and exchanged and everything. Congrats, you should now see a login window provided by your desktop computer.








          share|improve this answer



















          • 2




            BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
            – Paul Hänsch
            Oct 27 '12 at 14:57






          • 6




            Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
            – Paul Hänsch
            Oct 27 '12 at 14:59










          • General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
            – Paul Hänsch
            Oct 27 '12 at 21:07










          • Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
            – Xen2050
            Dec 27 '17 at 3:09



















          18





          +50









          You can use ssh X forwarding to achieve your goal. If you are in the same subnet than it is quit fast.



          Install the ssh server and client on your laptop and desktop PC



          sudo apt-get install ssh


          To connect to the desktop PC, open a terminal on the laptop and type the following



          ssh -X username@desktop_pc_ip


          And you can start any software using the terminal, for example starting Firefox, just type firefox in the terminal.






          share|improve this answer



















          • 2




            Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
            – Matrix Mole
            Oct 22 '12 at 6:25










          • Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
            – Vlad Balmos
            Oct 22 '12 at 8:59






          • 2




            Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
            – OHLÁLÁ
            Oct 22 '12 at 12:35










          • @iUngi i'm already using synergy for that, thanks anyway
            – Vlad Balmos
            Oct 22 '12 at 17:00










          • Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
            – mc0e
            Nov 21 '14 at 14:51





















          7














          Preparation



          (you do this only once)



          In your desktop install SSH server




          sudo apt-get install openssh-server






          From your laptop:




          ssh -X username@desktop_pc_ip




          In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on.



          On your terminal you run




          echo $DISPLAY




          This will show you something like:



          localhost:10.0




          From your desktop:



          Open a terminal and run



          DISPLAY=:10.0 firefox



          This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0) is the same as in the echo result






          share|improve this answer































            3














            You are looking at using a combination of SSH and screen then to get the situation you want.



            On your desktop, install screen:



            sudo apt-get install screen


            From there, start up a new screen session:



            screen


            and open firefox in it:



            firefox


            Use firefox all you want on your desktop, then ssh into your computer from your laptop:



            ssh -X username@hostname


            Type the following command to see which screen sessions you have running:



            screen -ls


            Log in to your screen session (1234 would be the number screen -ls gave you)



            screen -x 1234


            Then you can use firefox on your laptop and close the terminal on your desktop.






            share|improve this answer





















            • tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
              – Vlad Balmos
              Oct 23 '12 at 20:38










            • You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
              – Paul Hänsch
              Oct 27 '12 at 21:11





















            3














            Virtualgl will create an extra(background) desktop (TightVNC Style) that you can access via a turbo VNC client. It will function as a remote desktop type deal -> But it will play smooth video over a network.



            If you looking for a way to offload CPU overhead for a remote connection, so you can run apps from your computer on your laptop, then that would be what I would do.



            http://www.virtualgl.org/





            You can also export the desktop environment through SSH as /dude above mentioned.






            share|improve this answer





















            • Thank you. Looks promising. I'll take a look and keep you posted.
              – Vlad Balmos
              Oct 24 '12 at 10:21










            • Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
              – TardisGuy
              Oct 25 '12 at 8:45



















            1














            After some more digging online i came accross DMX



            From the home page




            Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen.







            share|improve this answer

















            • 1




              this would be a better answer if you can give instructions how to install and how to use.
              – fossfreedom
              Oct 24 '12 at 12:26










            • XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
              – Mariusz
              Oct 24 '14 at 12:12



















            1














            Yes, it is possible. I am taking both linux computer with xclock installed on local computer. I am trying to run xclock locally and show the clock on remote linux computer.



            reboot the remote machine
            Disable firewall
            Disable SELINUX
            Check $DISPLAY variable value by command
            echo $DISPLAY
            Let say its value is :1
            run command
            xhost +

            Now on local computer
            xclock -display remote_machine_IP_address:1





            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f203173%2frun-application-on-local-machine-and-show-gui-on-remote-display%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              36














              Variant A - Shooting X Windows to another DISPLAY:





              1. See to it, that the Xserver on your Laptop starts up listening to tcp connections. Sadly X11-Networking is disabled by default in most distributions. Since the Xserver is started by your display manager (gdm, lightdm) this has to be configured there:



                Whatever display manager you use, some configuration file in /etc/ will probably contain the responsible XServer parameter. Run grep -r 'nolisten tcp' /etc/ on your Laptop to find out which config file is responsible and remove the part where it says -nolisten tcp (not the entire line, just this parameter). Restart X on your Laptop.



                Your Laptop should now have a display running on tcp port 6000 (try running nmap -p6000 Laptop on your Desktop PC, if the port reported as "open", you came this far).




              2. Make your X-display available to the desktop computer. X11 uses an authentication mechanism to grant access to a display. You have to allow the desktop PC to shoot Windows onto the Laptop. Normally by exchanging a display cookie.



                For starters perform this step with hands on your notebook. Once you have gotten the concept with the DISPLAY variable and everything, you can do this via ssh.



                Quick and dirty: You can run xhost +desktops.computers.ip.address on your laptop to grant X access to the desktop computer. Note that every user on your laptops computer can use your laptops X display this way. Note that this is sufficient i.e. for installing a keylogger on your laptops display. Use this method only for testing.



                Correct and secure: run xauth extract cookie-file :0 on your laptop to export your display access secret to "cookie-file". Transfer the cookie to your Desktop machine. Run xauth merge cookie-file. Or in one short step (from your desktop) ssh Laptop xauth extract - :0 |xauth merge - Note: if your laptop and desktop are sharing a home directory i.e. via nfs you don't need to exchange any credentials. The credential database is the .Xauthority file in your home dir, and can be shared among different machines.



              3. Run the program: In a terminal on your desktop PC run export DISPLAY=Your.Laptops.IP.Address:0, run any X program in the same terminal. It should appear on the notebooks display.



              Variant B - Using SSH with a twist.



              SSH accomplishes X11 forwarding by forwardin a local X11 socket (normally a Unix Domain Socket) to a local TCP socket on the remote machine, then negotiating the display cookie, then setting the DISPLAY-Environment on the remote machine. This way all X11 traffic is encrypted over the ssh tunnel. The normal use case is to forward the local display to the remote machine (meaning allow remote applications to display x windows locally).



              The advantage of using ssh is, that you don't need to put your X-Server into tcp listen mode (since the unix socket is used). And ssh handles the credential exchange.




              1. SSH to your laptop from your desktop computer (you don't need to use -X yet).

              2. In the remote shell enter export DISPLAY=:0 this makes the already running display on your notebook available to the shell you got via ssh. If you run any X command now, it will already appear on your notebook screen, but still run on your laptop (try it out to be safe).

              3. From this shell ssh back to your desktop computer, use -X this time. You now have a shell on the machine on which the ssh session originated but this time with working X. Run xeyes or xcalc to test it.


              4. echo $DISPLAY shows you the designation, your laptops X display has now on your desktop computer. I.e. :10 or :11.


              5. You can minimize the terminal now. Anytime you enter export DISPLAY=:10 (see what display number you got) on your desktop computer now, each program you run afterwards in the same shell will appear on you notebooks screen.



                This Variant is easy but slow, since all X11 traffic is forwarded via SSH.




              Variant C - The original thinclient concept:



              You can use your laptop to Open a desktop session running entirely on your desktop computer.




              1. Configure the display manager on your Desktop to answer to XDMCP Broadcasts. How to do this depends on your display manager. Some display managers don't support this at all, i.e. slim. XDM, KDM, WDM, GDM do support it.



              2. Start a X-Server on your Laptop, which requests the display manager from your desktop. Either a nested X: Xephyr :1 -query desktop or Xephyr :1 -broadcast
                Or by shutting down your Notebooks X-Server and enter on a System Terminal sudo Xorg :0 -broadcast



                The display manager will see to it, that credentials are generated and exchanged and everything. Congrats, you should now see a login window provided by your desktop computer.








              share|improve this answer



















              • 2




                BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
                – Paul Hänsch
                Oct 27 '12 at 14:57






              • 6




                Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
                – Paul Hänsch
                Oct 27 '12 at 14:59










              • General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
                – Paul Hänsch
                Oct 27 '12 at 21:07










              • Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
                – Xen2050
                Dec 27 '17 at 3:09
















              36














              Variant A - Shooting X Windows to another DISPLAY:





              1. See to it, that the Xserver on your Laptop starts up listening to tcp connections. Sadly X11-Networking is disabled by default in most distributions. Since the Xserver is started by your display manager (gdm, lightdm) this has to be configured there:



                Whatever display manager you use, some configuration file in /etc/ will probably contain the responsible XServer parameter. Run grep -r 'nolisten tcp' /etc/ on your Laptop to find out which config file is responsible and remove the part where it says -nolisten tcp (not the entire line, just this parameter). Restart X on your Laptop.



                Your Laptop should now have a display running on tcp port 6000 (try running nmap -p6000 Laptop on your Desktop PC, if the port reported as "open", you came this far).




              2. Make your X-display available to the desktop computer. X11 uses an authentication mechanism to grant access to a display. You have to allow the desktop PC to shoot Windows onto the Laptop. Normally by exchanging a display cookie.



                For starters perform this step with hands on your notebook. Once you have gotten the concept with the DISPLAY variable and everything, you can do this via ssh.



                Quick and dirty: You can run xhost +desktops.computers.ip.address on your laptop to grant X access to the desktop computer. Note that every user on your laptops computer can use your laptops X display this way. Note that this is sufficient i.e. for installing a keylogger on your laptops display. Use this method only for testing.



                Correct and secure: run xauth extract cookie-file :0 on your laptop to export your display access secret to "cookie-file". Transfer the cookie to your Desktop machine. Run xauth merge cookie-file. Or in one short step (from your desktop) ssh Laptop xauth extract - :0 |xauth merge - Note: if your laptop and desktop are sharing a home directory i.e. via nfs you don't need to exchange any credentials. The credential database is the .Xauthority file in your home dir, and can be shared among different machines.



              3. Run the program: In a terminal on your desktop PC run export DISPLAY=Your.Laptops.IP.Address:0, run any X program in the same terminal. It should appear on the notebooks display.



              Variant B - Using SSH with a twist.



              SSH accomplishes X11 forwarding by forwardin a local X11 socket (normally a Unix Domain Socket) to a local TCP socket on the remote machine, then negotiating the display cookie, then setting the DISPLAY-Environment on the remote machine. This way all X11 traffic is encrypted over the ssh tunnel. The normal use case is to forward the local display to the remote machine (meaning allow remote applications to display x windows locally).



              The advantage of using ssh is, that you don't need to put your X-Server into tcp listen mode (since the unix socket is used). And ssh handles the credential exchange.




              1. SSH to your laptop from your desktop computer (you don't need to use -X yet).

              2. In the remote shell enter export DISPLAY=:0 this makes the already running display on your notebook available to the shell you got via ssh. If you run any X command now, it will already appear on your notebook screen, but still run on your laptop (try it out to be safe).

              3. From this shell ssh back to your desktop computer, use -X this time. You now have a shell on the machine on which the ssh session originated but this time with working X. Run xeyes or xcalc to test it.


              4. echo $DISPLAY shows you the designation, your laptops X display has now on your desktop computer. I.e. :10 or :11.


              5. You can minimize the terminal now. Anytime you enter export DISPLAY=:10 (see what display number you got) on your desktop computer now, each program you run afterwards in the same shell will appear on you notebooks screen.



                This Variant is easy but slow, since all X11 traffic is forwarded via SSH.




              Variant C - The original thinclient concept:



              You can use your laptop to Open a desktop session running entirely on your desktop computer.




              1. Configure the display manager on your Desktop to answer to XDMCP Broadcasts. How to do this depends on your display manager. Some display managers don't support this at all, i.e. slim. XDM, KDM, WDM, GDM do support it.



              2. Start a X-Server on your Laptop, which requests the display manager from your desktop. Either a nested X: Xephyr :1 -query desktop or Xephyr :1 -broadcast
                Or by shutting down your Notebooks X-Server and enter on a System Terminal sudo Xorg :0 -broadcast



                The display manager will see to it, that credentials are generated and exchanged and everything. Congrats, you should now see a login window provided by your desktop computer.








              share|improve this answer



















              • 2




                BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
                – Paul Hänsch
                Oct 27 '12 at 14:57






              • 6




                Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
                – Paul Hänsch
                Oct 27 '12 at 14:59










              • General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
                – Paul Hänsch
                Oct 27 '12 at 21:07










              • Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
                – Xen2050
                Dec 27 '17 at 3:09














              36












              36








              36






              Variant A - Shooting X Windows to another DISPLAY:





              1. See to it, that the Xserver on your Laptop starts up listening to tcp connections. Sadly X11-Networking is disabled by default in most distributions. Since the Xserver is started by your display manager (gdm, lightdm) this has to be configured there:



                Whatever display manager you use, some configuration file in /etc/ will probably contain the responsible XServer parameter. Run grep -r 'nolisten tcp' /etc/ on your Laptop to find out which config file is responsible and remove the part where it says -nolisten tcp (not the entire line, just this parameter). Restart X on your Laptop.



                Your Laptop should now have a display running on tcp port 6000 (try running nmap -p6000 Laptop on your Desktop PC, if the port reported as "open", you came this far).




              2. Make your X-display available to the desktop computer. X11 uses an authentication mechanism to grant access to a display. You have to allow the desktop PC to shoot Windows onto the Laptop. Normally by exchanging a display cookie.



                For starters perform this step with hands on your notebook. Once you have gotten the concept with the DISPLAY variable and everything, you can do this via ssh.



                Quick and dirty: You can run xhost +desktops.computers.ip.address on your laptop to grant X access to the desktop computer. Note that every user on your laptops computer can use your laptops X display this way. Note that this is sufficient i.e. for installing a keylogger on your laptops display. Use this method only for testing.



                Correct and secure: run xauth extract cookie-file :0 on your laptop to export your display access secret to "cookie-file". Transfer the cookie to your Desktop machine. Run xauth merge cookie-file. Or in one short step (from your desktop) ssh Laptop xauth extract - :0 |xauth merge - Note: if your laptop and desktop are sharing a home directory i.e. via nfs you don't need to exchange any credentials. The credential database is the .Xauthority file in your home dir, and can be shared among different machines.



              3. Run the program: In a terminal on your desktop PC run export DISPLAY=Your.Laptops.IP.Address:0, run any X program in the same terminal. It should appear on the notebooks display.



              Variant B - Using SSH with a twist.



              SSH accomplishes X11 forwarding by forwardin a local X11 socket (normally a Unix Domain Socket) to a local TCP socket on the remote machine, then negotiating the display cookie, then setting the DISPLAY-Environment on the remote machine. This way all X11 traffic is encrypted over the ssh tunnel. The normal use case is to forward the local display to the remote machine (meaning allow remote applications to display x windows locally).



              The advantage of using ssh is, that you don't need to put your X-Server into tcp listen mode (since the unix socket is used). And ssh handles the credential exchange.




              1. SSH to your laptop from your desktop computer (you don't need to use -X yet).

              2. In the remote shell enter export DISPLAY=:0 this makes the already running display on your notebook available to the shell you got via ssh. If you run any X command now, it will already appear on your notebook screen, but still run on your laptop (try it out to be safe).

              3. From this shell ssh back to your desktop computer, use -X this time. You now have a shell on the machine on which the ssh session originated but this time with working X. Run xeyes or xcalc to test it.


              4. echo $DISPLAY shows you the designation, your laptops X display has now on your desktop computer. I.e. :10 or :11.


              5. You can minimize the terminal now. Anytime you enter export DISPLAY=:10 (see what display number you got) on your desktop computer now, each program you run afterwards in the same shell will appear on you notebooks screen.



                This Variant is easy but slow, since all X11 traffic is forwarded via SSH.




              Variant C - The original thinclient concept:



              You can use your laptop to Open a desktop session running entirely on your desktop computer.




              1. Configure the display manager on your Desktop to answer to XDMCP Broadcasts. How to do this depends on your display manager. Some display managers don't support this at all, i.e. slim. XDM, KDM, WDM, GDM do support it.



              2. Start a X-Server on your Laptop, which requests the display manager from your desktop. Either a nested X: Xephyr :1 -query desktop or Xephyr :1 -broadcast
                Or by shutting down your Notebooks X-Server and enter on a System Terminal sudo Xorg :0 -broadcast



                The display manager will see to it, that credentials are generated and exchanged and everything. Congrats, you should now see a login window provided by your desktop computer.








              share|improve this answer














              Variant A - Shooting X Windows to another DISPLAY:





              1. See to it, that the Xserver on your Laptop starts up listening to tcp connections. Sadly X11-Networking is disabled by default in most distributions. Since the Xserver is started by your display manager (gdm, lightdm) this has to be configured there:



                Whatever display manager you use, some configuration file in /etc/ will probably contain the responsible XServer parameter. Run grep -r 'nolisten tcp' /etc/ on your Laptop to find out which config file is responsible and remove the part where it says -nolisten tcp (not the entire line, just this parameter). Restart X on your Laptop.



                Your Laptop should now have a display running on tcp port 6000 (try running nmap -p6000 Laptop on your Desktop PC, if the port reported as "open", you came this far).




              2. Make your X-display available to the desktop computer. X11 uses an authentication mechanism to grant access to a display. You have to allow the desktop PC to shoot Windows onto the Laptop. Normally by exchanging a display cookie.



                For starters perform this step with hands on your notebook. Once you have gotten the concept with the DISPLAY variable and everything, you can do this via ssh.



                Quick and dirty: You can run xhost +desktops.computers.ip.address on your laptop to grant X access to the desktop computer. Note that every user on your laptops computer can use your laptops X display this way. Note that this is sufficient i.e. for installing a keylogger on your laptops display. Use this method only for testing.



                Correct and secure: run xauth extract cookie-file :0 on your laptop to export your display access secret to "cookie-file". Transfer the cookie to your Desktop machine. Run xauth merge cookie-file. Or in one short step (from your desktop) ssh Laptop xauth extract - :0 |xauth merge - Note: if your laptop and desktop are sharing a home directory i.e. via nfs you don't need to exchange any credentials. The credential database is the .Xauthority file in your home dir, and can be shared among different machines.



              3. Run the program: In a terminal on your desktop PC run export DISPLAY=Your.Laptops.IP.Address:0, run any X program in the same terminal. It should appear on the notebooks display.



              Variant B - Using SSH with a twist.



              SSH accomplishes X11 forwarding by forwardin a local X11 socket (normally a Unix Domain Socket) to a local TCP socket on the remote machine, then negotiating the display cookie, then setting the DISPLAY-Environment on the remote machine. This way all X11 traffic is encrypted over the ssh tunnel. The normal use case is to forward the local display to the remote machine (meaning allow remote applications to display x windows locally).



              The advantage of using ssh is, that you don't need to put your X-Server into tcp listen mode (since the unix socket is used). And ssh handles the credential exchange.




              1. SSH to your laptop from your desktop computer (you don't need to use -X yet).

              2. In the remote shell enter export DISPLAY=:0 this makes the already running display on your notebook available to the shell you got via ssh. If you run any X command now, it will already appear on your notebook screen, but still run on your laptop (try it out to be safe).

              3. From this shell ssh back to your desktop computer, use -X this time. You now have a shell on the machine on which the ssh session originated but this time with working X. Run xeyes or xcalc to test it.


              4. echo $DISPLAY shows you the designation, your laptops X display has now on your desktop computer. I.e. :10 or :11.


              5. You can minimize the terminal now. Anytime you enter export DISPLAY=:10 (see what display number you got) on your desktop computer now, each program you run afterwards in the same shell will appear on you notebooks screen.



                This Variant is easy but slow, since all X11 traffic is forwarded via SSH.




              Variant C - The original thinclient concept:



              You can use your laptop to Open a desktop session running entirely on your desktop computer.




              1. Configure the display manager on your Desktop to answer to XDMCP Broadcasts. How to do this depends on your display manager. Some display managers don't support this at all, i.e. slim. XDM, KDM, WDM, GDM do support it.



              2. Start a X-Server on your Laptop, which requests the display manager from your desktop. Either a nested X: Xephyr :1 -query desktop or Xephyr :1 -broadcast
                Or by shutting down your Notebooks X-Server and enter on a System Terminal sudo Xorg :0 -broadcast



                The display manager will see to it, that credentials are generated and exchanged and everything. Congrats, you should now see a login window provided by your desktop computer.









              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 13 '17 at 9:08









              Cyclic3

              14116




              14116










              answered Oct 27 '12 at 14:44









              Paul HänschPaul Hänsch

              2,6791514




              2,6791514








              • 2




                BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
                – Paul Hänsch
                Oct 27 '12 at 14:57






              • 6




                Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
                – Paul Hänsch
                Oct 27 '12 at 14:59










              • General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
                – Paul Hänsch
                Oct 27 '12 at 21:07










              • Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
                – Xen2050
                Dec 27 '17 at 3:09














              • 2




                BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
                – Paul Hänsch
                Oct 27 '12 at 14:57






              • 6




                Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
                – Paul Hänsch
                Oct 27 '12 at 14:59










              • General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
                – Paul Hänsch
                Oct 27 '12 at 21:07










              • Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
                – Xen2050
                Dec 27 '17 at 3:09








              2




              2




              BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
              – Paul Hänsch
              Oct 27 '12 at 14:57




              BTW. All this wonderful X11-Functionality will just stop working once Ubuntu switches to Wayland. NAtive wayland applications cannot even be forwarded via ssh anymore.
              – Paul Hänsch
              Oct 27 '12 at 14:57




              6




              6




              Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
              – Paul Hänsch
              Oct 27 '12 at 14:59




              Isn't it quite ironical that there is no graphical toolchain to control your X-Server? If you truly want to work with GUIs you have to dominate the command line first.
              – Paul Hänsch
              Oct 27 '12 at 14:59












              General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
              – Paul Hänsch
              Oct 27 '12 at 21:07




              General Hint: The first program you may want to start on your remote display is an application starter. I.e. lxpanel or something. This savel a lot of command line work.
              – Paul Hänsch
              Oct 27 '12 at 21:07












              Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
              – Xen2050
              Dec 27 '17 at 3:09




              Does this still work for Ubuntu 17's + ... or has the Wayland prediction come to pass?
              – Xen2050
              Dec 27 '17 at 3:09













              18





              +50









              You can use ssh X forwarding to achieve your goal. If you are in the same subnet than it is quit fast.



              Install the ssh server and client on your laptop and desktop PC



              sudo apt-get install ssh


              To connect to the desktop PC, open a terminal on the laptop and type the following



              ssh -X username@desktop_pc_ip


              And you can start any software using the terminal, for example starting Firefox, just type firefox in the terminal.






              share|improve this answer



















              • 2




                Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
                – Matrix Mole
                Oct 22 '12 at 6:25










              • Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
                – Vlad Balmos
                Oct 22 '12 at 8:59






              • 2




                Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
                – OHLÁLÁ
                Oct 22 '12 at 12:35










              • @iUngi i'm already using synergy for that, thanks anyway
                – Vlad Balmos
                Oct 22 '12 at 17:00










              • Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
                – mc0e
                Nov 21 '14 at 14:51


















              18





              +50









              You can use ssh X forwarding to achieve your goal. If you are in the same subnet than it is quit fast.



              Install the ssh server and client on your laptop and desktop PC



              sudo apt-get install ssh


              To connect to the desktop PC, open a terminal on the laptop and type the following



              ssh -X username@desktop_pc_ip


              And you can start any software using the terminal, for example starting Firefox, just type firefox in the terminal.






              share|improve this answer



















              • 2




                Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
                – Matrix Mole
                Oct 22 '12 at 6:25










              • Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
                – Vlad Balmos
                Oct 22 '12 at 8:59






              • 2




                Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
                – OHLÁLÁ
                Oct 22 '12 at 12:35










              • @iUngi i'm already using synergy for that, thanks anyway
                – Vlad Balmos
                Oct 22 '12 at 17:00










              • Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
                – mc0e
                Nov 21 '14 at 14:51
















              18





              +50







              18





              +50



              18




              +50




              You can use ssh X forwarding to achieve your goal. If you are in the same subnet than it is quit fast.



              Install the ssh server and client on your laptop and desktop PC



              sudo apt-get install ssh


              To connect to the desktop PC, open a terminal on the laptop and type the following



              ssh -X username@desktop_pc_ip


              And you can start any software using the terminal, for example starting Firefox, just type firefox in the terminal.






              share|improve this answer














              You can use ssh X forwarding to achieve your goal. If you are in the same subnet than it is quit fast.



              Install the ssh server and client on your laptop and desktop PC



              sudo apt-get install ssh


              To connect to the desktop PC, open a terminal on the laptop and type the following



              ssh -X username@desktop_pc_ip


              And you can start any software using the terminal, for example starting Firefox, just type firefox in the terminal.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 22 '12 at 6:34

























              answered Oct 22 '12 at 6:16









              OHLÁLÁOHLÁLÁ

              2,15272748




              2,15272748








              • 2




                Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
                – Matrix Mole
                Oct 22 '12 at 6:25










              • Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
                – Vlad Balmos
                Oct 22 '12 at 8:59






              • 2




                Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
                – OHLÁLÁ
                Oct 22 '12 at 12:35










              • @iUngi i'm already using synergy for that, thanks anyway
                – Vlad Balmos
                Oct 22 '12 at 17:00










              • Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
                – mc0e
                Nov 21 '14 at 14:51
















              • 2




                Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
                – Matrix Mole
                Oct 22 '12 at 6:25










              • Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
                – Vlad Balmos
                Oct 22 '12 at 8:59






              • 2




                Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
                – OHLÁLÁ
                Oct 22 '12 at 12:35










              • @iUngi i'm already using synergy for that, thanks anyway
                – Vlad Balmos
                Oct 22 '12 at 17:00










              • Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
                – mc0e
                Nov 21 '14 at 14:51










              2




              2




              Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
              – Matrix Mole
              Oct 22 '12 at 6:25




              Don't forget to verify that the sshd config files (usually /etc/ssh/sshd_config) have X11Forwarding set to yes as well.
              – Matrix Mole
              Oct 22 '12 at 6:25












              Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
              – Vlad Balmos
              Oct 22 '12 at 8:59




              Here's my use case: I'm on my desktop and i open Firefox, for example, but i want the browser window to open on my laptop display and still run on my desktop. I'm looking for a functionality similar to workspaces, but instead of a local workspace (4 screens on the same pc) to use a remote workspace (the laptop)
              – Vlad Balmos
              Oct 22 '12 at 8:59




              2




              2




              Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
              – OHLÁLÁ
              Oct 22 '12 at 12:35




              Also you can try the x2x package, you can use one keyboard and mouse in different machine. ex: ssh -X user@host x2x -west -to :0
              – OHLÁLÁ
              Oct 22 '12 at 12:35












              @iUngi i'm already using synergy for that, thanks anyway
              – Vlad Balmos
              Oct 22 '12 at 17:00




              @iUngi i'm already using synergy for that, thanks anyway
              – Vlad Balmos
              Oct 22 '12 at 17:00












              Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
              – mc0e
              Nov 21 '14 at 14:51






              Be aware that by opening up access to your desktop's X server, you're giving quite wide ranging access to the remote machine. If your server was compromised, this could be used to get into your desktop as well. X11 forwarding is useful, but think about what you are doing, and don't turn it on by default.
              – mc0e
              Nov 21 '14 at 14:51













              7














              Preparation



              (you do this only once)



              In your desktop install SSH server




              sudo apt-get install openssh-server






              From your laptop:




              ssh -X username@desktop_pc_ip




              In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on.



              On your terminal you run




              echo $DISPLAY




              This will show you something like:



              localhost:10.0




              From your desktop:



              Open a terminal and run



              DISPLAY=:10.0 firefox



              This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0) is the same as in the echo result






              share|improve this answer




























                7














                Preparation



                (you do this only once)



                In your desktop install SSH server




                sudo apt-get install openssh-server






                From your laptop:




                ssh -X username@desktop_pc_ip




                In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on.



                On your terminal you run




                echo $DISPLAY




                This will show you something like:



                localhost:10.0




                From your desktop:



                Open a terminal and run



                DISPLAY=:10.0 firefox



                This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0) is the same as in the echo result






                share|improve this answer


























                  7












                  7








                  7






                  Preparation



                  (you do this only once)



                  In your desktop install SSH server




                  sudo apt-get install openssh-server






                  From your laptop:




                  ssh -X username@desktop_pc_ip




                  In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on.



                  On your terminal you run




                  echo $DISPLAY




                  This will show you something like:



                  localhost:10.0




                  From your desktop:



                  Open a terminal and run



                  DISPLAY=:10.0 firefox



                  This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0) is the same as in the echo result






                  share|improve this answer














                  Preparation



                  (you do this only once)



                  In your desktop install SSH server




                  sudo apt-get install openssh-server






                  From your laptop:




                  ssh -X username@desktop_pc_ip




                  In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on.



                  On your terminal you run




                  echo $DISPLAY




                  This will show you something like:



                  localhost:10.0




                  From your desktop:



                  Open a terminal and run



                  DISPLAY=:10.0 firefox



                  This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0) is the same as in the echo result







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 27 '12 at 18:22

























                  answered Oct 27 '12 at 18:14









                  Nick AndrikNick Andrik

                  1,916195




                  1,916195























                      3














                      You are looking at using a combination of SSH and screen then to get the situation you want.



                      On your desktop, install screen:



                      sudo apt-get install screen


                      From there, start up a new screen session:



                      screen


                      and open firefox in it:



                      firefox


                      Use firefox all you want on your desktop, then ssh into your computer from your laptop:



                      ssh -X username@hostname


                      Type the following command to see which screen sessions you have running:



                      screen -ls


                      Log in to your screen session (1234 would be the number screen -ls gave you)



                      screen -x 1234


                      Then you can use firefox on your laptop and close the terminal on your desktop.






                      share|improve this answer





















                      • tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                        – Vlad Balmos
                        Oct 23 '12 at 20:38










                      • You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                        – Paul Hänsch
                        Oct 27 '12 at 21:11


















                      3














                      You are looking at using a combination of SSH and screen then to get the situation you want.



                      On your desktop, install screen:



                      sudo apt-get install screen


                      From there, start up a new screen session:



                      screen


                      and open firefox in it:



                      firefox


                      Use firefox all you want on your desktop, then ssh into your computer from your laptop:



                      ssh -X username@hostname


                      Type the following command to see which screen sessions you have running:



                      screen -ls


                      Log in to your screen session (1234 would be the number screen -ls gave you)



                      screen -x 1234


                      Then you can use firefox on your laptop and close the terminal on your desktop.






                      share|improve this answer





















                      • tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                        – Vlad Balmos
                        Oct 23 '12 at 20:38










                      • You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                        – Paul Hänsch
                        Oct 27 '12 at 21:11
















                      3












                      3








                      3






                      You are looking at using a combination of SSH and screen then to get the situation you want.



                      On your desktop, install screen:



                      sudo apt-get install screen


                      From there, start up a new screen session:



                      screen


                      and open firefox in it:



                      firefox


                      Use firefox all you want on your desktop, then ssh into your computer from your laptop:



                      ssh -X username@hostname


                      Type the following command to see which screen sessions you have running:



                      screen -ls


                      Log in to your screen session (1234 would be the number screen -ls gave you)



                      screen -x 1234


                      Then you can use firefox on your laptop and close the terminal on your desktop.






                      share|improve this answer












                      You are looking at using a combination of SSH and screen then to get the situation you want.



                      On your desktop, install screen:



                      sudo apt-get install screen


                      From there, start up a new screen session:



                      screen


                      and open firefox in it:



                      firefox


                      Use firefox all you want on your desktop, then ssh into your computer from your laptop:



                      ssh -X username@hostname


                      Type the following command to see which screen sessions you have running:



                      screen -ls


                      Log in to your screen session (1234 would be the number screen -ls gave you)



                      screen -x 1234


                      Then you can use firefox on your laptop and close the terminal on your desktop.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 23 '12 at 18:09









                      user530873user530873

                      6071423




                      6071423












                      • tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                        – Vlad Balmos
                        Oct 23 '12 at 20:38










                      • You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                        – Paul Hänsch
                        Oct 27 '12 at 21:11




















                      • tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                        – Vlad Balmos
                        Oct 23 '12 at 20:38










                      • You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                        – Paul Hänsch
                        Oct 27 '12 at 21:11


















                      tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                      – Vlad Balmos
                      Oct 23 '12 at 20:38




                      tried that. opened up screen from terminal, started firefox on the desktop, then sshed from the laptop into the desktop, attached the screen session, but i don't get any window on the laptop, just the output from the running program in screen.
                      – Vlad Balmos
                      Oct 23 '12 at 20:38












                      You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                      – Paul Hänsch
                      Oct 27 '12 at 21:11






                      You were mixing it up. Wait... at least one of you did. Install screen on your desktop computer, use your notebook to ssh -X to your desktop, start screen in the ssh session, detach it and leave the session running. Then reattach the screen session with hands on your desktop computer and run something. This is similiar to my "SSH with a twist" answer. Using screen makes it a bit more conveniant.
                      – Paul Hänsch
                      Oct 27 '12 at 21:11













                      3














                      Virtualgl will create an extra(background) desktop (TightVNC Style) that you can access via a turbo VNC client. It will function as a remote desktop type deal -> But it will play smooth video over a network.



                      If you looking for a way to offload CPU overhead for a remote connection, so you can run apps from your computer on your laptop, then that would be what I would do.



                      http://www.virtualgl.org/





                      You can also export the desktop environment through SSH as /dude above mentioned.






                      share|improve this answer





















                      • Thank you. Looks promising. I'll take a look and keep you posted.
                        – Vlad Balmos
                        Oct 24 '12 at 10:21










                      • Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                        – TardisGuy
                        Oct 25 '12 at 8:45
















                      3














                      Virtualgl will create an extra(background) desktop (TightVNC Style) that you can access via a turbo VNC client. It will function as a remote desktop type deal -> But it will play smooth video over a network.



                      If you looking for a way to offload CPU overhead for a remote connection, so you can run apps from your computer on your laptop, then that would be what I would do.



                      http://www.virtualgl.org/





                      You can also export the desktop environment through SSH as /dude above mentioned.






                      share|improve this answer





















                      • Thank you. Looks promising. I'll take a look and keep you posted.
                        – Vlad Balmos
                        Oct 24 '12 at 10:21










                      • Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                        – TardisGuy
                        Oct 25 '12 at 8:45














                      3












                      3








                      3






                      Virtualgl will create an extra(background) desktop (TightVNC Style) that you can access via a turbo VNC client. It will function as a remote desktop type deal -> But it will play smooth video over a network.



                      If you looking for a way to offload CPU overhead for a remote connection, so you can run apps from your computer on your laptop, then that would be what I would do.



                      http://www.virtualgl.org/





                      You can also export the desktop environment through SSH as /dude above mentioned.






                      share|improve this answer












                      Virtualgl will create an extra(background) desktop (TightVNC Style) that you can access via a turbo VNC client. It will function as a remote desktop type deal -> But it will play smooth video over a network.



                      If you looking for a way to offload CPU overhead for a remote connection, so you can run apps from your computer on your laptop, then that would be what I would do.



                      http://www.virtualgl.org/





                      You can also export the desktop environment through SSH as /dude above mentioned.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 24 '12 at 2:08









                      TardisGuyTardisGuy

                      389517




                      389517












                      • Thank you. Looks promising. I'll take a look and keep you posted.
                        – Vlad Balmos
                        Oct 24 '12 at 10:21










                      • Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                        – TardisGuy
                        Oct 25 '12 at 8:45


















                      • Thank you. Looks promising. I'll take a look and keep you posted.
                        – Vlad Balmos
                        Oct 24 '12 at 10:21










                      • Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                        – TardisGuy
                        Oct 25 '12 at 8:45
















                      Thank you. Looks promising. I'll take a look and keep you posted.
                      – Vlad Balmos
                      Oct 24 '12 at 10:21




                      Thank you. Looks promising. I'll take a look and keep you posted.
                      – Vlad Balmos
                      Oct 24 '12 at 10:21












                      Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                      – TardisGuy
                      Oct 25 '12 at 8:45




                      Yeah, "TurboVNC" (moreso its component VirtualGL) IS the result of my searching for a remote desktop program that would let me play Video Games and Movies. It would function easily as an extra monitor.
                      – TardisGuy
                      Oct 25 '12 at 8:45











                      1














                      After some more digging online i came accross DMX



                      From the home page




                      Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen.







                      share|improve this answer

















                      • 1




                        this would be a better answer if you can give instructions how to install and how to use.
                        – fossfreedom
                        Oct 24 '12 at 12:26










                      • XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                        – Mariusz
                        Oct 24 '14 at 12:12
















                      1














                      After some more digging online i came accross DMX



                      From the home page




                      Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen.







                      share|improve this answer

















                      • 1




                        this would be a better answer if you can give instructions how to install and how to use.
                        – fossfreedom
                        Oct 24 '12 at 12:26










                      • XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                        – Mariusz
                        Oct 24 '14 at 12:12














                      1












                      1








                      1






                      After some more digging online i came accross DMX



                      From the home page




                      Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen.







                      share|improve this answer












                      After some more digging online i came accross DMX



                      From the home page




                      Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen.








                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 24 '12 at 12:21









                      Vlad BalmosVlad Balmos

                      1481311




                      1481311








                      • 1




                        this would be a better answer if you can give instructions how to install and how to use.
                        – fossfreedom
                        Oct 24 '12 at 12:26










                      • XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                        – Mariusz
                        Oct 24 '14 at 12:12














                      • 1




                        this would be a better answer if you can give instructions how to install and how to use.
                        – fossfreedom
                        Oct 24 '12 at 12:26










                      • XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                        – Mariusz
                        Oct 24 '14 at 12:12








                      1




                      1




                      this would be a better answer if you can give instructions how to install and how to use.
                      – fossfreedom
                      Oct 24 '12 at 12:26




                      this would be a better answer if you can give instructions how to install and how to use.
                      – fossfreedom
                      Oct 24 '12 at 12:26












                      XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                      – Mariusz
                      Oct 24 '14 at 12:12




                      XmetaX provides similar functionalities. Is there any alternative to Xdmx and XmetaX?
                      – Mariusz
                      Oct 24 '14 at 12:12











                      1














                      Yes, it is possible. I am taking both linux computer with xclock installed on local computer. I am trying to run xclock locally and show the clock on remote linux computer.



                      reboot the remote machine
                      Disable firewall
                      Disable SELINUX
                      Check $DISPLAY variable value by command
                      echo $DISPLAY
                      Let say its value is :1
                      run command
                      xhost +

                      Now on local computer
                      xclock -display remote_machine_IP_address:1





                      share|improve this answer


























                        1














                        Yes, it is possible. I am taking both linux computer with xclock installed on local computer. I am trying to run xclock locally and show the clock on remote linux computer.



                        reboot the remote machine
                        Disable firewall
                        Disable SELINUX
                        Check $DISPLAY variable value by command
                        echo $DISPLAY
                        Let say its value is :1
                        run command
                        xhost +

                        Now on local computer
                        xclock -display remote_machine_IP_address:1





                        share|improve this answer
























                          1












                          1








                          1






                          Yes, it is possible. I am taking both linux computer with xclock installed on local computer. I am trying to run xclock locally and show the clock on remote linux computer.



                          reboot the remote machine
                          Disable firewall
                          Disable SELINUX
                          Check $DISPLAY variable value by command
                          echo $DISPLAY
                          Let say its value is :1
                          run command
                          xhost +

                          Now on local computer
                          xclock -display remote_machine_IP_address:1





                          share|improve this answer












                          Yes, it is possible. I am taking both linux computer with xclock installed on local computer. I am trying to run xclock locally and show the clock on remote linux computer.



                          reboot the remote machine
                          Disable firewall
                          Disable SELINUX
                          Check $DISPLAY variable value by command
                          echo $DISPLAY
                          Let say its value is :1
                          run command
                          xhost +

                          Now on local computer
                          xclock -display remote_machine_IP_address:1






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 7 at 10:46









                          Mian Asbat AhmadMian Asbat Ahmad

                          12316




                          12316






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f203173%2frun-application-on-local-machine-and-show-gui-on-remote-display%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How did Captain America manage to do this?

                              迪纳利

                              南乌拉尔铁路局