Change home folder without root access #68

Open
opened 2025-02-25 11:42:41 +01:00 by Benjamin_Loison · 6 comments

~/.bashrc is a workaround.

Would help on the server:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdA0V2wqgRdPGSH+7Q9g6WsfrwRaVA78MLkXonasI00Fy4w
cyfJwnGE4lO4+wYpbXrl+tJDApYw8xxusYpemvWja4jn8h82lb27H5cKImGHSHwb
0kcBIPMs4EM7VlPkqPDo6anYT0GVVJ+CF17hZ7/yqeQcj5pTPatCY/MjPXu8lJ5m
ItlB4ckn4tPZUnh9nAKNVMmemK4guOJ50A==
=78Cv
-----END PGP MESSAGE-----

+18

`~/.bashrc` is a workaround. <details> <summary>Would help on the server:</summary> ``` -----BEGIN PGP MESSAGE----- hF4DTQa9Wom5MBgSAQdA0V2wqgRdPGSH+7Q9g6WsfrwRaVA78MLkXonasI00Fy4w cyfJwnGE4lO4+wYpbXrl+tJDApYw8xxusYpemvWja4jn8h82lb27H5cKImGHSHwb 0kcBIPMs4EM7VlPkqPDo6anYT0GVVJ+CF17hZ7/yqeQcj5pTPatCY/MjPXu8lJ5m ItlB4ckn4tPZUnh9nAKNVMmemK4guOJ50A== =78Cv -----END PGP MESSAGE----- ``` </details> +18
Author
Owner
[Benjamin_Loison/bash/issues/25](https://codeberg.org/Benjamin_Loison/bash/issues/25) would help.
Author
Owner

Being able to redefine ~ would be nice.

Being able to redefine `~` would be nice.
Author
Owner
echo ~
/mnt/homes/@CENSORED/CENSORED/loison_benjamin-1000004
~=test
~=test: command not found
```bash echo ~ ``` ``` /mnt/homes/@CENSORED/CENSORED/loison_benjamin-1000004 ``` ``` ~=test ``` ``` ~=test: command not found ```
Author
Owner

https://wiki.lineageos.org/devices/FP4/build/#install-the-platform-tools

loison_benjamin@CENSORED-srv-02:~$ HOME=/scratch/loison_benjamin/
loison_benjamin@CENSORED-srv-02:/mnt/homes/@LH-CENSORED/61/loison_benjamin-1000004$ cd ~
loison_benjamin@CENSORED-srv-02:/scratch/loison_benjamin$
https://wiki.lineageos.org/devices/FP4/build/#install-the-platform-tools ``` loison_benjamin@CENSORED-srv-02:~$ HOME=/scratch/loison_benjamin/ loison_benjamin@CENSORED-srv-02:/mnt/homes/@LH-CENSORED/61/loison_benjamin-1000004$ cd ~ loison_benjamin@CENSORED-srv-02:/scratch/loison_benjamin$ ```
Author
Owner
~/.bashrc:
HOME=/scratch/`whoami`
cd $HOME

On SSH login:

loison_benjamin@CENSORED-srv-02:/scratch/loison_benjamin$ echo $HOME
/scratch/loison_benjamin

No trailing slash to avoid:

source ~/.profile
-bash: /scratch/loison_benjamin//.profile: No such file or directory
<details> <summary><code>~/.bashrc</code>:</summary> ```bash HOME=/scratch/`whoami` cd $HOME ``` </details> On SSH login: ```bash loison_benjamin@CENSORED-srv-02:/scratch/loison_benjamin$ echo $HOME ``` ``` /scratch/loison_benjamin ``` No trailing slash to avoid: ```bash source ~/.profile ``` ``` -bash: /scratch/loison_benjamin//.profile: No such file or directory ```
Author
Owner

Can we actually change the home folder without changing HOME variable?

Can we actually change the home folder without changing `HOME` variable?
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/linux#68
No description provided.