[NZLUG] VNC server/viewer setup help required

Reed Wade reed at typist.geek.nz
Tue Jul 12 22:05:45 NZST 2016


vncserver likes to use port ranges starting from 5900 for client connections

6000 and up (6000 for display :0, 6001 for :1, etc) is used by the X server
which vnc server is pretending to be.

So, given the ":100" argument to vncserver, I'd expect --it to listen on
6100 for X connections and 6000 for vnc viewer connections

maybe try it with smaller than 100 -- or the default?

-reed



On 12 July 2016 at 21:37, Patrick Connolly <tuxkid at slingshot.co.nz> wrote:

>
> On 2016-07-12 13:03, Cliff Pratt wrote:
> > On 11/07/16 22:04, Patrick Connolly wrote:
> >> I start a VNC server like this;
> >>
> >>> vncserver :100
> >> New 'mta-d-427893-WS.pfr.co.nz:100 (hrapgc)' desktop is
> mta-d-427893-WS.pfr.co.nz:100
> >>
> >> Starting applications specified in /home/hrapgc/.vnc/xstartup
> >> Log file is /home/hrapgc/.vnc/mta-d-427893-WS.pfr.co.nz:100.log
> >>
> >> Then, looking at that log:
> >>> tail -4 /home/hrapgc/.vnc/mta-d-427893-WS.pfr.co.nz:100.log
> >> Mon Jul 11 15:36:55 2016
> >>   vncext:      VNC extension running!
> >>   vncext:      Listening for VNC connections on local interface(s),
> port 6000
> >>   vncext:      created VNC server for screen 0
> >>
> >>
> >> However,
> >>
> >> hrapgc at mta-d-427893-WS:~ > netstat -lt
> >> Active Internet connections (only servers)
> >> Proto Recv-Q Send-Q Local Address           Foreign Address
>  State
> >> tcp        0      0 *:netbios-ssn           *:*
>  LISTEN
> >> tcp        0      0 localhost:x11           *:*
>  LISTEN
> >> tcp        0      0 *:6100                  *:*
>  LISTEN
> >>                    ^^^^^^^^^
> >> tcp        0      0 *:ssh                   *:*
>  LISTEN
> >> tcp        0      0 localhost:ipp           *:*
>  LISTEN
> >> tcp        0      0 *:db-lsp                *:*
>  LISTEN
> >> tcp        0      0 *:microsoft-ds          *:*
>  LISTEN
> >> tcp        0      0 localhost:17600         *:*
>  LISTEN
> >> tcp        0      0 localhost:17603         *:*
>  LISTEN
> >> tcp        0      0 *:gnunet                *:*
>  LISTEN
> >> tcp6       0      0 [::]:netbios-ssn        [::]:*
> LISTEN
> >> tcp6       0      0 ip6-localhost:x11       [::]:*
> LISTEN
> >> tcp6       0      0 [::]:6100               [::]:*
> LISTEN
> >> tcp6       0      0 [::]:ssh                [::]:*
> LISTEN
> >> tcp6       0      0 ip6-localhost:ipp       [::]:*
> LISTEN
> >> tcp6       0      0 [::]:db-lsp             [::]:*
> LISTEN
> >> tcp6       0      0 [::]:microsoft-ds       [::]:*
> LISTEN
> >> tcp6       0      0 [::]:gnunet             [::]:*
> LISTEN
> >> hrapgc at mta-d-427893-WS:~ >
> >>
> >> Somehow, the port number is 6100, not 6000.
> > Address = base (6000) + display (100)
>
> According to everything I read, the base was 5900, so the default port
> is 5901.  My message from the server is:
> Listening for VNC connections on local interface(s), port 6000
>
> For my own reasons, I'm using :100/6000/6100 which netstat shows as
> ESTABLISHED, so I've gone with that.
>
>
>
> >>
> >>   after attempting to connect using TigerVNC viewer, Windows shows
> >>
> >> H:\> netstat
> >> Proto           Local address      Foreign address       State
> >> ...
> >> ...
> >> TCP     10.10.102.66:53252  mta-d-427893-ws:6100  ESTABLISHED
> >> ...
> >> ...
> >>
> >> But there's no X window of any kind, and there's nothing new in the
> >> log file.
> > What's in the xstartup file?
>
>
> #!/bin/sh
>
> # unset SESSION_MANAGER
> unset DBUS_SESSION_BUS_ADDRESS
>
> #######################
> if [ -x /etc/X11/xinit/xinitrc ]; then
>   exec /etc/X11/xinit/xinitrc
> fi
> if [ -f /etc/X11/xinit/xinitrc ]; then
>   exec sh /etc/X11/xinit/xinitrc
> fi
> ######################################
>
> [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
> xsetroot -solid grey
> xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
> startkde &
>
> And in ~/.vnc/config:
>
> ## Supported server options to pass to vncserver upon invocation can be
> listed
> ## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
> ## Several common ones are shown below. Uncomment and modify to your
> liking.
> ##
> securitytypes=vncauth,tlsvnc
> desktop=sandbox
> geometry=1680x1050
> localhost
> alwaysshared
>
>
> There's likely to be something in those that causes trouble.  They've
> been cobbled together from disparate places.
>
> I notice in /var/log/syslog messages such as these:
>
> console-kit-daemon[1553]: GLib-CRITICAL: Source ID 1174 was not found when
> attempting to remove it
> ...
>
> console-kit-daemon[31640]: WARNING: Failed to acquire
> org.freedesktop.ConsoleKit
> console-kit-daemon[31640]: WARNING: Could not acquire name; bailing out
>
> I saw lots of old references to that first one, but none of them were
> with VNC and the general idea seemed to be it was an annoyance, not an
> issue.  I thought it would give me some pointers, but I didn't find
> anything useful.
>
> Years ago I was using CentOS with TightVNC which didn't seem to be all
> that complicated to get working but is evidently developed only on
> Windows these days.
>
> In case it makes a difference:
>
> System:    Host: mta-d-427893-WS.pfr.co.nz Kernel: 3.16.0-38-generic
> x86_64 (64 bit, gcc: 4.8.2)
>            Desktop: KDE 4.14.2 (Qt 4.8.6) Distro: Linux Mint 17.2 Rafaela
> Machine:   System: Hewlett-Packard product: HP Z230 Tower Workstation
>            Mobo: Hewlett-Packard model: 1905 Bios: Hewlett-Packard
> version: L51 v01.52 date: 07/20/2015
> CPU:       Quad core Intel Core i7-4790 CPU (-HT-MCP-) cache: 8192 KB
> flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28734.8
>            Clock Speeds: 1: 4000.218 MHz 2: 3999.796 MHz 3: 3976.593 MHz
> 4: 3966.046 MHz 5: 3982.640 MHz 6: 3999.937 MHz 7: 3983.203 MHz 8: 3993.750
> MHz
> Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated
> Graphics Controller bus-ID: 00:02.0
>            X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution:
> 1920x1080 at 60.0hz
>            GLX Renderer: Mesa DRI Intel Haswell Desktop GLX Version: 3.0
> Mesa 10.1.3 Direct Rendering: Yes
> Audio:     Card-1: Intel 8 Series/C220 Series High Definition Audio
> Controller driver: snd_hda_intel bus-ID: 00:1b.0
>            Card-2: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
> Controller driver: snd_hda_intel bus-ID: 00:03.0
>            Sound: Advanced Linux Sound Architecture ver: k3.16.0-38-generic
> Network:   Card: Intel Ethernet Connection I217-LM driver: e1000e ver:
> 2.3.2-k port: f080 bus-ID: 00:19.0
>            IF: eth0 state: up speed: 100 Mbps duplex: half mac: <filter>
> Drives:    HDD Total Size: 2000.4GB (4.5% used) 1: id: /dev/sda model:
> ST1000DM003 size: 1000.2GB
>            2: id: /dev/sdb model: ST1000DM003 size: 1000.2GB
> Partition: ID: / size: 886G used: 84G (10%) fs: ext4 ID: /boot size: 236M
> used: 49M (22%) fs: ext2
>            ID: swap-1 size: 34.03GB used: 0.00GB (0%) fs: swap
> RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid
> module present
> Info:      Processes: 467 Uptime: 22 days Memory: 4869.9/31865.7MB
> Runlevel: 2 Gcc sys: 4.8.4
>            Client: Shell (bash 4.3.11) inxi: 1.9.17
>
> Cheers
>
> --
>    ___     Patrick Connolly
>  {~._.~}
>  _( Y )_          Good judgment comes from experience
> (:_~*~_:)         Experience comes from bad judgment
>  (_)-(_)
>
> _______________________________________________
> NZLUG mailing list
> NZLUG at lists.nzoss.org.nz
> http://lists.nzoss.org.nz/mailman/listinfo/nzlug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nzoss.org.nz/pipermail/nzlug/attachments/20160712/808890ed/attachment-0001.html>


More information about the NZLUG mailing list