Thank you for your donation


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set up VNC connection?
3rd May, 2017, 05:51 AM
Post: #31
RE: How to set up VNC connection?
Thanks, I'm getting exited. will have a look into xbian-config GUI to enable Staging Repo

Ok, I looked through and may be lost or simply getting tired tonight "enable Staging Repo in Kodi's xbian-config GUI" ...
Where is it ? O.o ...
Find all posts by this user
Quote this message in a reply
3rd May, 2017, 11:31 PM (This post was last modified: 3rd May, 2017 11:45 PM by Nachteule.)
Post: #32
RE: How to set up VNC connection?
@emel445

Here the cmdline version for enabling staging repo and updating package:

1) edit /etc/apt/sources.list.d/xbian.list

Terminal

xbian@xbian ~ $ sudo nano /etc/apt/sources.list.d/xbian.list
xbian@xbian ~ $ cat /etc/apt/sources.list.d/xbian.list
deb mirror://apt.xbian.org/mirror.txt stable main rpi2-jessie
deb mirror://apt.xbian.org/mirror.txt staging main rpi2-jessie
### deb mirror://apt.xbian.org/mirror.txt devel main rpi2-jessie

2) refresh package list

Terminal

xbian@xbian ~ $ sudo apt-get update

3) update package xbian-package-vnc-server

Terminal

xbian@xbian ~ $ sudo apt-get install xbian-package-vnc-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
alsa-base libjasper1 libp11-kit-dev
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
xbian-package-vnc-server
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 17.2 kB of archives.
After this operation, 51.2 kB disk space will be freed.
Get:1 http://apt.xbian.org staging/rpi2-jessie xbian-package-vnc-server armhf 2.2.4-1489940152 [17.2 kB]
Fetched 17.2 kB in 0s (69.5 kB/s)
Create a snapshot of '/run/btrfs-snap/root/@' in '/run/btrfs-snap/root/@btrfs-auto-snap_apt-run-2017-05-03-1326'
Delete subvolume (no-commit): '/run/btrfs-snap/root/@last_good_known'
Create a snapshot of '/run/btrfs-snap/root/@btrfs-auto-snap_apt-run-2017-05-03-1326' in '/run/btrfs-snap/root/@last_good_known'
@btrfs-auto-snap_apt-run-2017-05-03-1326, 1 created snapshots, 0 destroyed snapshots, 0 warnings.
(Reading database ... 29059 files and directories currently installed.)
Preparing to unpack .../xbian-package-vnc-server_2.2.4-1489940152_armhf.deb ...
Unpacking xbian-package-vnc-server (2.2.4-1489940152) over (2.0.0fix) ...
Setting up xbian-package-vnc-server (2.2.4-1489940152) ...

And here Kodi's xbian-config GUI version:

Find all posts by this user
Quote this message in a reply
4th May, 2017, 03:00 AM
Post: #33
RE: How to set up VNC connection?
Happy Days!!!! Thanks for your help on this.

VNC Server updated and Viewer is up and running :-D
xbian@xbian ~ $ dpkg-query -s xbian-package-vnc-server | grep Version
Version: 2.2.4-1489940152

Last question, where is vnc config file located so can modify to encryption and listening port

Thanks,
Find all posts by this user
Quote this message in a reply
4th May, 2017, 04:01 AM
Post: #34
RE: How to set up VNC connection?
I do not know if encryption is possible without using a SSH tunnel.

Please look into file /etc/default/vnc-server how to provide options to rpi-vncserver
Find all posts by this user
Quote this message in a reply
4th May, 2017, 04:13 AM
Post: #35
RE: How to set up VNC connection?
I'll have a look.
Thank you so much for your help in resolving this issue :-D
Find all posts by this user
Quote this message in a reply
5th May, 2017, 02:24 AM
Post: #36
RE: How to set up VNC connection?
New version available in stable repository:

Issue of wrong colors fixed

- Hash buffer will be cleared. Sometimes screen was not updated correctly
when establishing new client connection
- DispmanX expects buffer rows to be aligned to a 32 bit boundary

Fixes and enhancements, verup to 2.2.4:

- Fixed: Resolution change on Cubox-i/Hummingboard working properly
Still not possible for RPi
- Commandline options added:
-h rfb : Display options for libvncserver library
-d : enable debug output
-u : polling screen interval in <msec> ms
- Used port is not longer hardcoded and can be modified if needed
- Frambuffer is accessed only if at least one client is connected
This is workaround for RPi devices, they still can not deal with
resolution changes and Kodi startups

Fixes and enhancements, verup to 2.4.1:

- Fixed: Resolution change on RPi working properly now
- Fixed: workaround for dispmanx library issue added. On resolution change,
it does not result in black vnc screen any more
- Commandline options modified:
-d[d] : enable debug output, -dd is more verbose
-h : current values for -u and -c option are displayed now
- Default polling time set to 333ms
- Modification for debug messages
- myNewFramebuffer removed. Original rfbNewFramebuffer function was called
with wrong parameters when resolution change was detected
- Desktop name can now be applied by cmdline option

vnc-server can be used with password now

Password is usually the same as with user xbian and can be modified by standard
xbian-config function, both xbian-config versions are supported.
Password can be enabled/disabled with Kodi's xbian-config GUI, category Extra
Find all posts by this user
Quote this message in a reply
24th Jun, 2017, 01:20 AM
Post: #37
RE: How to set up VNC connection?
Hi there. Hope it's OK to post in here with a similar problem; If not, I'll move it elsewhere.
I'm new to RPI and have recently been gifted one which I've installed xbian on to replace the desktop pc upstairs as a front end. I'm having similar trouble with VNC.
I'm running VNC Viewer 6.0.1 on my windows machine. When I try to connect to the RPI I get the following distorted output:



If I then restart the VNC service by going through system> xbian conf > services> selecting vnc-server and restarting, it then works as it should when connecting from my windows machine...until the next reboot. VNC Viewer from my iphone constantly connects and then disconnects regardless.

Any suggestions? I've updated everything I can through the OS GUI but am now at a loss. Any help gratefully received. (It might be worth bearing in mind I'm not that techie so step by step instructions would help if you have the patience)

......It's probably also worth mentioning that if I "try" to connect to it whilst the RPI is booting up (before it gets to the xbian splash screen) it works OK. Not very practical though!

oh....and running Version: 2.4.2-1494784542

I re-read the thread and also changed AUTOMODE from 1 to 0 in /etc/default/vnc-autores. Still no difference.
Find all posts by this user
Quote this message in a reply
24th Jun, 2017, 06:37 AM
Post: #38
RE: How to set up VNC connection?
@spleencheese
Hmmm, that's weird

What is your screen resolution you're using?
I'm using 1080p and 720p, and even SD (PAL) is working well here

Quote:I re-read the thread and also changed AUTOMODE from 1 to 0 in /etc/default/vnc-autores. Still no difference.

Setting AUTOMODE to 1 is currently bad idea, please don't use it (it's confusing Kodi completely)

Never used a VNC client from Android/IOS (don't have iPhone, but Android I can test if needed).

Which client are you using?
Find all posts by this user
Quote this message in a reply
24th Jun, 2017, 07:50 AM
Post: #39
RE: How to set up VNC connection?
Weird indeed.

I've tried all of the screen resolution options available in the menu and it made no difference. Connected to an 40" LCD by HDMI.

I changed the AUTOMODE FROM 1 to 0. It was set to 1 when I looked at the file for the first time.

By client, if you mean what VNC viewer I'm using, it's RealVNC 6.0.1 on windows.

Would it be worth me trying to get some log details? I'm not sure how I'd go about getting them, so step by step instructions would be good, but I'd be happy to post some if it would help.

As for testing ios/android, I'm not too fussed about that for now. I mentioned it because post #27 of this thread mentioned a similar symptom; It connecting and disconnecting every second or so.
Find all posts by this user
Quote this message in a reply
24th Jun, 2017, 08:39 PM
Post: #40
RE: How to set up VNC connection?
(24th Jun, 2017 07:50 AM)spleencheese Wrote:  I changed the AUTOMODE FROM 1 to 0. It was set to 1 when I looked at the file for the first time.

Hmmm, hard to believe Huh This variable is set to 0 as default in package xbian-package-vnc-server

Quote:By client, if you mean what VNC viewer I'm using, it's RealVNC 6.0.1 on windows.

You already mentioned that, same version I'm using. But I wanted to know which software you are using on your iphone, but anyway, vnc-server is using standard libvncserver library, maybe this lib can not deal with mobile vnc clients, or vice versa Undecided

Quote:Would it be worth me trying to get some log details? I'm not sure how I'd go about getting them, so step by step instructions would be good, but I'd be happy to post some if it would help.

It's a bit tricky, because vnc-server does not write any log files and all console (debug-)outputs are written to /dev/null as default. And if you restart vnc-server manually later to get debug messages, everything is ok you already told.

So, you have to do 2 things getting log plus some debug output:
1) Modify file /etc/init/vnc-server.conf (remove or comment out line console none). All output of vnc-server are written to file /var/log/upstart/vnc-server
2) add -d option to OPTIONS variable in file /etc/default/vnc-server

After restarting vnc-server service, you will get output like this

Terminal

root@kmxbilr /var/log/upstart # cat vnc-server.log
rpi-vncserver version 2.4.2

Initializing framebuffer device: - (dispmanx)
init_fb(): xres=1920, yres=1080, bpp=16
open /dev/uinput returned 4.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
Initializing server: 1920x1080x2
24/06/2017 12:31:31 Listening for VNC connections on TCP port 5900
24/06/2017 12:31:31 rfbListenOnTCP6Port: error in bind IPv6 socket: Address family not supported by protocol

Framebuffer VNC server initialized:
width: 1920
height: 1080
bpp: 16
bytespp: 2
pixelperint: 2
port: 5900

hash lines: 4

offsets:
R: 11
G: 6
B: 0

successfully started
24/06/2017 12:31:54 Got connection from client 192.168.1.75
24/06/2017 12:31:54 other clients:
24/06/2017 12:31:54 Normal socket connection
key event 002a down
key event 002a down
24/06/2017 12:31:54 Client Protocol Version 3.8
24/06/2017 12:31:54 Protocol version sent 3.8, using 3.8
24/06/2017 12:31:54 rfbProcessClientSecurityType: executing handler for type 1
24/06/2017 12:31:54 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
24/06/2017 12:31:54 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000016)
24/06/2017 12:31:54 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000015)
24/06/2017 12:31:54 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000000F)
24/06/2017 12:31:54 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC6)
24/06/2017 12:31:54 Enabling full-color cursor updates for client 192.168.1.75
24/06/2017 12:31:54 Enabling NewFBSize protocol extension for client 192.168.1.75
24/06/2017 12:31:54 Using ZRLE encoding for client 192.168.1.75
24/06/2017 12:31:54 Pixel format for client 192.168.1.75:
24/06/2017 12:31:54 8 bpp, depth 8
24/06/2017 12:31:54 uses a colour map (not true colour).
24/06/2017 12:31:55 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000000F)
24/06/2017 12:31:55 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000016)
24/06/2017 12:31:55 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000015)
24/06/2017 12:31:55 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC6)
24/06/2017 12:31:55 Enabling full-color cursor updates for client 192.168.1.75
24/06/2017 12:31:55 Enabling NewFBSize protocol extension for client 192.168.1.75
24/06/2017 12:31:55 Switching from ZRLE to hextile Encoding for client 192.168.1.75
24/06/2017 12:31:55 Pixel format for client 192.168.1.75:
24/06/2017 12:31:55 16 bpp, depth 15, little endian
24/06/2017 12:31:55 true colour: max r 31 g 31 b 31, shift r 0 g 5 b 10

Quote:As for testing ios/android, I'm not too fussed about that for now. I mentioned it because post #27 of this thread mentioned a similar symptom; It connecting and disconnecting every second or so.

Ok
Find all posts by this user
Quote this message in a reply
24th Jun, 2017, 09:43 PM
Post: #41
RE: How to set up VNC connection?
OK. I've commented out the console none line in /etc/init/vnc-server.conf

I'm not sure how to add -d option to OPTIONS variable in file /etc/default/vnc-server. I see the line OPTIONS="". Do I put -d inside the "" so it reads OPTIONS="-d" ?

Sorry if this is a silly question - I told you I'm not very techie Smile

------

As for the AUTOMODE being 1 when I looked at it; maybe this was changed when I was fiddling with the settings in the GUI?

------

The ios app I'm using is Version 3.3.0.028336 of RealVNC viewer.


------
Find all posts by this user
Quote this message in a reply
25th Jun, 2017, 03:06 AM
Post: #42
RE: How to set up VNC connection?
(24th Jun, 2017 09:43 PM)spleencheese Wrote:  OK. I've commented out the console none line in /etc/init/vnc-server.conf

I'm not sure how to add -d option to OPTIONS variable in file /etc/default/vnc-server. I see the line OPTIONS="". Do I put -d inside the "" so it reads OPTIONS="-d" ?

Exactly Smile

Quote:As for the AUTOMODE being 1 when I looked at it; maybe this was changed when I was fiddling with the settings in the GUI?

Could be, or probably yes

Quote:The ios app I'm using is Version 3.3.0.028336 of RealVNC viewer.

Ah, ok. Can't use that, because my Android is too old SadAngel
Find all posts by this user
Quote this message in a reply
25th Jun, 2017, 09:04 PM
Post: #43
RE: How to set up VNC connection?
Quote:I'm not sure how to add -d option to OPTIONS variable in file /etc/default/vnc-server. I see the line OPTIONS="". Do I put -d inside the "" so it reads OPTIONS="-d" ?

Exactly Smile

OK. Have done that. I'll restart and look in /var/log/upstart/vnc-server for some information and post back shortly! Are there any specific things I should do other than reboot and look in the logs? Should I reset the service/reboot a couple of times?
Quote:Ah, ok. Can't use that, because my Android is too old SadAngel

Just for information - I found this in the log files from VNCviewer on ios. Not sure whether it provides any clues:

CConnection: close: [ProtocolError] Either VNC Server is not running, or it is using an incompatible protocol version.
<15>
Find all posts by this user
Quote this message in a reply
25th Jun, 2017, 11:37 PM
Post: #44
RE: How to set up VNC connection?
OK. This is after booting up:

https://www.flickr.com/photos/spleencheesemonkey/shares/99qC45

This is after connecting (when it all looks wrong):

https://www.flickr.com/photos/spleencheesemonkey/shares/D4M7kq

This is after restarting the service and it all looks OK:

https://www.flickr.com/photos/spleencheesemonkey/shares/Bo7Lv3


Hope some of this makes sense to you! Thanks for your help so far Smile
Find all posts by this user
Quote this message in a reply
Yesterday, 03:18 AM
Post: #45
RE: How to set up VNC connection?
First, I have to ask again, what is the screen resolution you are using.

It seems that Pi is booting with 1920 x 1080p (look into log, first message init_fb() ...)

But when you are connecting VNC client, a resolution of 1280 x 1024 is detected (look into log again, second message init_fb() ...). And that's confusing me Huh
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: