On Wed, 2003-11-26 at 14:34, Edward Rivenbark wrote:
> Hello,
> 
>   Ok, I have gotten XDirectFB to start correctly, but I'm having
> problems with using it as the default X server.
> 
>   I have edited the startx file as shown here:
> 
> userclientrc=$HOME/.xinitrc
> userserverrc=$HOME/.xserverrc
> sysclientrc=/etc/X11/xinit/xinitrc
> sysserverrc=/etc/X11/xinit/xserverrc
> defaultclient=/usr/X11R6/bin/xterm
> defaultserver=/usr/X11R6/bin/XDirectFB
> defaultclientargs=""
> defaultserverargs=""
> clientargs=""
> serverargs=""
> 
>   I have also added this line:
> 
> xinit $client $clientargs -- /usr/X11R6/bin/XDirectFB -enableRoot
> -defaultOpacity 200 -ac -nolisten tcp & sleep 3 && DISPLAY=:0
> $serverargs
> 
>   I'm using Fedora Core and when I boot up it starts with the normal X
> server.  Although, if I stop X by using init 3 and run startx, it works
> fine.  I would appreciate any help.


Hi Edward,

Ville has already answered this, but perhaps I can be of further
assistance by providing some details of how I got XDirectFB playing
nicely with the gdm display manager. May be similar with other display
managers.

In /etc/X11/gdm/gdm.conf set the line 'VTAllocation=false'
Take note of the lines:
'StandardXServer=/usr/X11R6/bin/X' & 
'command=/usr/X11R6/bin/X'
Either change those 2 lines to point to /usr/X11R6/bin/XDirectFB or
remove & re-create the symlink /usr/X11R6/bin/X to point to
/usr/X11R6/bin/XDirectFB.
You can also set other options for the X server on the 'command' line.

eg. 'command=/usr/X11R6/bin/XDirectFB -enableRoot -defaultOpacity 200
        -ac -nolisten tcp'

That's it, reboot & see if it starts the display manager using
XDirectFB.

Also, Gentoo's emerge script for XDirectFB comes with a nice 'startxdfb'
script. Basically a hacked 'startx' to start things nicely & enable easy
starting of multiple XDirectFB Sessions.

eg. 'startxdfb' to start the first session, then 'startxdfb -- :1' to
start another on DISPLAY:1 etc..

I have attached 'startxdfb' for reference, edit the variables to suit,
but it should work on any distro with a standard XFree install.


Regards,
Rick

#!/bin/sh

userclientrc=$HOME/.xdfbrc
userserverrc=$HOME/.dfbserverrc
sysclientrc=""
sysserverrc=/usr/X11R6/bin/XDirectFB
serverargs=""
clientargs=""

if [ -f $userclientrc ]; then
    clientargs=$userclientrc
else if [ -f $sysclientrc ]; then
    clientargs=$sysclientrc
fi
fi

if [ -f $userserverrc ]; then
    serverargs=$userserverrc
else if [ -f $sysserverrc ]; then
    serverargs=$sysserverrc
fi
fi

display=:0
whoseargs="client"
while [ "x$1" != "x" ]; do
    case "$1" in
    --)
        whoseargs="server"
        ;;
    *)
        if [ "$whoseargs" = "client" ]; then
            clientargs="$clientargs $1"
        else
            serverargs="$serverargs $1"
	    case "$1" in
            :[0-9]*)
                display="$1"
                ;;
            esac
        fi
        ;;
    esac
    shift
done
    
if [ X"$XAUTHORITY" = X ]; then
    export XAUTHORITY=$HOME/.Xauthority
fi

removelist=

# set up default Xauth info for this machine
mcookie=`mcookie`
for displayname in $display `hostname -f`$display; do
    if ! xauth list "$displayname" | grep "$displayname " >/dev/null 2>&1; then
        xauth add $displayname . $mcookie
        removelist="$displayname $removelist"
    fi
done

echo $serverargs
xinit $clientargs -- $serverargs

if [ x"$removelist" != x ]; then
    xauth remove $removelist
fi

if command -v deallocvt > /dev/null 2>&1; then
    deallocvt
fi

Reply via email to