Tiny Core Base > TCB Tips & Tricks

TinyCore: My Way (~/.local/bin)

(1/1)

hjkl:
TinyCore uses "/home/tc/.local/bin" for PATH if the directory is in 'tinycore.gz'.
Since it's very easy for me to put my executables in that directory and use them,
I want my ".local/bin" to be available when I start TinyCore.
In order to do that, I change 'tinycore.gz'.

e8120aa61e855b59ec642dfef767e19f  tinycore_1.0rc3.iso

'tinycore.gz' dir = /mnt/sda1/tc/

First, I unpack 'tinycore.gz' in a new directory, tcfs.
 root@box[/home/tc]# mkdir tcfs
 root@box[/home/tc]# cd tcfs
 root@box[/home/tc/tcfs]# gunzip -c /mnt/sda1/tc/tinycore.gz | cpio -idm
 root@box[/home/tc/tcfs]# exit

Second, I create ".local/bin".
 root@box[/home/tc]# mkdir -p tcfs/etc/skel/.local/bin
 root@box[/home/tc]# chown -R tc tcfs/etc/skel/.local
 root@box[/home/tc]# chgrp -R staff tcfs/etc/skel/.local
 root@box[/home/tc]# exit

Third, I repack 'tinycore.gz' and save it.
 root@box[/home/tc]# cd tcfs
 root@box[/home/tc/tcfs]# find . | cpio -o -H newc | gzip -9 > ../tinycore.gz
 root@box[/home/tc/tcfs]# cd -
 root@box[/home/tc]# cp tinycore.gz /mnt/sda1/tc
 root@box[/home/tc]# exit

Done!

mikshaw:
anything within /home/tc can also be kept without remastering tinycore.gz.  You can use a persistent home (boot option home=something), or use backup/restore to save files that are created in /home/tc.  Either option will create the .local/bin directory if the desired files have been put there.

The /home/tc/.local/bin directory is added to your PATH variable only after the system has completely loaded, so there is no need to have that directory in the base system if you use one of the above methods.

hjkl:
Hi mikshaw,


--- Quote ---You can use a persistent home (boot option home=something), or use backup/restore to save files that are created in /home/tc.  Either option will create the .local/bin directory if the desired files have been put there.
--- End quote ---

You are right.  I agree with you.
Also, my writing could be misleading to new TinyCore users because
creating empty "~/.local/bin" alone doesn't do much.
My point is that I usually save my quick executables and my files on "my way" and
leave 'boot options' and 'backup system' untouched.

Thank you for the reply.

jpeters:
You can also create a myapps folder anywhere you'd like, and simply add the path to ~.profile
ie
--- Code: --- PATH=$PATH:/mnt/hda3/myapps
--- End code ---

Navigation

[0] Message Index

Go to full version