Human Readable  

 

     
   
     

StartX, Consoles, and Keyboard Shortcuts — Day 25

© Copyright Darrell Anderson.

I again have been sidetracked by the lack of an intuitive computer environment. Often I feel as though for every two successful steps I take in migrating I take one step backwards. Much time is involved to configure my system the way I envision. GNU/Linux wonderfully provides me the liberty I need to customize to my heart’s content, but GNU/Linux is sufficiently complex that getting there often is a struggle. Yes, I am learning, but often I wonder at what expense. My computer is supposed to be a tool, not an obsession. Yet, when I do not find my system configured the way I want, and because GNU/Linux is a complex environment, often I am stuck with little alternative but to spend hours surfing, researching, studying, and hoping that I find sufficient information providing insight. When I say hours I mean hours. I’m on dial-up remember? Worse, often I find many discussion threads that stop, with no solution or further feedback. There are many dead ends out there.

Then there is the priesthood. This is an element of human nature, not necessarily peculiar to GNU/Linux people. “Eliteness” always has been a potentially disruptive social force. There are those who know how to mumble only one mantra — “man pages and RTM!” Anybody who has any sense of compassion knows that few man pages are written for the masses. They are written to a tightly vertical audience: programmers and developers. That is, one must be acquainted with how computers function in order to find any hope of conquering a man page.

There also is a lot of misinformation circulating at discussion forums. Many people are knowledgeable, but consider one of my recent frustrating side journeys.

I wanted to experience the multi-user and multi-tasking environment often touted with the GNU/Linux. Multi-tasking is nothing new to me. I was playing with Amigas back in the late 1980s. However, multi-users — on a non-networked, single, stand-alone system, is somewhat unique. Yes, XP provides “fast user switching,” but the ’nix people have been doing this for a long time. Time for me to join the party!

I see much benefit in using a multi-user environment, even as a single user of a system. In one session I can modify system configurations, and boot to another session to test those changes — all without rebooting. I have long disliked that aspect of DOS and Windows.

I had booted into my normal KDE 3.3.1 environment. I pressed Alt-F2, thinking I would be taken to another terminal session. Nothing. Only because I have been around computers a long time, I tried various permutations of that keyboard combination and eventually pressed Ctrl-Alt-F2. Voila! A second terminal session. I was confused why I needed the Control key, but what the hay, for the moment I was in. Later, with some additional thought, I realized the Control key is necessary in the GUI environment because the Alt key is the common keyboard modifier for program menus. Thus, the additional Control key made sense to me.

I entered my second terminal session. I logged in, did a quick directory listing, and logged out. Pretty cool! Then, naturally, I pressed Ctrl-Alt-F1 thinking I’d go back to my first terminal session. Nope. Nothing. I then pressed Alt-F1. That took me back to my first terminal session and I could see the text from the startx script output. How to get back to my GUI?

I previously had read that Alt-F7 is supposed to toggle me to my first GUI session but that did not work. Eventually I tried all the function keys. I succeeded in returning to my GUI session using Alt-F3. I scribbled some notes hoping to notice a pattern. Nothing struck me as obvious, so back to Windows and the web. Eventually I figured out what was going on, but not before running into a lot of misinformation. Most people in the discussion groups inform others that Alt-F7 is the way back to the first GUI. Well — maybe! Depends upon how many terminal sessions are enabled in inittab. Experienced ’nix people probably can guess what is coming next.

Long ago I had read that the typical home user will survive more than happily with only two or three terminal sessions. Thus, in my inittab I had commented out tty3 through tty6. This action supposedly helps reduce overhead and provides more available memory. Considering I am using “ancient” hardware, this tweak seemed reasonable. Thus, I had access only to two terminal sessions. Yet, as I had discovered, Alt-F7 is not a fixed gateway to the first GUI. Apparently X is designed to assign the GUI session to the next available function key. Because F1 and F2 were assigned to the first two console sessions and I had disabled the remaining sessions, the next available function key was F3. Thus, Alt-F3 returned me to my GUI, not Alt-F7. Now everything made sense — contrary to all of the hype at various discussion groups.

This presumption by many that the first GUI is assigned to Alt-F7 is erroneous and misleading. However, what exasperated and frustrated me is I failed to find a simple explanation of how this process works. I basically figured out this process by trial and error. Yes, there is a lot of detailed and convoluted essays, articles, and How-Tos available on-line, but who wants to spend hours looking for needles in haystacks? And have compassion for anyone who is not clever enough to enter the precise key words that will reveal what one seeks!

Consider too that the next natural thing I tried with my multi-user experiment was to start a second GUI session. Once I understood the algorithm of the function keys to toggle into different terminal sessions, I figured all I had to do was type startx and I’d start another GUI. Wrong — another illusion!

Back to the web. Eventually I discovered that the correct syntax is startx -- :1. Okay, that made sense. Sort of. I mean, why isn’t the startx script written with enough intelligence to automatically launch an X session on the next available display? Why manually type “-- :1”? The startx script should look at either the DISPLAY environment variable or the /tmp lock file to determine the next available display. Simple! This lack of consistency and doing things the hard way is why the phrase user-hostile and not user-friendly remains relevant. Has the startx script been around all of these years and no one has yet thought to add such a simple but friendly feature?

I boot into Slackware, switch to my second terminal session, and type startx -- :1. Yup, this is working! I waited. Nope, this is not working! All I saw was a black screen. I pressed Ctrl-Alt-Backspace to end the GUI attempt. Intuitively, I headed to /var/log and yes, there was an xorg.1.log file. Partial success. I open that file and found no clues. I did an eyeball comparison to my xorg.0.log and discerned nothing of importance. Thus, I still did not know how to start a second GUI session. I would like to know the exact pecking order of how this is all supposed to work. Which configuration file leads to the next configuration file, etc. Only in that manner do I hope to resolve the problem.

Yet, this was hardly the end of my trying to learn how to be a true multi-user.

Originally when I had tried to toggle into the second terminal session, with my right-hand I pressed the right Alt key and pressed F2 with my left hand. I still use my Northgate Omnikey Ultra-T keyboard, with function keys down the left side of the keyboard (and programmable function keys at the top row, which I have configured as Shift-function keys). Thus, my two-handed method of pressing Alt-F2 is natural. I also do not want to develop carpal tunnel or repetitive stress problems trying to use one hand to toggle the keys. Nothing happened, however, when I press the right Alt key. Only by trial-and error did I discover that on my setup, the right Alt key works to toggle alternate terminal sessions only when used in the GUI. Outside the GUI, the right Alt key does nothing. I then booted into all of my other GNU/Linux setups and none of them allowed me to use the right Alt key to toggle terminal sessions. The only note of success I had was in Knoppix I could start a second GUI from startx, although I still don’t how to accomplish this trick in Slackware.

Back to the web. Sigh! I’m unsure, but I think the reason has to do something with the right Alt key being used as a modifier to switch entire keyboard maps. This would be a common need for people who write in more than one language. If I am guessing correctly, that is pretty nifty, but nonetheless, I want my right Alt key back! Yet, I have no idea how to modify the kernel keymap.

Finis.

Table of Contents