From owner-freebsd-gnome@FreeBSD.ORG Mon Sep 27 18:03:26 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F7F916A4CE for ; Mon, 27 Sep 2004 18:03:26 +0000 (GMT) Received: from smtp2.jazztel.es (smtp2.jazztel.es [62.14.3.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDBB743D1D for ; Mon, 27 Sep 2004 18:03:25 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from antivirus by smtp2.jazztel.es with antivirus id 1CBzqK-0002L3-00 for gnome@freebsd.org Mon, 27 Sep 2004 20:03:20 +0200 Received: from [212.106.255.190] (helo=rguez.homeunix.net) by smtp2.jazztel.es with esmtp id 1CBzqK-0002KE-00 for gnome@freebsd.org Mon, 27 Sep 2004 20:03:20 +0200 Received: from localhost.redesjm.local (orion.redesjm.local [192.168.254.16]) by rguez.homeunix.net (8.13.1/8.13.1) with ESMTP id i8RI3N5L034602 for ; Mon, 27 Sep 2004 20:03:23 +0200 (CEST) (envelope-from josemi@freebsd.jazztel.es) References: Message-ID: To: gnome@freebsd.org Date: Mon, 27 Sep 2004 20:03:23 +0200 From: "Jose M Rodriguez" Content-Type: multipart/mixed; boundary=----------A50FiFER6tal0J6hGLybsP MIME-Version: 1.0 In-Reply-To: User-Agent: Opera M2/7.54 (FreeBSD, build 751) X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.27.0.11; VDF 6.27.0.70 (host: antares.redesjm.local) X-Virus-Scanned: by antivirus Subject: Fwd: WIP: /etc/rc.d/xdm Working patch for test. X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 18:03:26 -0000 ------------A50FiFER6tal0J6hGLybsP Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Can someone of gnome@ try this ------- Forwarded message ------- From: "Jose M Rodriguez" To: current@freebsd.org Subject: WIP: /etc/rc.d/xdm Working patch for test. Date: Mon, 27 Sep 2004 18:47:16 +0200 Well, this is the frist working patch for a /etc/rc.d/xdm script. To workaround de init/xdm race problem, I rename the script to 0xdm, and is now even closest to the end of rcorder than local. So, now, this script can: - launch Xorg/gdm/kdm/xdm from /etc/rc.conf - launch it from boot without init (/etc/ttys) race problems - doesn't affect previous /etc/ttys or /usr/X11R6/ets/rc.d/gdm.sh xdm launchs. - xmd start/stop via /erc/rc.d/0xdm start ... - admit more elaborate launch via /etc/rc.conf.d/xdm - aply patch: # cd /usr/src && patch -p0 < path-xdm4 + check no xdm and 0xdm + update /etc/rc.d - xdm launch # echo 'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start - gdm launch # echo 'xdm_program="/usr/X11R6/bin/gdm" >> /etc/rc.conf && echo 'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start - kdm launch # echo 'xdm_program="/usr/local/bin/kdm" >> /etc/rc.conf && echo 'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start - Xorg XDMCP broadcast # echo 'xdm_program="/usr/X11R6/bin/Xorg" >> /etc/rc.conf && echo 'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start Now ready for test. -- josemi -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ ------------A50FiFER6tal0J6hGLybsP Content-Disposition: attachment; filename=patch-xdm4 Content-Type: application/octet-stream; name=patch-xdm4 Content-Transfer-Encoding: 8bit diff -Nru /usr/src/etc/rc.d/0xdm etc/rc.d/0xdm --- /usr/src/etc/rc.d/0xdm Thu Jan 1 01:00:00 1970 +++ etc/rc.d/0xdm Mon Sep 27 18:19:57 2004 @@ -0,0 +1,56 @@ +#!/bin/sh +# +# $NetBSD: xdm,v 1.5 2000/07/17 15:24:48 lukem Exp $ +# + +# PROVIDE: xdm +# REQUIRE: DAEMON LOGIN syscons moused +# KEYWORD: FreeBSD nojail shutdown + +. /etc/rc.subr + +name="xdm" +rcvar=`set_rcvar` + +# Place any needed extra config in /etc/rc.conf.d/xdm +load_rc_config $name + +command="${xdm_program:-/usr/X11R6/bin/xdm}" + +# a good ENV for a X11 App, we are in our subshell +HOME="/root" +PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin" +export PATH HOME + +case `basename ${command}` in + xdm) + # xdm standard display manager + : ${required_files:=/usr/X11R6/lib/X11/xdm/xdm-config} + : ${pidfile:=/var/run/xdm.pid} + : ${extra_commands:="reload"} + ;; + gdm) + # gnome gdm display manager + : ${required_files:=${command%/bin/gdm}/etc/gdm/gdm.conf} + : ${pidfile:=/var/run/gdm.pid} + : ${procname:=${command}-binary} + ;; + kdm) + # KDE kdm display manager + : ${required_files:=${command%/bin/kdm}/share/config/kdm/kdmrc} + : ${pidfile:=/var/run/kdm.pid} + # don't use start_precmd(). We have local genkdmconf.sh now + ;; + Xorg) + # xdm login via Xorg broadcast XDMCP + : ${required_files:=/etc/X11/xorg.conf} + : ${xdm_flags:=-broadcast &} + ;; + Xfree86) + # xdm login via Xfree86 broadcast XDMCP + : ${required_files:=/etc/X11/XF86Config} + : ${xdm_flags:=-broadcast &} + ;; +esac + +run_rc_command "$1" diff -Nru /usr/src/etc/rc.d/Makefile etc/rc.d/Makefile --- /usr/src/etc/rc.d/Makefile Mon May 24 16:17:19 2004 +++ etc/rc.d/Makefile Mon Sep 27 06:06:48 2004 @@ -37,6 +37,7 @@ usbd \ var vinum virecover \ watchdogd \ + 0xdm xfs \ ypbind yppasswdd ypserv \ ypset ypupdated ypxfrd FILESDIR= /etc/rc.d diff -Nru /usr/src/etc/rc.d/xdm etc/rc.d/xdm --- /usr/src/etc/rc.d/xdm Sat Jun 16 09:16:14 2001 +++ etc/rc.d/xdm Thu Jan 1 01:00:00 1970 @@ -1,20 +0,0 @@ -#!/bin/sh -# -# $NetBSD: xdm,v 1.5 2000/07/17 15:24:48 lukem Exp $ -# - -# PROVIDE: xdm -# REQUIRE: DAEMON LOGIN wscons -# KEYWORD: shutdown - -. /etc/rc.subr - -name="xdm" -rcvar=$name -command="/usr/X11R6/bin/${name}" -pidfile="/var/run/${name}.pid" -required_files="/usr/X11R6/lib/X11/xdm/xdm-config" -extra_commands="reload" - -load_rc_config $name -run_rc_command "$1" diff -Nru /usr/src/etc/rc.d/xfs etc/rc.d/xfs --- /usr/src/etc/rc.d/xfs Fri Jun 14 00:14:36 2002 +++ etc/rc.d/xfs Mon Sep 27 12:59:51 2004 @@ -7,11 +7,12 @@ # PROVIDE: xfs # REQUIRE: mountall cleartmp # BEFORE: LOGIN +# KEYWORD: FreeBSD . /etc/rc.subr name="xfs" -rcvar=$name +rcvar=`set_rcvar` command="/usr/X11R6/bin/${name}" command_args="& sleep 2" required_files="/usr/X11R6/lib/X11/fs/config" diff -Nru /usr/src/etc/defaults/rc.conf etc/defaults/rc.conf --- /usr/src/etc/defaults/rc.conf Sun Sep 26 05:10:09 2004 +++ etc/defaults/rc.conf Mon Sep 27 06:16:54 2004 @@ -467,6 +467,8 @@ economy_cx_lowest="LOW" # Offline CPU idle state economy_throttle_state="HIGH" # Offline throttling state virecover_enable="YES" # Perform housekeeping for the vi(1) editor +xdm_enable="NO" # Start the X11 Display Manager +xfs_enable="NO" # Start the X11 Font Server ############################################################## ### Jail Configuration ####################################### ------------A50FiFER6tal0J6hGLybsP--