metalx1000

move windows from one computer display to another

Jul 22nd, 2020
449
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #move windows from one computer to another
  2.  
  3. ####on computer 1####
  4. #install xpra -- zenity is just for example
  5. sudo apt install xpra zenity
  6.  
  7. #start xpra - '20' is an unused display
  8. xpra start :20
  9.  
  10. #start a program on that display
  11. export DISPLAY=:20
  12. zenity --info --text 'Msg Box 1' &
  13.  
  14. #or start it with a program
  15. xpra start :20 --start='zenity --info --text "this is a test"'
  16.  
  17. #zenity is now running on display 20
  18. #to view that display, attach to it
  19. #giving the display number is only needed if there is more than one xpra server runnning
  20. #but I put it in anyway, just to be sure
  21. xpra attach :20
  22.  
  23. #######On Computer 2#########
  24. #now, login from remote machine
  25. ssh -X <user>@<computer 1>
  26.  
  27. #move programs to comptuer 2
  28. xpra attach :20
RAW Paste Data