Hardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx Engineering
  • Home
  • Expertise
    • Software Engineering
    • Electrical Engineering
    • Chemical Products and Services
    • Biomedical Engineering
    • Mechanical Engineering
    • Production Management
    • Automation
    • Industrial Design
  • Blog
  • About Us
NextPrevious

Forward Linux X11 Session to Windows

By rajaz | Software | 2 comments | 24 September, 2014 | 1

Recently, I setup a Ubuntu machine. Although the Ubuntu machine was lying beside my Windows machine, I was looking to use the Linux machine remotely from my Windows PC so I don’t have to switch mouse and keyboard.

I regularly log into my desktop at work from home and for that I prefer to do VPN and use RDP (remote desktop protocol). I am very impressed with the quality of RDP sessions. With RDP, it’s easy to forget that you are working remotely. I had also tried various VNC software and Teamviewer for working remotely. However with these two tools, whenever I scroll through text, the text will blur for a moment before becoming clear and movement of mouse pointer isn’t very fluid, reminding me that I am working remotely.

I figured the reason for excellent performance from RDP is that RDP sends drawing operations to be performed whereas Teamviewer and VNC send the bitmap of the section of screen that has changed like the techniques used in Video compression. Therefore I was obviously interested in a technology that can forward drawing operations like RDP instead of bitmap.


I had previously known that it’s possible to forward the Linux’s X11 (most prevalent windowing system in Linux world) session which essentially forwards the drawing operations like RDP but I had never done it and wasn’t sure if X11 session can be forwarded to Windows machine. Poking around I found that it is possible and this is how I was able to forward Linux X11 desktop to Windows.

Ubuntu settings

First of install the openssh-server

  • sudo apt-get install openssh-server

Edit /etc/ssh/ssh_config to have the following settings

  • ForwardAgent yes
  • ForwardX11 yes
  • ForwardX11Trusted yes

Edit /etc/ssh/sshd_config to have the following setting

  • X11Forwarding yes

Windows settings

Download MobaXterm. There is a free portable edition available.

Start MobaXterm and click ‘Session’.
xterm_settings_ssh

Select ‘SSH’. Enter Ubuntu’s machine IP and the user account on Ubuntu. Check ‘X11-Forwarding’ option. My settings looked like
xterm_settings_ssh

In the terminal, type ‘gnome-session’.
xterm_terminal

Unity launcher not displaying on forwarded desktop

I didn’t figure out how to get the unity launcher to display in the forwarded desktop. However you can get the classic desktop (which I don’t mind using) by installing gnome-session-fallback.

  • sudo apt-get install gnome-session-fallback

And in MobaXterm, enter ‘gnome-session-fallback’ instead of entering ‘gnome-session’ to start the session.

Display X11 session in a Window

I noticed that the X11 desktop overlaps the Windows Desktop to the point that I cannot use Windows when running X Server. To fix it, go to the Settings->X11 and change the “X11 server display mode” to “Windowed mode”.
xterm_settings_x11

Linux, Remote, Session, Windows, X11

rajaz

More posts by rajaz

Related Posts

  • Reading line-by-line from a serial port (or other byte-oriented stream)

    By Ben Voigt | 10 comments

    With many .NET developers moving from the traditional (and broken) System.IO.Ports.SerialPort DataReceived event handling to either the correct and more efficient BaseStream.BeginRead / BaseStream.EndRead pair I promoted in my last post or the newer BaseStream.ReadAsyncRead more

  • How to Model NPT Threads in Solidworks

    By rmontifar | 3 comments

    National Pipe Thread Taper or NPT threaded pipes and fittings are deployed in a variety of fields where transportation or containment of liquids, gases, steam, or hydraulic fluid is required. The NPT geometry allows internalRead more

  • Multi-Tiered Linux Backup System – Part I

    By dreynolds | 0 comment

    Backing up important data and memories is an important task that should not be neglected. Just as important as performing Linux backups is verifying that the backups made are good and can be used toRead more

  • Clojure: An improved workflow

    By dfohl | 0 comment

    Like many beginning Clojure programmers, I started off following Stuart Sierra’s “Reloaded” workflow guide. While it was a great starting point, there were a number of things that I wanted to change. If the projectRead more

  • Start Zoneminder Recordings with Vera Events

    By dsmoot | 4 comments

    In a previous post I explained how you could configure the security DVR software Zoneminder to trigger recordings from a network connection. While a neat trick, I never really explained why I set this up.Read more

2 comments

  • JC Burkhardt, France Reply October 13, 2014 at 1:49 am

    Very useful ! Thanks, raijaz !

  • Erik Reply November 7, 2016 at 2:45 pm

    Resurrecting the thread, since it was very helpful to me and I wanted to add something: “Unity launcher not displaying on forwarded desktop”

    The trick is not starting “gnome-desktop” or something like that, but actually entering “unity” in the terminal. This worked well on Ubuntu 16.04 LTS.

    Performance was a bit lackluster, even when using two i7-equipped test laptops connected through gigabit Ethernet.

Leave a Comment

Leave a Reply to JC Burkhardt, France Cancel reply

Your email address will not be published. Required fields are marked *

NextPrevious
  • Home
  • Expertise
  • Blog
  • About Us
Sparx Technologies, LLC. dba Sparx Engineering © 2009 - 2021 | All Rights Reserved
  • Home
  • Expertise
    • Software Engineering
    • Electrical Engineering
    • Chemical Products and Services
    • Biomedical Engineering
    • Mechanical Engineering
    • Production Management
    • Automation
    • Industrial Design
  • Blog
  • About Us
Hardware, Software & Product Development | Sparx Engineering