WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore: My Way (~/.local/bin)  (Read 7404 times)

Offline hjkl

  • Newbie
  • *
  • Posts: 23
TinyCore: My Way (~/.local/bin)
« on: December 13, 2008, 01:55:08 PM »
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!

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: TinyCore: My Way (~/.local/bin)
« Reply #1 on: December 13, 2008, 03:11:07 PM »
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.
« Last Edit: December 13, 2008, 03:13:33 PM by mikshaw »

Offline hjkl

  • Newbie
  • *
  • Posts: 23
Re: TinyCore: My Way (~/.local/bin)
« Reply #2 on: December 14, 2008, 12:19:25 AM »
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.

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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: TinyCore: My Way (~/.local/bin)
« Reply #3 on: January 18, 2009, 10:47:09 PM »
You can also create a myapps folder anywhere you'd like, and simply add the path to ~.profile
ie
Code: [Select]
PATH=$PATH:/mnt/hda3/myapps