-
Race bug in xsession-knoppix
I encountered a race bug in the xsession-knoppix package, in /etc/X11/Xsession.d/45xsession.
At first, I thought something was wrong with my remastering. See discussion in http://www.knoppix.net/forum/viewtopic.php?t=3558.
After failing to find a change I made which caused KDE configuration to reset to default while loading, I created a new remaster, starting from knoppix 3.2, and made sure I'm not making any changes other than running some daemon I need from some rc file which is totally unrelated to KDE or X11. The bug was still there but was not persistent. Sometimes the environment was ok and sometimes it wasn't.
After a lot of digging and adding debug messages all over the place (which made the problem worse), I realized that when 45xsession copies the kde config files in this line:
Code:
\cp -ua /etc/skel/{.kde*,Desktop} $HOME/
it fails to copy some important files from /etc/skel/.kde/share/config/, claiming that the directory already exists in the ramdisk homedir and has no write permission. I added
Code:
rm -rf /ramdisk/home/knoppix/.kde
right before the above line, and still, sometimes these config files were created before the cp had a chance to put the real files there. Some other process was racing with 45xsession on the creation of some files in .kde.
Looking a bit up in 45xsession reveals a right before the cp takes place, after ksplash is executed. Playing with the sleep time solves the problem here, but on slower hardware or with mode processes using the CPU during init, the problem can reappear.
To sum it up, ksplash, at a certain point, creates .kde/share/config if its not there yet, and prevents cp from putting the real files there.
I don't know why ksplash has to be loaded so early instead of after the non-persistent homedir is created, but in the meantime, here's a real work-around which isn't time-based (so the sleep 2 can be eliminated):
Right before ksplash is executed, I do
Code:
mkdir -p $HOME/.kde/share/config
.
This is ugly but solves it for now. As a real solution, ksplash has to be executed AFTER the creation of the non-persistent homedir, or be patched to create these dirs with proper permissions.
Who maintains this package ?
Mack
Similar Threads
-
By o0oO in forum Hardware & Booting
Replies: 4
Last Post: 09-28-2004, 11:49 PM
-
By bamarob in forum General Support
Replies: 0
Last Post: 07-08-2004, 07:44 PM
-
By linuxusr in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 06-05-2004, 08:31 PM
-
By rylcomputer in forum Customising & Remastering
Replies: 0
Last Post: 02-13-2004, 03:09 PM
-
By theARE in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 08-29-2003, 07:43 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Vintage Link Terminal Mechanical Keyboard Alps Black Switches 840352-30
$139.95

Title:Rare Vintage Magnetic Core Memory Board Plane – Retro Computing Collectibl
$2000.00

VINTAGE UMPC Fujitsu Lifebook P1120 8.9" Touchscreen Crusoe 800MHz - Windows XP
$349.95

Vintage eMate 300 Computer System Rare Kids Laptop Newton Operating System
$349.99

Intel GRAMPA BURST 168-pin 486 CPU Interposer/Testing Adapter Board Vintage
$289.99

Apple Power Mac G5 Tower + Keyboard - Powers On - For Parts/Repair - Vintage
$80.00

RARE Sealed Montezuma Micro CP/M TRS-80 Model 4 Software 900-0600 Vintage
$279.99

Vintage Apple Extended Keyboard II M3501 Mechanical ADB - Tested & Working
$54.99

Vintage Sun 320-1005 Type 4 Keyboard & 370-1170 Type-4 Mouse & Optical Mouse Pad
$129.00

Apple Mac OS9 Cloth Banner Think Different 64 x 24 inches NEW ORIGINAL Vintage
$99.99