From: Marc M. <ma...@me...> - 2009-02-20 18:31:09
|
On Thu, Feb 19, 2009 at 11:00:32PM -0800, David Norwood wrote: > It looks like you are running two X instances. One as root on the console, > and a vnc instance as merlin. I'm assuming you are starting misterhouse on > the console and this is a permissions problem. You either need to login to > the console as merlin, or run "xhost +" as root before you start misterhouse > as merlin. That command will allow non root users to display windows on > root's X instance. Tk should have a better error message. Sorry, I gave way too little info. I was running within the vnc instance of that server with proper display permissions. I can run xclock just fine in that shell, but if I try to run mh with tk, it blows up. Problem is that if I run mhl as myself within vnc (headless server), even though my DISPLAY is set just fine, tk won't start. I was able to debug this further: gargamel:/var/local/src/misterhouse/mh/bin$ wish Application initialization failed: unknown color name "Black" % gargamel:/var/local/src/misterhouse/mh/bin$ A backtrace shows: a589180 is not a hash at /usr/lib/perl5/Tk/MainWindow.pm line 55. at /usr/lib/perl5/Tk/MainWindow.pm line 55 eval {...} called at /usr/lib/perl5/Tk/MainWindow.pm line 55 Tk::MainWindow::new('MainWindow') called at mh line 6394 main::tk_setup_windows called at mh line 1074 main::setup called at mh line 7484 Aborted I couldn't whip up a good patch to catch this exception in Perl TK, but how about this output: - setting up main window. If this fails, please try to run 'wish' from command line and get this working first a178710 is not a hash at /usr/lib/perl5/Tk/MainWindow.pm line 55. Aborted the user would then run: gargamel:/var/local/src/misterhouse/mh-svn/bin$ wish Application initialization failed: unknown color name "Black" and hopefully fix it --- mh-svn.old/bin/mh 2009-01-11 09:56:09.000000000 -0800 +++ mh-svn/bin/mh 2009-02-20 10:21:53.000000000 -0800 @@ -6390,8 +6390,14 @@ sub tk_setup_windows { # See perl/bin/widget.bat for lots of examples - print " - setting up main window\n"; - $MW = MainWindow->new; + print " - setting up main window. If this fails, please try to run 'wish' from command line and get this working first\n"; + use Error qw(:try); + try { + $MW = MainWindow->new; + } + catch Error with { # I wish this worked, but it does not + die "Could not create TK window, try running 'wish' from the command line to debug" + }; $MW->withdraw; # Hide the window until we are all set up # doesn't quite work on XP :( If you have no better idea than the catch error which does not catch the error for me, can you just change the + print " - setting up main window. If this fails, please try to run 'wish' from command line and get this working first\n"; By the way, my Xrealvnc was busted, despite: > merlin 7351 0.9 1.1 16472 11832 ? S Jan13 503:19 Xrealvnc :1 -desktop X -httpd /usr/share/vnc-java -auth /home/merlin/.Xauthority -geometry 1152x900 -depth 16 -pixelformat rgb565 -rfbwait 120000 -rfbauth /home/merlin/.vnc/passwd -rfbport 5901 -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType -co /etc/X11/rgb.txt > gargamel:~$ l /etc/X11/rgb.txt > -rw-r--r-- 1 root root 17371 2002-10-16 13:20 /etc/X11/rgb.txt > gargamel:~$ grep -i Black /etc/X11/rgb.txt > 0 0 0 black > gargamel:/usr/X11R6/lib/X11# strings /usr/bin/Xrealvnc | grep rgb > /usr/X11R6/lib/X11/rgb > gargamel:/usr/X11R6/lib/X11# grep -i black /usr/X11R6/lib/X11/rgb.txt > 0 0 0 black It just would not work. I even upgraded to a recent vnc4server, and still, the vnc log shows: Xvnc Free Edition 4.1.1 - built Jan 30 2009 19:39:5 Couldn't open RGB_DB '/etc/X11/rgb.txt' which of course I have, can read as myself, and Xorg can read and use just fine. I'll need to debug this further, but it's not an mh problem anymore :) Thanks, Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems & security .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ |