Setting up Tigervnc on Raspi4 Manjaro Xfce

Hi experts,

I have two Raspberry Pi 4's set up in my home, both happily running Manjaro Xfce. One has a large hard drive attached to its USB3 port and is acting as a Samba Server to the network. The other is a client on my home network, along with a more powerful Win10 system. I am trying to add VNC to the client system and have run into a problem.

I have installed Tigervnc and and have followed instructions in a post from jeanf but have been stopped at x0vncserver... here's a copy of the problem:

[larry@Pi4 saves]$ sudo vncpasswd
[sudo] password for larry:
Would you like to enter a view-only password (y/n)? n
[larry@Pi4 saves]$ x0vncserver -display :0 -PasswordFile /home/larry/.vnc/passwd
Invalid MIT-MAGIC-COOKIE-1 keyx0vncserver: unable to open display ":0"

Any suggestions?

As a reference, here is the inxi -Fx data for my client Raspberry Pi 4 system:

[larry@Pi4 saves]$ inxi -Fx
System: Host: Pi4 Kernel: 4.19.97-1-MANJARO-ARM aarch64 bits: 64 compiler: gcc v: 9.2.0 Console: tty 2
Distro: Manjaro ARM
Machine: Type: ARM Device System: Raspberry Pi 4 Model B Rev 1.1 details: BCM2835 rev: c03111
serial: 100000004048d5ad
CPU: Topology: Quad Core model: N/A variant: cortex-a72 bits: 64 type: MCP arch: ARMv8 rev: 3
features: Use -f option to see features bogomips: 432
Speed: 600 MHz min/max: 600/1900 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 4: 600
Graphics: Device-1: bcm2835-vc4 driver: vc4_drm v: N/A bus ID: N/A
Device-2: bcm2835-hdmi driver: N/A bus ID: N/A
Display: server: 1.20.7 driver: modesetting tty: 120x30
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio: Device-1: bcm2835-audio driver: bcm2835_audio bus ID: N/A
Device-2: bcm2835-hdmi driver: N/A bus ID: N/A
Sound Server: ALSA v: k4.19.97-1-MANJARO-ARM
Network: Message: No ARM data found for this feature.
IF-ID-1: eth0 state: down mac: dc:a6:32:1c:af:e8
IF-ID-2: wlan0 state: up mac: dc:a6:32:1c:af:ea
Drives: Local Storage: total: 144.42 GiB used: 5.25 GiB (3.6%)
ID-1: /dev/mmcblk0 vendor: HP model: GB1QT size: 29.81 GiB
ID-2: /dev/sda type: USB vendor: SanDisk model: Ultra Fit size: 114.61 GiB
Partition: ID-1: / size: 29.20 GiB used: 5.21 GiB (17.8%) fs: ext4 dev: /dev/mmcblk0p2
ID-2: /boot size: 93.8 MiB used: 38.1 MiB (40.7%) fs: vfat dev: /dev/mmcblk0p1
Sensors: Message: No sensors data was found. Is sensors configured?
Info: Processes: 147 Uptime: 15h 27m Memory: 3.73 GiB used: 401.7 MiB (10.5%) Init: systemd Compilers: gcc: N/A
Shell: bash v: 5.0.16 inxi: 3.0.37

You shouldn't sudo vncpasswd because that will make a vnc password for root - just run it as your normal user.

The Arch Wiki has an excellent article on TigerVNC

Thanks Ferdinand, that worked!

Edited below:
Wait wait! It worked on the first Pi4 but not on my second. Both are Manjaro Xfce for Rpi4... I did the vncpasswd as you describe but it fails on x0vncserver.

[larry@Pi2 ~]$ vncpasswd
Would you like to enter a view-only password (y/n)? n
[larry@Pi2 ~]$ ls .vnc
[larry@Pi2 ~]$ x0vncserver -display :0 -PasswordFile /home/larry/.vnc/passwd
x0vncserver: unable to open display ":0"

I know this looks the same as before but it's a different system. Notice the previous was Pi4, and this is Pi2. (4 gbytes vs 2 gbytes or memory)

Forum kindly sponsored by