Running gvim on VNC

I am trying to run gvim application on my VNC desktop client which is running on QNX 6.2.1 host with fvwm desktop. Whenever I start the gvim it starts it on the host and not on the VNC desktop client. This is the same case for Mozilla browser. I will really appreciate any help on this.



you are using the xf86 implementation for qnx?
check your DISPLAY-env, if this is set wrong it will start UI-Apps on the server-X rather then on your remote-desktop.

Isn’t that the expected behavior?
VNC client is just something that let you “see” the graphics from the host server. Whatever you run inside the VNC client window is actually on the host (VNC server).

Actually I am not seeing the gvim on my client window whenever I it from my vnc client window xterm like gvim &, the actual server machine displays it, but when I do xterm & or emacs &, those are properly displayed on my vnc desktop, my environment is following.


Your gvim may be a script or an alias that has reset the display.
alias | grep gvim
which gvim
file which gvim

also, try to force the display:
gvim -display localhost:1.0

I tried to do the force display and got the following response

gvim -display localhost:1.0 &
[4] 1040535616
root@localhost:/usr/X11R6/bin$ VIM - Vi IMproved 6.1 (2002 Mar 24, compiled May 22 2002 11:01:28)
Garbage after option: “-display”
More info with: “vim -h”

Also by doing the which gvim gave me following which shows that it is just a path

root@localhost:/usr/X11R6/bin$ alias | grep gvim
root@localhost:/usr/X11R6/bin$ which gvim
root@localhost:/usr/X11R6/bin$ file which gvim
/usr/bin/gvim: symbolic link to vim


Seems like your gvim doesn’t support X Window (VNC).
It’s probably a hacked version that supports text mode and Photon GUI. You must have a Photon running on the host itself, and those photon apps (gvim, mozilla) will show up there.
You will need an X Window version if you want to run within VNC. may have an X version of mozilla. Not sure about gvim, you may have to compile yourself to have the X support.

Thanks noc, as I mentioned, starting gvim on the vnc desktop, actually does start a gui version, but it is displayed on my qnx machine which is running vncserver instead of the vnc desktop which is running on my xp machine. This is the same case for the mozilla. That means my qnx machine have the gui versions of both, but they do not show up on the vnc desktop. Does that still mean that my gvim does not have the support for X Window and I will need to compile one for that ?


I guess I wasn’t clear.

QNX 6 supports two GUI systems: X Window and Photon.
VNC falls under X Window.

Your gvim and mozilla only support Photon.
Your server (host) runs both VNC server and Photon.
When you run gvim or mozilla, it shows on the Photon GUI, but your VNC client can only “see” VNC server, not photon.

If you client runs MS Windows, you can use “phindows” application, which allows you to “see” the Photon GUI on the server (host).

Ok, I got it now. So is it possible to install X windows version of the gvim in addition to the photon version of the gvim which is already installed on my qnx machine (which has the vnc server)? If it is possible, how can I go about it (what should be the steps to do that ) and how can I tell the vnc client to use the X windows version of the gvim and not the photon version.


Yes, you can have two versions coexist, as long as they are in different directories.
When you compile your own vim (gvim), you can specify --prefix to install it into a different location.
For example, if you use --prefix=/usr/local, your gvim will end up in /usr/local/bin. You can then launch your X version of gvim with /usr/local/bin/gvim, or just create an alias, or set up your PATH to have /usr/local/bin ahead of /usr/bin (where your other gvim is).

Thanks for the clarification are there any versions of the gvim under X whichcan compile in qnx ?