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...
![]()
![]()
![]()
![]()
I remastered koppix more than 4 times in 2 days![]()
![]()
![]()
![]()
![]()
![]()
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 ( I change the line
toCode:\cp /etc/skel/{.kde*,Desktop} $HOME/
in /etc/X11/Xsesson.d/45sessonCode:\cp /etc/skel/{.kde*,Desktop,.m*,.x*,.n*} $HOME/
but I still get th default settings
Any help pleaaaaseee![]()
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...
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)
First things first:Originally Posted by MrAhmad
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 /opt3) create the init script to copy the filesCode:mkdir /opt/startup_scripts4) copy_home_files contentCode:touch /etc/init.d/copy_home_files
5) Now lets make the actual scriptCode:#!/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 06) startup.sh contentCode:touch /opt/startup_scripts/startup.sh
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/startupyou get the picture... (this is my actual script!)
7) and finally, we add the startup script to the boot process by
THERE!!! Now when your system (on the cd) boots, your files should be copied from /opt/WHATEVER_FILES to /home/USER/...Code:update-rc copy_home_files defaults > /dev/null
Good luck!
enrolado
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.
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.)
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.Originally Posted by MrAhmad
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
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

$4.00
Qty 20 New Cisco QSFP-100G-FR-W2 10-3659-01 Module Hologram Brand New 20 Pack
$260.00
Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99
Cisco SFP-10G-SR-S Transceiver Module 10-3105-01
$100.00
Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA
$28.94
SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT
$7.99
HP 669279-001 560SFP+ Ethernet 10Gb 2-Port Network Adapter Card W/SFPx2 -Both
$14.99
Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver
$5.40
30PCS Sealed Cisco SFP-10G-SR 10GBASE-SR SFP+ Transceiver Module MMF 850nm 300m
$499.99
Lot of 20 Dell FTLX8571D3BCL-FC 10 Gigabit SFP+ Transceiver 10GBase-SR 0WTRD1
$59.95