Non VNC and VNC $Display confusion

by confused   Last Updated July 17, 2018 16:01 PM

I have an Ubuntu 16.06LTS system (let's call it Fred) that I use while sitting in front of it and on that same system I run a VNC server (FredVNC). My problem is that when I've started an application in one environment (i.e. Fred), it ONLY runs in that environment. For example, if I start Libre Office and work on a document at home on Fred, then leave the house and want to open a .doc file in an email I'm checking remotely via a VNC client connection (to FredVNC), that .doc file does not open within VNC, but rather on my local desktop...Fred. I have to return HOME to see it. Or (alternatively) I can kill -9 Libre Office, then open the application in VNC. But then any open docs that were on Fred risk losing data.

What I would LIKE is a way to have two parallel instances of apps open up individually...so that I could be working in Libre Office in VNC, while simultaneously having Libre Office documents open on Fred.

I am assuming (perhaps naively) that there's a command line way to open up an instance of a program that will assign it to the VNC or the Fred Display. I've tried searching for this and unfortunately am in a keyword nightmare. Nothing seems to be selecting the right terms and I get totally off topic results.

If anyone knows what I need to do that would be hugely helpful. Thanks in advance!



Answers 1


It looks like your VNC server creates a virtual desktop instead of providing the existing one (which is, I believe, more common behavior). Plus Libre Office uses a single "main" process per user. When you open an additional file, the new process detects the existing one, relies the job to it and exits. I guess the old process sticks to whichever display was right at the moment it started.

After you kill the old process, a new one can open a file and persist, becoming the "main" Libre Office process from now on. It uses the display it considers right.

I think you could reconfigure the VNC server to provide the existing desktop. On the other hand I guess you had your reasons to use a separate virtual desktop, so you may not want to change this.

What I would LIKE is a way to have two parallel instances of apps open up individually...so that I could be working in Libre Office in VNC, while simultaneously having Libre Office documents open on Fred.

I don't know any way to make Libre Office ignore the old process running for the same user. There's a --display option but I cannot make it work.

See this question: X11 forwarding - grab windows of programs already running. My answer there introduces xpra. If you run (the first) Libre Office with xpra, you will be able to attach to its window(s) from elsewhere.

See what else you can do. In my opinion the main advantage over VNC is the ability to choose the operation mode at the moment you connect. You can start a new desktop, clone an existing one, run a program or attach to a program already running with xpra. Quite flexible, I think.

In the worst case scenario you would get to your existing desktop only to gently close non-"xpra-ed" Libre Office windows without losing data. Then you would run Libre Office anew, this time with xpra, still from the remote client.

Kamil Maciorowski
Kamil Maciorowski
July 17, 2018 17:02 PM

Related Questions



Remove upper bar in Windows 10

Updated June 30, 2017 13:01 PM


Change wallpaper properties in Windows 7

Updated April 09, 2017 09:01 AM