BerryFarm / Term49

5 stars 1 forks source link

Make home directory persistent in /accounts/1000/shared/misc #4

Open vaskas opened 3 years ago

vaskas commented 3 years ago

(Thanks Hanno)

As a User I want the Term49 home directory to be in a shared location So that I can access it outside Term49 and between the re-installation of the app

vaskas commented 3 years ago

@karawitan what do you think?

karawitan commented 3 years ago

IMHO, we cannot change the home directory of a user via /etc/passwd, due to permissions:

lrwxr-xr-x   1 root      nto              17 Jan 01  1970 /etc/passwd -> /proc/boot/passwd
-rw-r--r--   1 root      nto           14395 Jan 01  1970 /proc/boot/passwd

But there is a simple workaround to this .. tuning the HOME variable is interesting in this regard:


$ echo $HOME
/accounts/1000/appdata/ca.mordak.Term48.gYABgJC2m1SvBDfQMWQBsIohLnw/data
$ export HOME=
$ export HOME=/tmp
$ cd
$ pwd
/tmp
karawitan commented 2 years ago

To add this feature, I'd suggest that, at first launch of Term49, we ask the user:

Once user has answered this question, put "HOME=; cd" inside the appropriate rc file.