0

How can I specify the home directory in Ubuntu, like I can specify %APPDATA% in Windows? I know about $HOME, but that doesn't seem to work when I try changing the default GNOME screenshot save location on Ubuntu 20.10 using dconf Editor. Any help would be greatly appreciated :D

Edit: Also, when I change settings in dconf Editor, are they changed at the root level for everyone or just for me?

  • Home is also ~ or ~/ run ls ~ and see. – Raffa Jan 26 '21 at 15:41
  • ~/ is usually the way to specify the users home directory, so you may be able to use that or ~/Documents etc if you want a subdir of the users home. You may need to logoff/logon again for it to take effect, I am not 100% sure. – codlord Jan 26 '21 at 15:45

1 Answers1

0

Both "$HOME" and ~ point to the current user's home folder, but technically, they are different things. While these will work in the terminal and in scripts, your graphical application may or may not interpret these in the same way. In dconf-editor, "$HOME" may work to retrieve the full path to your home directory if the application using the information interprets it. In your case, where you change settings for Gnome Screenshot, it will work. But again: this is not universal, so if one day you find it doesn't, try ~, or else you may need to spell out the full path.

vanadium
  • 88,010
  • It's the same with Windows. Environment variables substitutions like %APPDATA% are guaranteed to work on command line, but not necessarily when you specify a path within some applications. The application may or may not interpret it correctly. – raj Jan 26 '21 at 16:29