[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Reasons to preseve X on tty7



On Thu, Oct 30, 2008 at 8:44 AM, Bill Nottingham <notting redhat com> wrote:
> Dan Nicholson (dbn lists gmail com) said:
>> I didn't suggest having plymouth change to tty7. In fact, I posted a
>> patch so that it's all controlled from /etc/sysconfig/desktop instead
>> of having plymouth and gdm work behind the scenes.
>>
>> https://www.redhat.com/archives/fedora-devel-list/2008-October/msg02516.html
>>
>> Does that seem reasonable at all?
>
> Better, but still problematic, especially on runlevel 3->5 transitions:
>
> - by moving the trigger to prefdm, you get gdm/X on whatever tty you run
>  telinit from...
> - which makes the logic w.r.t. tty1 in /etc/event.d/tty1 incorrect

Yeah, I realized that later. The writing of /var/spool/gdm/whatever
should be done from /etc/event.d/tty1, since that's the only place you
really know it's appropriate. I changed it so that it only happens on
initial boot to runlevel 5 (`runlevel` = "N 5"). There is still the
problem where getty is not started on tty1 when the display manager is
not gdm. That would require some more smarts between /etc/event.d/tty1
and /etc/event.d/prefdm. But that's no different than the current
situation. I'm confident this can be done correctly, though. Patch
attached.

--
Dan
diff --git a/event.d/tty1 b/event.d/tty1
index 7747d66..3e873c8 100644
--- a/event.d/tty1
+++ b/event.d/tty1
@@ -6,10 +6,22 @@
 start on stopped rc2
 start on stopped rc3
 start on stopped rc4
+start on started prefdm
 
 stop on runlevel 0
 stop on runlevel 1
 stop on runlevel 6
 
 respawn
-exec /sbin/mingetty tty1
+script
+	FORCEACTIVEVT=yes
+	[ -f /etc/sysconfig/desktop ] && . /etc/sysconfig/desktop
+	set $(runlevel || true)
+	if [ "$1" = N ] && [ "$2" = 5 ] && \
+		[ "$FORCEACTIVEVT" = yes ] && [ -w /var/spool/gdm ]
+	then
+		touch /var/spool/gdm/force-display-on-active-vt
+	else
+		/sbin/mingetty tty1
+	fi
+end script

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]