2

First, I use putty to log in my server computer with vnc4server -geometry 1920x1080. Then I got my port number is 1. The system on my server computer is ubuntu 16.04. Then I use vncviewer to log with 192.168.106.29:1 This is the result: vnc error

This is my xstartup file:

unset DBUS_SESSION_BUS_ADDRESS
[ -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 &
mate-session &

This is the scw4750:1.log file:

Wed Sep 19 09:33:05 2018

 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5901
 vncext:      created VNC server for screen 0

error opening security policy file /etc/X11/xserver/SecurityPolicy

Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!

usage: xsetroot [options]
  where options are:
  -display    or   -d 
  -fg    or   -foreground 
  -bg    or   -background 
  -rv   or   -reverse
  -def   or   -default
  -name 
  -cursor  
  -cursor_name 
  -xcf  
  -solid 
  -gray   or   -grey
  -bitmap 
  -mod  
  -help
  -version

mate-session[3764]: WARNING: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=MATE environment variable: Failed to connect to socket /tmp/dbus-X9hRhuXJuM: Connection refused

mate-session[3764]: WARNING: Could not make bus activated clients aware of DISPLAY=:1 environment variable: Failed to connect to socket /tmp/dbus-X9hRhuXJuM: Connection refused

mate-session[3764]: WARNING: Could not make bus activated clients aware of MATE_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Failed to connect to socket /tmp/dbus-X9hRhuXJuM: Connection refused
mate-session[3764]: dconf-WARNING: failed to commit changes to dconf: Could not connect: Connection refused

mate-session[3764]: WARNING: Could not make bus activated clients aware of SESSION_MANAGER=local/scw4750:@/tmp/.ICE-unix/3764,unix/scw4750:/tmp/.ICE-unix/3764 environment variable: Failed to connect to socket /tmp/dbus-X9hRhuXJuM: Connection refused

(x-window-manager:3763): xfwm4-WARNING **: The display does not support the XComposite extension.

(x-window-manager:3763): xfwm4-WARNING **: The display does not support the XDamage extension.

(x-window-manager:3763): xfwm4-WARNING **: The display does not support the XFixes extension.

(x-window-manager:3763): xfwm4-WARNING **: Compositing manager disabled.
Failed to parse arguments: Unknown option --login

(x-window-manager:3763): xfwm4-WARNING **: Cannot find visual format on screen 0

(x-window-manager:3763): xfwm4-WARNING **: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
Wed Sep 19 09:36:10 2018
 Connections: accepted: 0.0.0.0::55352
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Wed Sep 19 09:36:14 2018
 Connections: closed: 0.0.0.0::55352 (Clean disconnection)

Wed Sep 19 09:36:19 2018
 Connections: accepted: 0.0.0.0::55357
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Wed Sep 19 09:36:27 2018
 VNCSConnST:  Server default pixel format depth 16 (16bpp) little-endian rgb565
 VNCSConnST:  Client pixel format depth 6 (8bpp) rgb222
 VNCSConnST:  Client pixel format depth 16 (16bpp) little-endian rgb565
1
  • Are you certain that it's TCP port 1? That's both highly unusual and, if you are not running as the root user, actually impossible.
    – DopeGhoti
    Commented Sep 19, 2018 at 16:02

4 Answers 4

1

If you have this line in ~/.bashrc:

export PATH="/root/anaconda2/bin:$PATH"

Comment it out and try again:

#export PATH="/root/anaconda2/bin:$PATH"
2
  • An explanation of why it would help to comment out this line, and what other consequences this may have, would be good to add to the answer. Also, what makes you think the user in the question has Anaconda installed in the home directory of root?
    – Kusalananda
    Commented Jul 23, 2019 at 7:36
  • I dismissed this comment then realized that ~/anaconda3/bin/dbus-daemon was being called when I started vncserver which I'm sure is not what I want. Commented Sep 20, 2019 at 1:18
1

From this Github issue:

If you use anaconda, you may try this:

  • conda uninstall dbus
  • restart vnc and login in again.

That worked for me, but uninstalling dbus meant uninstalling PySide2, which I need.

So a better solution for me was to follow this solution:

It works for me, when I start XFCE with this command: dbus-launch /usr/bin/startxfce4 & in .vnc/xstartup of the user which starts vncserver.

0

try to split your startup file

unset DBUS_SESSION_BUS_ADDRESS
[ -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 &
mate-session &

into

unset DBUS_SESSION_BUS_ADDRESS
[ -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 &
mate-session &
0

I had the error In your Log before :

Failed to parse arguments: Unknown option --login

I fixed that by commenting the line contains "--login" in this file :)) /usr/bin/x-terminal-emulator

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .