VNC not executing xstartup


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers VNC not executing xstartup
# 1  
Old 02-16-2012
vncserver starting with errors

I was originally having a problem with my xstartup script where it would not allow me to do some basic things like shutting down the server through Gnome remotely but I resolved that by changing it to exec gnome-session.

However now it seems that after a full server restart of any kind it is not loading the xstartup script correctly because when I connect it is right back to the wrong window manager.
The weird thing is, I can easily fix this by doing vncserver -kill :1 then vncserver :1 and everything is great but I won't be able to do that remotely obviously.

I made sure the vncserver script and xstartup script were both executable.

Here is my xstartup if it helps;

Code:
#!/bin/sh

[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
exec gnome-session

Here is my log file showing some obvious errors that I don't understand at all.

Code:
Xvnc TigerVNC 1.0.90 - built Dec  8 2011 01:43:50
Copyright (C) 2002-2005 RealVNC Ltd.
Copyright (C) 2000-2006 Constantin Kaplinsky
Copyright (C) 2004-2009 Peter Astrand for Cendio AB
See SourceForge.net: Welcome to TigerVNC - tigervnc for information on TigerVNC.
Underlying X server release 11004000, The X.Org Foundation


Thu Feb 16 15:07:02 2012
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
expected keysym, got XF86TouchpadOn: line 120 of inet
expected keysym, got XF86TouchpadOff: line 121 of inet
GNOME_KEYRING_SOCKET=/tmp/keyring-PBAIzt/socket
SSH_AUTH_SOCK=/tmp/keyring-PBAIzt/socket.ssh
An instance of nm-applet is already running.
Failed to play sound: File or data not found

** (gnome-panel:4967): WARNING **: panel-applet-frame.c:1288: failed to load applet OAFIID:GnoteApplet:
(null)

(polkit-gnome-authentication-agent-1:4983): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(polkit-gnome-authentication-agent-1:4983): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

** (polkit-gnome-authentication-agent-1:4983): WARNING **: Unable to register authentication agent: Remote Exception invoking 
org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: 
An authentication agent already exists for session
Cannot register authentication agent: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on 
/org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for session
16/02/2012 03:07:05 PM Autoprobing TCP port in (all) network interface
16/02/2012 03:07:05 PM Listening IPv{4,6}://*:5900
16/02/2012 03:07:05 PM Autoprobing selected port 5900
16/02/2012 03:07:05 PM Advertising authentication type: 'No Authentication' (1)
16/02/2012 03:07:05 PM Advertising security type: 'No Authentication' (1)
Xlib:  extension "DPMS" missing on display ":1.0".

** (gnome-panel:4967): CRITICAL **: panel_applet_frame_change_background: assertion `PANEL_IS_WIDGET (GTK_WIDGET (frame)->parent)' failed


Last edited by spinner0205; 02-16-2012 at 10:26 PM..
# 2  
Old 02-16-2012
It sounds like gnome-session is failing for some reason.
# 3  
Old 02-16-2012
Well I have a feeling it has something to do with the Unable to register authentication agent error in the log.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

vnc xstartup File

Hello everyone I'm new to linux scripting, but I do have experience with Java programming and batch file scripting in Windows. I'm trying to setup the xstartup file for a machine that I have on my network that is running Lubuntu. On Ubuntu's VNC HowTo page they have a script that will configure a... (1 Reply)
Discussion started by: silencer230
1 Replies

2. Solaris

vnc Issue

Dear all, I recently installed did VNC configuration on a Solaris Server. I am using VNC E4 2 7 as my Windows client. The issue is that every time I log into my machine and use terminal ( a few commands like df -h or any other command and then close VNC ( windows). When I log back in ,... (9 Replies)
Discussion started by: Junaid Subhani
9 Replies

3. UNIX for Dummies Questions & Answers

using VNC to connect RH

Hi, I am using VNC to connect to Redhat ES. VNC works great, but when I minimize, I can't seem to bring that window back up. Any one know how to do that. I try ALT -TAB, that brings my Windows, I am trying to bring different terminal windows with in VNC. Thanks (1 Reply)
Discussion started by: samnyc
1 Replies

4. Red Hat

VNC problem

Hello all, I have the folowing problem: When I connected to a VNC server instance, the screen on the vncserver was frezzed. So, I executed the following commands in order to reestablish the VNC instance: service vncserver stop service vncserver start No problem at this point, but now when... (5 Replies)
Discussion started by: mig28mx
5 Replies

5. Solaris

VNC Connect

Hi all, Almost at my wit ends, trying to connect to vnc port 0 on Solaris 10. configured Xservers with the followin: :0 Local local_uid@none root /usr/X11/bin/Xserver :0 -rfbauth /etc/.vnc/passwd -rfbport 5900 :1 Local local_uid@none root /usr/X11/bin/Xserver :1 -rfbauth... (1 Reply)
Discussion started by: srage
1 Replies

6. UNIX for Dummies Questions & Answers

Problem with VNC

Hi all, I have vncserver installed on Sun Solaris 8. The xstartup file looks like: #!/bin/sh && xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & /usr/dt/bin/dtwm & I have installed VNC on /usr/local/bin. When I try to... (0 Replies)
Discussion started by: naw_deepak
0 Replies

7. UNIX for Advanced & Expert Users

Timer for VNC

Hello fellows, I am new in this forum, i would appreciate your assistance. I need a timming system for my vnc desktops (Cybercafe timer stuff). Each unix user login to my server only with vnc, and i want to write a program that can generate timer tickets and have control on the time used for... (1 Reply)
Discussion started by: foweja
1 Replies

8. Shell Programming and Scripting

VNC Timer

Hello fellows, I am new in this forum, i would appreciate your assistance. I need a timming system for my vnc desktops (Cybercafe timer stuff). Each unix user login to my server only with vnc, and i want to write a program that can generate timer tickets and have control on the time used for... (0 Replies)
Discussion started by: foweja
0 Replies

9. UNIX for Advanced & Expert Users

Xstartup file failure - HELP !!

Hi, dear Experts ! I need some help, again. Earlier in my work I experienced that one script included in '/etc/dt/config/Xstartup' file caused some serious troubles. But this is another story. The point here is: I changed the script so that it worked again. But... After restart of... (3 Replies)
Discussion started by: DGoubine
3 Replies

10. UNIX for Dummies Questions & Answers

Vnc

Anyone know of a site where I can download a copy (non-evaluation copy and preferably free. ;) nods to Neo's post in UNIX Operating System thread) of VNC for RedHat 8? Thanks in advance. (7 Replies)
Discussion started by: google
7 Replies
Login or Register to Ask a Question