vnc4server startup script error

Bug #257724 reported by Topi Rinkinen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vnc4 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: vnc4server

UBUNTU VERSION: Ubuntu 8.04 LTS Desktop Edition - Supported to 2011
UBUNTU VERSION: Standard personal computer (x86 architecture, PentiumTM, CeleronTM, AthlonTM, SempronTM)
UBUNTU VERSION:
    # lsb_release -rd
    Description: Ubuntu 8.04.1
    Release: 8.04
PACKAGE VERSION:
  # apt-cache policy vnc4server
  vnc4server:
    Installed: 4.1.1+xorg1.0.2-0ubuntu7
    Candidate: 4.1.1+xorg1.0.2-0ubuntu7
    Version table:
   *** 4.1.1+xorg1.0.2-0ubuntu7 0
          500 http://fi.archive.ubuntu.com hardy/universe Packages
          100 /var/lib/dpkg/status

FILE: /usr/bin/vnc4server
LINE: 47
CHANGE FROM: exec
CHANGE TO: .

DESCRIPTION:
  The script (/etc/X11/xinit/xinitrc) can not be started due to missing access rights (/etc/X11/xinit/xinitrc is -rw-r--r--), thus exec is not valid for non-root users).
Without modification users are not able to set "normal desktop" as described in line 45.

Revision history for this message
Eddy Mulyono (eddymul) wrote :

Test in intrepid:
0. sudo apt-get install vnc4server
1. vncserver
2. vncserver -kill :1
3. edit ~/.vnc/xstartup to be:
  unset SESSION_MANAGER
  exec /etc/X11/xinit/xinitrc
4. vncserver
5. Open "Remote Desktop Viewer"
6. "Connect" to "localhost:13"

Expected:
GNOME session starts.

Bug:
Nothing starts.

I think the bug is in xinit. I checked Fedora 9, and they have xinitrc set to 755.

I modified xinit-1.0.9-2 to, at postinst, chmod o+x xinitrc.

It seems to fix it for me.

Revision history for this message
Steve Beattie (sbeattie) wrote :

The right way to fix is to source the xinitrc file; e.g. change it to:

  unset SESSION_MANAGER
  . /etc/X11/xinit/xinitrc

Changed in vnc4 (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
hamish (hamish-b) wrote :

Still present in Lucid.

here's a post-install patch which fixes it for all users:

--- /usr/bin/vnc4server.ORIG 2011-05-07 21:16:26.546670598 +1200
+++ /usr/bin/vnc4server 2011-05-07 21:31:46.036742257 +1200
@@ -54,7 +54,7 @@
     = ("#!/bin/sh\n\n".
        "# Uncomment the following two lines for normal desktop:\n".
        "# unset SESSION_MANAGER\n".
- "# exec /etc/X11/xinit/xinitrc\n\n".
+ "# exec sh /etc/X11/xinit/xinitrc\n\n".
        "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
        "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
        "xsetroot -solid grey\n".

thanks,
Hamish

Revision history for this message
hamish (hamish-b) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.