| Author |
Message |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Tue 31 Jan 2012, 07:41 Post subject:
Standardise Temp dir for Puppy frugal (outside of savefile) |
|
Does anyone else thin it would be useful to have a standard temp dir for Puppy outside of the savefile
it is a annoying having to config the temp directory for every program,
may a solution would be to have PupTempDir option,
the default for an installed puppy could be
/mnt/home/tmp
what do people think?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Peterm321
Joined: 29 Jan 2009 Posts: 196
|
Posted: Wed 14 Mar 2012, 23:30 Post subject:
|
|
| darkcity wrote: | it is a annoying having to config the temp directory for every program,
may a solution would be to have PupTempDir option,
the default for an installed puppy could be
/mnt/home/tmp
what do people think?
|
Perhaps assigning env variable TMPDIR in /etc/rc.d/rc.sysinit , /etc/rc.d/rc.local or /etc/profile could do this? http://stackoverflow.com/questions/31068/how-do-i-find-the-temp-directory-in-linux
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Fri 16 Mar 2012, 09:21 Post subject:
|
|
That's sounds like a proper way to go
I wonder if Apps would pick up on that, maybe symlink the /tmp dir to /home/tmp
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Peterm321
Joined: 29 Jan 2009 Posts: 196
|
Posted: Sun 18 Mar 2012, 03:06 Post subject:
|
|
| darkcity wrote: | | I wonder if Apps would pick up on that, maybe symlink the /tmp dir to /home/tmp |
You could see if apps are still opening files in the /tmp directory by using a program like lsof, but if you really want to keep temporary files out of /tmp altogether you may have to change /tmp to a symlink as you suggest. Some programs have /tmp hardcoded. If you change /tmp to a symlink in the middle of a session there may be issues. Probably best to change /tmp, if in fact you decide to do so, at the start of a session and reboot to be on a safer side.
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Sun 18 Mar 2012, 06:54 Post subject:
|
|
I might try and change it before X win is loaded. Thanks for your help
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 4006 Location: Arizona, U.S.A.
|
Posted: Sun 18 Mar 2012, 21:26 Post subject:
|
|
I believe that /tmp is outside of the Save file.
Type "df" in rxvt and you`ll see the line:
| Code: | | tmpfs 553784 372 553412 1% /tmp |
If you put a file in /tmp and reboot it won`t be there.
This is good as /tmp is fast in ram, and the Save file`s slow being on a partition.
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Mon 19 Mar 2012, 11:55 Post subject:
|
|
The trouble is lots of programs put temporary files in /root/
which is inside the savefile - firefox is one example.
why don't use /tmp
---
what I'm trying to avoid is having to configure every program individually to use a location outside the savefile - also beginners won't know to do this.
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 4006 Location: Arizona, U.S.A.
|
Posted: Mon 19 Mar 2012, 22:47 Post subject:
|
|
Yep... And links don`t solve the slow Save access. This is a good example of poor programming and Linux`s legacy problems.
It`s a shame industry and the populace need to be told what to do. But obviously they can`t handle it on their own.
I`ve said many times that Linux files need to be organized into read-only and read-write directories.
And the read-write files divided into /tmp and /etc ( more or less...).
|
|
Back to top
|
|
 |
Peterm321
Joined: 29 Jan 2009 Posts: 196
|
Posted: Thu 22 Mar 2012, 05:12 Post subject:
|
|
| darkcity wrote: | The trouble is lots of programs put temporary files in /root/
which is inside the savefile - firefox is one example.
why don't use /tmp |
I have read that many programs are not writing to /root/ in terms of hardcoding but rather they are writing to the directory stored in environment variable $HOME Puppy Linux, being essentially a single user system defaults its $HOME to /root. But I think you may find that there is added to most puppy linuxes the "spot" user and there have been discussions in the murga forum about getting it to work with various apps with another home directory such as /mnt/home
http://www.murga-linux.com/puppy/viewtopic.php?search_id=45282452&t=71358
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Tue 29 May 2012, 09:09 Post subject:
|
|
Thanks for the information about Spot
Ideally the solution wouldn't require using a different user.
the problem is separating out what's stored in
/root or $home
ie configuration files, personal files, temp files, data (like bookmarks)
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Peterm321
Joined: 29 Jan 2009 Posts: 196
|
Posted: Tue 29 May 2012, 15:33 Post subject:
|
|
| darkcity wrote: | Ideally the solution wouldn't require using a different user.
the problem is separating out what's stored in
/root or $home
ie configuration files, personal files, temp files, data (like bookmarks)
|
Well IIRC Firefox (in reference to a pervious post of yours in this thread) uses the "$HOME/.mozilla/firefox" folder. I believe you can also change the profile with the eg "firefox-bin -profile <path>" commandline option.
Redefining $HOME will only affect the current shell and programs started from that shell. If you really want to kill all access to /root which I believe is in the savefile on systems that use a savefile, you can also consider the mount --bind command
| Code: | | mount --bind <old dir> <new dir> |
Example:
| Code: | cp -a /root /tmp
mount --bind /tmp/root /root
|
NB make a copy of your /root (standard $HOME) in your /tmp directory then remap /tmp/root to /root. The effect should be system wide if I read the documentation correctly. Any settings would be lost between reboots unless the settings were synced back to the original /root or $HOME directory.
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Wed 30 May 2012, 05:03 Post subject:
|
|
Thanks for reply, I haven't got time to fully look into at the moment.
The things I want configuration files and things that are part of Puppy in /root but temp and personal file out of it.
I know how to achieve this, however it wouldn't be obvious to a beginner.
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2686 Location: Kiel,Germany
|
Posted: Wed 30 May 2012, 16:20 Post subject:
|
|
There is a difference in frugal and full installations having a /tmp dir .
/tmp in frugal mode normally is mounted as tmpfs into RAM, full installs PUPMODE=2 have /tmp mounted on the HD .
just a few links about this theme :
Ubuntu: Want to mount tmpfs on /tmp
/tmp size fix
A big tmp with small memory
Do not delete /tmp/* at shutdown
As for Puppy Lupu-5 :
Lupu uses /sbin/pup_event_backend_modprobe_protect --daemon,
which is nice code, but waits for input via cat /tmp/pipe .
If that connection gets lost for a short time or even mounted read-only for a short time,
that daemon does not work anymore and was able to hang my PC forever waiting for input in /etc/rc.d/rc.sysinit .
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Wed 30 May 2012, 16:49 Post subject:
|
|
should programs use /tmp by default then?
what about media programs that have big files?
does swp come into it?
need to look into pupmodes more . . .
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2686 Location: Kiel,Germany
|
Posted: Wed 30 May 2012, 17:22 Post subject:
|
|
Yes it seems there is some confusion on using the term "/tmp" on Puppy .
There is a difference in /initrd/pup_rw as temporary main folder and the simple /tmp directory .
/initrd/pup_rw acts on flash PUPMODE=13 as tmp directory in RAM .
tmp in the meaning of temporary until flushed to the save file by /sbin/pup_event_frontend_d running /usr/sbin/snapmergepuppy
every minutes defined by
/usr/sbin/eventmanager with variables stored in /etc/eventmanger configuration file .
I post the of saluki-19 | Code: | | source /etc/rc.d/PUPSTATE && echo $PUPMODE | 12
as example :
tmpfs on /tmp type tmpfs (rw,relatime,size=1047368k)
shmfs on /dev/shm type tmpfs (rw,relatime,size=247096k)
The /init of initrd.gz and /etc/rc.s/rc.sysinit are responsible for calculating sizes .
free is showing
Mem: 1025304 total
Swap: 3164152 total
On PUPMODE=12 the save file is mounted as
/dev/loop1 on /initrd/pup_rw type ext4 (rw,noatime,user_xattr,barrier=1,data=ordered)
NOT temporary as on flash and writes like downloads go directly into the save-file and not to RAM first .
(shinobar has found a solution by directing seamonkey dl to some folder on partition by altering the seamonkey preferences i think)
|
|
Back to top
|
|
 |
|