-
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

Sandisk 16GB 32GB 64GB 128GB Cruzer Blade Flash Drive Memory Stick USB Lot Pack
$175.90

SanDisk Ultra Luxe USB 3.1 Flash Drive – 5 Pack | Premium Metal USB Flash Drives
$59.99

Microsoft Windows 11 Pro 64bit - New Sealed – Flash USB 1 PC
$49.99

Wholesale 5/10/100PCS 1GB 2GB 4GB 8GB 16GB 32GB USB 2.0 Flash Drive Memory Stick
$378.00

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack
$826.09

Sandisk Flash Drive 16GB 32GB 64GB 128GB 256GB 512GB Blade Glide Ultra Flair lot
$623.38

Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot
$285.90

Sandisk 32GB 64GB 128GB 256GB Cruzer Glide Flash Drive USB 2.0 Memory Lot
$404.42

Kanguru KF3WP-64G USB Flash Drive with Write Protection Switch
$62.00

Tesla 128gb usb flash drive 3.1
$15.99