Thread: How to install application data directory in ~
hi,
i'm trying write application makes use of number of files stored in application data directory. @ moment i've put data directory in ~/.myapp/$user.default/data
things if application installed dpkg -i, need superuser privilege need
$ sudo dpkg -i ......
problem once use sudo, $user becomes root , $home becomes /home/root, not /home/user application in once running.
i've gone through of earlier posts , there 1 quite similar guess i'm new linux figure out solution replies. saw refer xdg_data_home when i
$echo $xdg_data_home
blank , further, won't user name change root once use sudo?
please help. problem has held work quite time.
in advance.
the usual approach following:
1. install application data going used application regardless of user is. when program installed system-wide, data goes either /etc or /var, depending on (configuration files or cache-like stuff, respectively).
2. data that's user-specific generated somehow when program's started first time user. if data small, can insert default settings in source code itself... if it's long, usual approach have default system-wide version @ /etc that's copied ~ , things set way local version overrides system-wide 1 (e.g. /etc/bashrc vs. ~/.bashrc).
way, solve issues mentioned.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] How to install application data directory in ~
Ubuntu
Comments
Post a Comment