siksniper1996
Posts: 1
Joined: Tue Apr 09, 2013 3:33 am

Vnc server

Tue Apr 09, 2013 3:36 am

I'm trying to run vnc on my raspberry pi

I did this and it installed

Code: Select all

sudo pacman -S tightvnc
but then I got this code when trying to run it the first time

Code: Select all

[myusername@alarmpi /]$ vncserver
vncserver: Could not create /home/myusername/.vnc.

sdjf
Posts: 1397
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 9:49 am

are you logged in as root? is there a directory for /home/myusername?

type this to find out:

whoami
ls -l /home/myusername

vncserver also requires xorg packages and dependencies, did you install those?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
graysky
Posts: 190
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 8:11 pm

If your intent is to have a parallel vncsession, i.e. NOT to control what you are outputting to the monitor/TV I do not recommend tightvnc but rather tigervnc. All you want to know about it: https://wiki.archlinux.org/index.php/Tigervnc

If your intent is to see what the monitor/TV is seeing, you will need x11vnc: https://wiki.archlinux.org/index.php/X11vnc

sdjf
Posts: 1397
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 9:42 pm

Hmmm, I installed tightvnc on my Pi, and it simply serves as a front end for X11vnc. I enter vncserver as a command, and it brings up an X11 vnc session.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
graysky
Posts: 190
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 9:56 pm

sdjf wrote:Hmmm, I installed tightvnc on my Pi, and it simply serves as a front end for X11vnc. I enter vncserver as a command, and it brings up an X11 vnc session.
You sure about that? It should be running a parallel session, in other words, not what you're seeing on your monitor.

sdjf
Posts: 1397
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 10:51 pm

graysky wrote:
You sure about that? It should be running a parallel session, in other words, not what you're seeing on your monitor.
Yup. I enter the vncserver command, it triggers X11's server and is done. I run "ps ax" to see what is going on, and there is no tightvnc or vncserver listed, the only thing about vnc is X11vnc with the parameters I gave in my vncserver command.

Hey, I just looked at the man page for vncserver (which is what I got from the tightvnc package) and it says that it is a wrapper script for Xvnc.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
graysky
Posts: 190
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Vnc server

Tue Apr 09, 2013 11:10 pm

Dunno what to tell you...

Code: Select all

% vncserver              

New 'pico-arch:1 (facade)' desktop is pico-arch:1

Starting applications specified in /home/facade/.vnc/xstartup
Log file is /home/facade/.vnc/pico-arch:1.log

Code: Select all

% cat ~/.vnc/xstartup 
#!/bin/sh
xrdb $HOME/.Xresources
export XKL_XMODMAP_DISABLE=1
exec startxfce4

sdjf
Posts: 1397
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Vnc server

Wed Apr 10, 2013 3:23 am

graysky: I am not sure what that means, maybe the difference is that I am running headless and you are not?

But if you want to see whether tightvnc has it's own vnc and does not just call X11vnc, then you could run strace on it to see all system calls.

When I start vncserver from the command line, I see messages about X11vnc starting and related messages, and then the script finishes. there is no need to background it.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
graysky
Posts: 190
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Vnc server

Wed Apr 10, 2013 10:04 am

Haven't tried running headless but I still doubt it: tightvnc and tigervnc both run their own sessions in X whereas x11vnc can only attach to an existing session. Post the output of:

Code: Select all

vncserver

sdjf
Posts: 1397
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Vnc server

Wed Apr 10, 2013 11:55 am

This really isn't pursuing the OP's question. I do see I made an error, it is Xvnc and not X11vnc that is started by vncserver, but cannot copy/paste the output at the moment. Maybe Xvnc and X11vnc are different applications, that may be the issue. But vncserver definitely has no X11vnc or Xvnc session to attach itself to when it gets called by vncserver. Read the man page for vncserver, it clearly says it is a wrapper script.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

Dnacomputersuk
Posts: 2
Joined: Fri Jun 07, 2013 11:08 pm

Re: Vnc server

Fri Jun 07, 2013 11:12 pm


Return to “Arch”