|
|
||
StartX, Consoles, and Keyboard Shortcuts—Day 28© Copyright Darrell Anderson. Although not stopping me from using Slackware and KDE in a productive manner, the way in which I enable a second GUI session continues to perplex me. I hope somebody can shed light on this obtuse mystery. I have edited /etc/X11/xdm/Xservers: :0 local /usr/X11R6/bin/X :0 vt7 -nolisten tcp:1 local /usr/X11R6/bin/X :1 vt8 -nolisten tcp I have edited /opt/kde/share/config/kdm/Xservers: :0 local@tty1 /usr/X11R6/bin/X :0 vt7 -nolisten tcp:1 local@tty2 reserve /usr/X11R6/bin/X :1 vt8 -nolisten tcp My inittab is configured as follows: # Default runlevel. (Do not set to 0 or 6)id:4:initdefault: . . . c1:235:respawn:/sbin/agetty 38400 tty1 linux c2:235:respawn:/sbin/agetty 38400 tty2 linux c3:2345:respawn:/sbin/agetty 38400 tty3 linux #c4:2345:respawn:/sbin/agetty 38400 tty4 linux #c5:2345:respawn:/sbin/agetty 38400 tty5 linux #c6:2345:respawn:/sbin/agetty 38400 tty6 linux When I start KDE from run level 4 and the K display manager (KDM), I get exactly what I expect:
Except for the error messages about KDE and aRts not liking that second session, everything seems Nirvana at this point. Because I intend to boot primarily through run level 4, I should be happy. Except things do not work according to Hoyle if I decide to boot into run level 3 ans start X from there. I always configure GRUB to allow me to boot into a command line login (init 3) or GUI login (init 4 or 5). Thus, when I want to quickly test init scripts I select run level 3 to avoid the time involved going GUI. When I boot into run level 3, I do not see the same results of toggling consoles and screens. When I boot init 3 I see the following:
I pulled my hair for a long time. Two mysteries here:
By trial and error I noticed the following:
My conclusion was startx never sourced the Xservers file or the Xsession script. Indeed, although I am a neophyte with bash, I am familiar enough with programming that after perusing the startx script, I decided that I was correct. When I inspected the Mandrake scripts, the Mandrake programmers are sourcing those files. Yes, I could type this manually every time or create some aliases. I actually created some aliases simply to help me save time while troubleshooting. However, these fixes are kludges. Everything works according to Hoyle in my old Mandrake 9.2 setup in both run level 3 and 4. Yet try as I might, I cannot distinguish why everything works there and fails miserably in Slackware. I am not yet sufficiently seasoned to understand bash. True, if I intend to launch KDE mostly from init 4, then my function keys will be mapped as expected. If I work from run level 3 I have to remember the function keys are mapped differently. Bah! I want consistency and if I have that consistency in Mandrake I expect no less in Slackware. Additionally, the alias kludge does not resolve the problem of not generating an .xsession-errors log file. I finally resolved that problem by copying a few lines of bash code from the Xsession script to the xinitrc script. I’ve tried to study the various documentation about X and as far as I can tell I am on the right path. Yet things do not work as expected from init 3, only init 4. I understand that X normally assigns the function keys to whatever is next available, but I specifically assigned vt7 (F7) and vt8 (F8) to the respective :0 and :1 displays. Thus, why the remapping of the function keys to F4 and F5? Why won’t startx launch a second X session if the startx script is edited with serverargs parameters? Something is broke. What is going on here? I think the problem is peculiar to Slackware and is merely a lack of insight. I’m sure there are some bash wizards out there who can fix this problem. The reason all of this works correctly with display managers is those programs use a configuration file that maps which files and scripts to use. The KDE display manager copies the existing xdm configuration files and uses those files as a baseline. The KDE display manager configuration file, kdmrc, can be regenerated at any time, so the original xdm files serve as the proper single source. Unlike Mandrake, in Slackware the startx script does not correctly source the xdm configuration files. The Slackware startx should do the following:
Lastly, once again, what do I have to do to obtain use of my right Alt key when I am not in an X session? This is getting to be a nightmare! Finis. |
||