Re: X on tty1 in Rawhide/F10

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

 



2008/10/28 Will Woods <wwoods@xxxxxxxxxx>:
> On Mon, 2008-10-27 at 17:07 -0400, Will Woods wrote:
>> Hi folks,
>>
>> If you're running F10Beta/Rawhide, you may have noticed already, but I
>> wanted to make sure everyone knows this is intentional:
>>
>> X HAS MOVED FROM VT7 TO VT1.
>
> OK look. If you absolutely cannot deal with this DRASTIC change in
> behavior:
>
> 1) add "start on started prefdm" to /etc/event.d/tty1
> 2) (GNOME) edit /etc/gdm/custom.conf and add
>     FirstVT=7
>   to the top of the file. Or:
>   (KDE) edit /etc/kde/kdm/kdmrc and set
>     ServerVTs=-7
>     ConsoleTTYs=tty1,tty2,tty3,tty4,tty5,tty6
> 3) Sigh contentedly at the restoration of your precious tradition.
>
> If you use runlevel 3 + startx, nothing has changed.

I don't think this is quite how it works in the plymouth/gdm new world
order. Especially since newer gdm doesn't support FirstVT anymore.

plymouth drops a file /var/spool/gdm/force-display-on-active-vt, which
gdm checks for when starting its slave. Instead, I think this can all
be handled from upstart with a preference FORCEACTIVEVT in
/etc/sysconfig/desktop (names/files open for suggestion).

Attached is an untested patch which:

1. Writes /var/spool/gdm/force-display-on-active-vt from prefdm if
$FORCEACTIVEVT = yes
2. Starts getty on tty1 in rc5 if $FORCEACTIVEVT=no

So, you can get the old behavior back with

echo 'FORCEACTIVEVT=no' >> /etc/sysconfig/desktop

This requires that writing /var/spool/gdm/force-display-on-active-vt
is removed from plymouth.

--
Dan
diff --git a/event.d/tty1 b/event.d/tty1
index 7747d66..f1f261f 100644
--- a/event.d/tty1
+++ b/event.d/tty1
@@ -6,10 +6,20 @@
 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 [ "$2" = 5 ]; then
+		[ "$FORCEACTIVEVT" = no ] && /sbin/mingetty tty1
+	else
+		/sbin/mingetty tty1
+	fi
+end script
diff --git a/prefdm b/prefdm
index 675506e..025f406 100755
--- a/prefdm
+++ b/prefdm
@@ -8,6 +8,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 # Run preferred X display manager
 quit_arg=
 preferred=
+FORCEACTIVEVT=yes
 if [ -f /etc/sysconfig/desktop ]; then
 	. /etc/sysconfig/desktop
 	if [ "$DISPLAYMANAGER" = GNOME ]; then
@@ -26,6 +27,9 @@ else
 	quit_arg="--retain-splash"
 fi
 
+# tell gdm to reuse the active VT
+[ "$FORCEACTIVEVT" = no ] || touch /var/spool/gdm/force-display-on-active-vt
+
 # shut down boot splash
 /usr/bin/plymouth quit $quit_arg
 
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux