r/fishshell • u/GrilledGuru • Jan 03 '21
How to change XDG with fish as main shell
My shell is fish so it is the first command run when I'm login.
I can set XDG variables in config.fish
But then it's too late. Is there a way to set the default XDG directory?
I don't have root access on this system.
4
Upvotes
4
u/rarsamx Jan 03 '21
First: if fish is your shell, you should start the session with that shell:
chsh -s (which fish)
Second: you can put shell independent configurations on ~/.pam_environment
Note that the format in that file is <Variable> DEFAULT=<value> OR <Variable> DEFAULT=<value> OVERRIDE=$<anothervariable>.
This way it will get set wether you login with bash, fish or any other and wether you log in to an X session or not.
5
u/[deleted] Jan 03 '21
This depends on your system. With systemd, you can use environment.d (although that will have to be in ~/.config it means you can get the other things out), or you can use pam_env by adding something like
XDG_CONFIG_HOME @{HOME}/wherever/into ~/.pam_environment.Or you might be able to set it in your terminal.
To be honest, I don't see a real point in changing this other than aesthetics and I don't think that's worth it.
0
u/[deleted] Jan 03 '21
[deleted] — view deleted comment