re-adding Linux on PowerPC support to Xvnc server code

Peter A. Castro yellowdog-general@lists.terrasoftsolutions.com
Fri Jul 19 18:46:01 2002


On Fri, 19 Jul 2002, bronto wrote:

> To be specific, the screen is just an olive drab color, blank, mouse moves 
> around, that's it.

Correct, there is additional configuration you need to do.

vncserver is to Xvnc what startx is to X.

VNCServer is just a virtual X server, so if you want anything like, say,
oh, a window manager or desktop, you need to start it.  One problem is
that some desktops/window/display managers assume you are starting them
under root (gdm is one).  Others, like fvwm2, don't care.  Fortunately
there's a "hook" to let you start whatever you wish, called xstartup.

Create a file "~/.vnc/xstartup".  This is run by vncserver at startup.
You can put whatever things you want to run in it.
Here's mine:
-----------------------------------------------------------------------------
#!/bin/sh
exec /etc/X11/xinit/xinitrc &
-----------------------------------------------------------------------------

Then do a chmod a+rx ~/.vnc/xstartup

xinitrc is a standard X startup script and is what xinit runs.  xinit is
what startx runs to start the normal X server.  xinitrc looks for
~/.Xclients or /etc/X11/xinit/Xclients to start things up.  ~/.Xclients
is for those people who want to control exactly what gets started. 

/etc/X11/xinit/Xclients runs the desktop defined in /etc/sysconfig/desktop.

I'm not a fan of KDE or Gnome (at least not yet :-), so I installed fvwm2
from the Tasty Morsels CD and created my own ~/.Xclients:
-----------------------------------------------------------------------------
#!/bin/sh
rm -f $HOME/Xrootenv.0
rm -f /tmp/fvwmrc* 2>/dev/null
xsetroot -solid SteelBlue
xhost + > /dev/null 2>&1
fvwm2 &
-----------------------------------------------------------------------------


> At 02:59 PM 7/19/02 -0700, you wrote:
> >OK, I got it installed, I can log in, but I expected it to start an X 
> >session just like startx does, i.e. get a login screen then loan Gnome.
> >
> >Am I mistaken, or is there some configuration I need?
> >
> >Rob
> >
> >Thanks a lot for posting this!
> >
> >
> >At 06:07 PM 7/18/02 -0700, you wrote:
> >>On Wed, 17 Jul 2002, bronto wrote:
> >>
> >> > You've got no idea how badly I want to get vnc running on my server.
> >> >
> >> > Can you dumb down the instructions a little more and make a source .tar of
> >> > the whole package available?  This would be awesome.
> >>
> >>I'll do you one better: rpms
> >>
> >>http://www.fruitbat.org/linux/ppc/ydl-2.3/index.html
> >>
> >>http://www.fruitbat.org/linux/ppc/ydl-2.3/vnc-3.3.3r2-34a.ppc.rpm
> >>http://www.fruitbat.org/linux/ppc/ydl-2.3/vnc-doc-3.3.3r2-34a.ppc.rpm
> >>http://www.fruitbat.org/linux/ppc/ydl-2.3/vnc-server-3.3.3r2-34a.ppc.rpm
> >>http://www.fruitbat.org/linux/ppc/ydl-2.3/vnc-3.3.3r2-34a.src.rpm
> >>
> >>I've grabbed (what I think is) the latest 3.3.3r2 source rpm, added my
> >>patch to it and rebuild the src/ppc rpms as mod 34a.  I've installed and
> >>tested them under YDL-2.3, so all I can say is "they work for me" :-)
> >>
> >>I have no idea if my simple patch is truely all there is to re-adding PPC
> >>support (I suspect some maintainer, somewhere, is muttering "wrong wrong
> >>wrong!").  But at least it works (for now).
> >>
> >> > Thanks
> >> >
> >> >
> >> > At 09:32 PM 7/17/02 -0700, you wrote:
> >> > >Hi All,
> >> > >   (I'm not quite sure just who should get this patch, so I'm sending 
> >> it to
> >> > >several, hopefully, relevent lists).
> >> > >   I've been wrestling with getting the vnc/tight-vnc server to run under
> >> > >YDL on PowerPC and not have not had any luck with any of the pre-build
> >> > >rpms after 3.3.3-4.  It appears this problem has existed every since
> >> > >vnc-3.3.3r2 or so.  The real problem is that support for Linux on PowerPC
> >> > >was dropped from the server machine dependent header file, I presume
> >> > >unintentionally.  Without it, the byte order defaults to LSBFirst which
> >> > >doesn't quite work on a big-endian machine :) I've re-added the code and
> >> > >am including a patch.  Note that with the patch, the compiler complains
> >> > >about IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER being redefined, but that's
> >> > >OK :).
> >> > >
> >> > >The patch is against tightvnc-1.2.4 (tightvnc-1.2.4_unixsrc.tar.bz2), but
> >> > >probably patches against the generic vnc source as well.  Hopefully
> >> > >someone will figure out just who owns this file.
> >> > >----------------8<-----------------------------8<--------------------- 
> >> - -----
> >> > >diff -ur vnc_unixsrc-1.2.4/Xvnc/programs/Xserver/include/servermd.h
> >> > >vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h
> >> > >--- vnc_unixsrc-1.2.4/Xvnc/programs/Xserver/include/servermd.h   Tue Mar
> >> > >19 21:36:47 2002
> >> > >+++ vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h         Wed Jul
> >> > >17 20:19:25 2002
> >> > >@@ -386,6 +386,22 @@
> >> > >
> >> > >  #endif /* linux/m68k */
> >> > >
> >> > >+#if defined (linux) && defined(__powerpc__)
> >> > >+
> >> > >+#define IMAGE_BYTE_ORDER       MSBFirst
> >> > >+#define BITMAP_BIT_ORDER       MSBFirst
> >> > >+#define GLYPHPADBYTES          4
> >> > >+#define GETLEFTBITS_ALIGNMENT  1
> >> > >+
> >> > >+#define LARGE_INSTRUCTION_CACHE
> >> > >+#define FAST_CONSTANT_OFFSET_MODE
> >> > >+#define PLENTIFUL_REGISTERS
> >> > >+#define AVOID_MEMORY_READ
> >> > >+
> >> > >+#define FAST_MEMCPY
> >> > >+
> >> > >+#endif /* Linux/PPC */
> >> > >+
> >> > >  #ifdef sgi
> >> > >
> >> > >  #define IMAGE_BYTE_ORDER       MSBFirst
> >> > >----------------8<-----------------------------8<--------------------- 
> >> - -----
> >> > >
> >> > >--
> >> > >Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
> >> > >         "Cats are just autistic Dogs" -- Dr. Tony Attwood
> >> > >
> >> > >
> >> > >
> >> > >_______________________________________________
> >> > >yellowdog-general mailing list
> >> > >yellowdog-general@lists.terrasoftsolutions.com
> >> > >http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> >> >
> >> > _______________________________________________
> >> > yellowdog-general mailing list
> >> > yellowdog-general@lists.terrasoftsolutions.com
> >> > http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> >> >
> >>
> >>--
> >>Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
> >>         "Cats are just autistic Dogs" -- Dr. Tony Attwood
> >>
> >>_______________________________________________
> >>yellowdog-general mailing list
> >>yellowdog-general@lists.terrasoftsolutions.com
> >>http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> >
> >_______________________________________________
> >yellowdog-general mailing list
> >yellowdog-general@lists.terrasoftsolutions.com
> >http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> 

-- 
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood