|
|
||
Bash and X Session Errors—Day 34© Copyright Darrell Anderson. Although I installed Mandrake 10.1 on my test box to help me with some hardware configuration, I was unsatisfied with comparing X configuration files. So I booted from my Knoppix 3.4 CD and copied some modeline settings to Slackware. That seemed to help. I have tried repeatedly to do the same on my primary box with the LCD monitor. Although I spent far too much time using the nonsense program xvidtune to adjust my LCD monitor, I sure would like a second opinion on modelines. Yet, Knoppix refuses to load into X with the LCD monitor. I’m certain the problem is the native resolution of 1280x1024, but Knoppix will go no further. I was able to use Mandrake to help me configure the AGP card. The primary cause was I needed to install 3dfx-glide from the extras directory. Considering how common AGP and direct rendering cards are, I would have expected this file to be automatically installed. Another unnecessary and unexplained side trip with Slackware. In Slackware I now achieve about 587 frames per second (fps) when I run glxgears. Hardly screaming but faster than before. Mandrake runs at about 720 fps and I think the difference is the 2.6 x kernel. At this stage I have no need or desire to install a 2.6.x kernel for Slackware on either box. I’ll continue with the 2.4.28 kernel. However, I have noticed that direct rendering does not work in a second X session. Apparently DRI works in one X session only. I have no idea why. Things like this puzzle me. After all, GNU/Linux is supposed to be a multi-user operating environment. Shouldn’t such features be programmed from the beginning to work with multi-users? The same goes for the KDE aRts support. Odd. One nice thing about having a second box is not tying up my primary box to compile kernels. I have been practicing on my second box. I don’t know where I went wrong on my first box, but I am now able to compile without depmod problems. I will try to compile a new kernel for my primary box and then use my drive bays and external hard drive to copy files. I also have learned that compiling without the X environment is much faster. So I guess good-bye to xconfig. Doesn’t matter really, the ncurses menuconfig is easy to migrate around. With some playing, I did get Slackware to perform an APM power shutdown on my test box. I needed to uncomment a line in both rc.modules and rc.M.. Unfortunately, I cannot get APM to work on my primary box. I would like to do that because the new LCD monitor supports DPMS. I know hard drive spin-down works on my first box from my Knoppix experience. Thus, I assume DPMS should work too. The BIOS supports that feature. Because I boot into both run level 3 and 4, I created some aliases for booting into X from run level 3: alias startx0="startx -- :0 vt7 -nolisten tcp 2> /dev/null and"alias startx1="startx -- :1 vt8 -nolisten tcp 2> /dev/null and" alias x0="startx0" alias x1="startx1" I also plan to use the multi-user features often during my migration. I easily see me logging in as root to make quick changes to my normal user account and toggling back to verify those changes. No need to play the reboot game so familiar in Windows. I am going to enjoy the multi-user features, that’s for sure! However, one thing I noticed when using multiple logins under the same account is the second session overwrites the .xsession-errors log. I did not like that. I want a separate error log for each X session and regardless of which login account started that session. I then looked on the web for some way to determine the X session number and I found a short test script: # assign $display to next availabledisplay=0 while [ -e "/tmp/.X${display}-lock" ]; do display=$(( $display + 1 )); done display=$(( $display - 1 )) That short piece of bash script helps me determine the X session number. I then edited three files:
In each file I added the following: # redirect errors to a file in user's home directory if we canfor errfile in "$HOME/.xsession$display-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" do if ( cp /dev/null "$errfile" 2> /dev/null ) then chmod 600 "$errfile" exec > "$errfile" 2>and1 break fi done Now whether I booted into X from run level 3 or 4, my xsession errors log will be numbered. Thus, if I logged in a second session under the same login account, each session created separate log files. For example, if I log in twice in X I would have two error logs: .xsession0-errors and .xsession1-errors. To me, this is the way all of this should work right out of the box (hint). Finis. |
||