You are not logged in.
Hi!
How can I change the default working directory of an application in my home directory?
As default all these user based files by an applications usually sit in hidden folders in my home directory.
But still some applications clutter my home directory with non-hidden folders for storing the user specific files
like in "~/<Application Name>/".
Now how can I change this path to ~/.experiments/.<application-name>?
Thanks for help,
p.
Offline
Which applications are you trying to change?
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
In many/most cases, this would need to be changed upstream.
Offline
No guarantees, but you might try running the program while passing in a new value for HOME. It might work, it might fail epically
like this
ewaller@turing/home/ewaller % ls
bin doc Drive flotsam latex multimedia simulations test.py virtualization
devel Downloads Dropbox hp48 mnt Music Sync venv x48
ewaller@turing/home/ewaller % cat test.py
#! /usr/bin/python
import os
print ("HOME is %s"%os.environ['HOME'])
f1=open("%s/testFile"%os.environ['HOME'], 'w+')
print ("Hello World",file=f1)
ewaller@turing/home/ewaller % ./test.py
HOME is /home/ewaller
ewaller@turing/home/ewaller % ls
bin doc Drive flotsam latex multimedia simulations testFile venv x48
devel Downloads Dropbox hp48 mnt Music Sync test.py virtualization
ewaller@turing/home/ewaller % rm testFile
ewaller@turing/home/ewaller % mkdir test
ewaller@turing/home/ewaller % HOME=test ./test.py
HOME is test
ewaller@turing/home/ewaller % ls test
testFile
ewaller@turing/home/ewaller %
Last edited by ewaller (2016-05-13 16:19:31)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Online
libetc comes close to what you want, but it is marked as "unmaintained." rewritefs is suggested as an alternative.
(edit) after re-reading your first post several times, I think libetc isn't really what you want. I apologize for the noise.
Last edited by 2ManyDogs (2016-05-13 19:16:36)
Offline
This is sometimes a configurable option e.g. in my cower config, I can specify TargetDir, in makepkg.conf I can set PKGDEST etc.
Give one or two actual examples, rather than a generic question about application-name.
Offline
I would be surprised if applications are creating non-hidden directories in $HOME: that sounds like a bug.
For hidden dirs, see https://github.com/grawity/dotfiles/blo … iles.notes
Offline
Well, thx for all your comments.
I was not aware that this isn't a general setting. There should be imho. Otherwise how are you able to organize your home directory the way you want. Maybe you want to have all the application settings for private programs bundled in a folder ".private-stuff" for convenient backup and migration or easy cleanup if you move to another box.
This problem has been valid with a few which I do not remember all. The last one has been "arena-tracker" as installed from the AUR. This is an enhancement to Blizzards hearthstone and installs a folder ~/Arena Tracker.
I reported this to the subreddit cause I think this should be considered as a bug as well:
https://www.reddit.com/r/ArenaTracker/c … _in_linux/
thx again,
p.
Offline