0

I'm trying to set up vnc4server on an Ubuntu 16.04 (Xenial Xerus) server version system.

I can currently vnc into the computer no problem, but I can't view my running applications - only my terminal. How can I view my running application on the device?

This is what I see:

Terminal emulator with which background and prompt in console font and nothing else

Here is my ~/.vnc/xstartup file:

#!/bin/sh

# unset SESSION_MANAGER
# unset DBUS_SESSION_BUS_ADDRESS
# exec /etc/X11/xinit/xinitrc
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
  • I had thought that it had come with it. Im not sure if I did. I will try and install them now. – Jermayne Williams Oct 16 '17 at 17:20
  • When you login locally, do you get the Unity graphical interface? Can you open nautilus locally? – user68186 Oct 16 '17 at 17:21
  • I actually dont need metacity & nautilus. im just trying to be able to see an application i have running on the device. I was just using a xstartup config that I had from an older application I had here. – Jermayne Williams Oct 16 '17 at 17:28
  • is x11vnc any better to use than vnc4server? – Jermayne Williams Oct 16 '17 at 17:33
  • I don't know. I have not tried vnc4server. I found x11vnc works with Ubuntu desktop (Unity). Since you are focusing on Ubuntu server, your mileage may vary. – user68186 Oct 16 '17 at 17:58
  • I'm giving it a try right now. fingers crossed. – Jermayne Williams Oct 16 '17 at 18:05
  • hmm x11 vnc is only also showing me the terminal aswell. perhaps its a configuration issue? – Jermayne Williams Oct 16 '17 at 18:38
  • 2
    x11vnc worked. thanks ill update with an answer shortly – Jermayne Williams Oct 16 '17 at 19:50
  • Great! You are welcome. If you think this is a duplicate of the question I have linked above, then consider deleting this question and add a new answer (if you think, your case was different) to the original question. – user68186 Oct 16 '17 at 21:05
  • I see how it is simular. I appologize. I figured it wasn't mainly because I had had different intention in mind from when I asked the question but the outcome had lead to a simular outcome as that question. I more so was trying to figure out if I was configuring my xstartup config wrong. – Jermayne Williams Oct 17 '17 at 15:25

1 Answers1

0

I had the same problem to get a remote graphical access to a Ubuntu server. I ended up to login with ssh to the server, run 'tasksel' and install "Xubuntu". This is the most lightweight variant, since my server has a next-to-no-good-at-all graphics card. After the install your server boots into a desktop. It does not hurt, since most of the time it will remain at login screen and does not eat up too much resources. I did configure my server to not start the X-Server, so I have to do it manually from SSH when I need it with

sudo service lightdm start

When the X-Server (aka the desktop) is running your VNC server actually has something to show. You should see your application as you intend. You could also login from a Linux client with

 ssh -X 

Then you are able to get the graphical windows running on the server on your client screen. Then you even might not need VNC and the response times are a lot better.

CatMan
  • 1,399
  • when using ssh -X I couldnt get a display to run on my client. if I could get that to work x11 forwarding would be the ideal way id like to do it. i used ssh -X user@host and that didnt work. just gave me a terminal – Jermayne Williams Oct 16 '17 at 19:51
  • Here is the sequence that works on my computer (sorry no newline): 1. 'ssh -X myserver' 2. enter password 3. 'nemo &' (the stuff in quotes is what I entered. This opend me a Nemo File manager window on my client, but the content was from the server. This will not work if you do not have the X-server installed (i.e. Xubuntu from tasksel as described above). – CatMan Oct 16 '17 at 20:00
  • is that a live display though or just displaying the application on your computer? i need to see a live display of whats on the remote computer on mine, – Jermayne Williams Oct 17 '17 at 15:30
  • @jermayne-williams I am not sure what you mean with 'live display'. What I described and VNC are two different things. VNC will just send you a screenshot of the remote computer and keeps sending smart updates while you are connected. I guess that is what you mean with live display. With the 'ssh -X' option you run (only) the application you start (after connecting) on the remote pc. Only their window is run on your local computer instead of the remote computer. I guess if you have an application already running and want to check on it, you would need VNC. Hope it answers your question – CatMan Oct 17 '17 at 19:44