-
Junior Member
registered user
stupid stupid stupid knoppix
-
I'm no knoppix master but your second code line should work i believe.
Are you sure you didn't forget anything as simple as permissions, configfiles already in homedir or something like that? I has happend to me and it can be very annoying...
-
Junior Member
registered user
Yes I am sure that code will work but it didn't work
I try to many things but I still get the default settings (permissions is ok)
-
Re: stupid stupid stupid knoppix

Originally Posted by
MrAhmad
every time I custom the KDE,Mozilla Bookmark , Openoffice, and other and then I copy them to
/etc/skel/ (and even to /usr/share/knoppix/profile) but It still create a new home for knoppix with the default settings (not with /etc/skel)
I searched the forum but I can't find any good solution
Any help pleaaaaseee

First things first:
1) when you boot, are the files in /etc/skel at least?
Anyhow, I've had a similar problem and resolved the following way (supposing, you're already CHROOTed!):
1) copy all the files you wish to be in /home/USER to /opt/
2) Create a scripts directory inside /opt
Code:
mkdir /opt/startup_scripts
3) create the init script to copy the files
Code:
touch /etc/init.d/copy_home_files
4) copy_home_files content
Code:
#!/bin/sh
case "$1" in
start)
echo -n "Starting COPY FILES TO HOME DIRECTORY"
start-stop-daemon --start --quiet --exec /opt/startup_scripts/startup.sh \
-- $PARAMS
echo "."
;;
*)
echo "Usage: /etc/init.d/copy_home_files " \
" {start}" >&2
exit 1
;;
esac
exit 0
5) Now lets make the actual script
Code:
touch /opt/startup_scripts/startup.sh
6) startup.sh content
Code:
#!/bin/sh
cp -R /opt/xml /home/knoppix
chown -R knoppix:knoppix /home/knoppix/xml
cp -R /opt/.mozilla /home/knoppix
chown -R knoppix:knoppix /home/knoppix/.mozilla
cp -R /opt/jakarta-tomcat-4.1.27 /home/knoppix
chown -R knoppix:knoppix /home/knoppix/jakarta-tomcat-4.1.27
mkdir /home/knoppix/.icewm
echo "#!/bin/bash
mozilla
" > /home/knoppix/.icewm/startup
chown knoppix:knoppix /home/knoppix/.icewm/startup
chmod 755 /home/knoppix/.icewm/startup
you get the picture... (this is my actual script!)
7) and finally, we add the startup script to the boot process by
Code:
update-rc copy_home_files defaults > /dev/null
THERE!!! Now when your system (on the cd) boots, your files should be copied from /opt/WHATEVER_FILES to /home/USER/...
Good luck!
enrolado
-
Senior Member
registered user
I dont think knoppix is the one thats stupid.
[edit] But I can understand how it made you say that.You spend countless hours trying to build the dream cd and it dont do as expected.Grrrrrr.
-
Junior Member
registered user
Thank you enrolado for the script
I will try it today
and I think Knoppix must fix this problem in the next release (Its very bad not to use /etc/skel like all other dist.)
-
Senior Member
registered user

Originally Posted by
MrAhmad
(Its very bad not to use /etc/skel like all other dist.)
It uses /etc/skel when it is copied to the HD and creating new users so it is just an issue with the re-mastering process and not knowing where the files are created therein.
-
Junior Member
registered user
Thanks enrolado
Very very very nice scripts
I think you have to write this tips in Tips Forum
BTW : remember to chmod (0755) the files /etc/init.d/copy_home_files and /opt/startup_scripts/startup.sh
-
Hi.
I have copy_home_files in /etc/init.d, chmod 755 for /etc/init.d/copy_home_files and /opt/startup_scripts/startup.sh etc ..
and I did:
update-rc.d copy_home_files defaults > /dev/null
But there is a problem, because this script is running also after HD install (not only LiveCD) .. 
Maybe should I add copying these files to
/etc/X11/Xsession.d/45xsession file ?
thanks for help.
Regards,
Pablo
-
Only 4 times in 2 days ? That's just the very beginning ;-)
I think I had a count of my Knoppix Remasters at one time.
Then things get fuzzy and I wandered through the valleys of darkness for many days.
After-which... the clouds parted and the rain stopped...
An important part of the way 45xsession (which is the script that copies the files into the $HOME directory) works seems to be based on chmod g+s in the structure of any directories that need to be recursively copied. I think this is because the script runs with permissions of the staff user which is not a member of the users nor the root group.
So, when I wanted to change the default home directory... I would chmod -R 755 any directories I wanted to copy ( like .firefox ) and then chmod -R g+s those same directories.
Then in the file copy section of 45xsession I added similar lines to enrolado's script ( ie cp -R /etc/skel/.firefox $HOME 2>/dev/null ) That's about line 63 in /etc/X11/Xsession.d/45xsession
G
Similar Threads
-
By pf123 in forum General Support
Replies: 3
Last Post: 09-28-2004, 05:53 PM
-
By osaria in forum General Support
Replies: 3
Last Post: 09-09-2004, 05:54 PM
-
By spite in forum Customising & Remastering
Replies: 2
Last Post: 10-07-2003, 02:53 PM
-
By Ander in forum General Support
Replies: 2
Last Post: 06-26-2003, 10:54 PM
-
By Gandalf_Grey_ in forum Customising & Remastering
Replies: 2
Last Post: 01-23-2003, 02:44 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

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$318.99

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95

Seagate 3.5" Desktop HDD 3TB SATA III 6Gbps HDD 1ER166-510
$39.99

Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4
$39.00

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive
$14.99

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS
$184.99

Seagate ST1000VM002 1TB 5900RPM 3.5" SATA 6Gb/s HDD | PC DVR CCTV | | 1Y
$55.95