Dushistov / sdcv

https://dushistov.github.io/sdcv/
GNU General Public License v2.0
294 stars 42 forks source link

Change location of $HOME/.stardict #41

Closed ghost closed 6 years ago

ghost commented 6 years ago

Is it possible to change the location of $HOME/.stardict to something else like, for example $HOME/.local/.stardict` ?

I tried setting the STARDICT_DATA_DIR, but that did not change the fact that sdcv created the .stardict dir (empty) on every run.

Dushistov commented 6 years ago

Is it possible to change the location of $HOME/.stardict to something else like, for example $HOME/.local/.stardict` ? I tried setting the STARDICT_DATA_DIR, but that did not change the fact that sdcv created the .stardict dir (empty) on every run.

You can look at man sdcv. There are two type of directories where sdcv search dictionaries, system's directotires (like /usr/share/stardict/dic) and user's directories (~/.stardict/dic). All options (STARDICT_DATA_DIR and --data-dir=) are used for changing path to system's directories, not path to user's dictionaries.

If you do not use system's dictories, you can run sdcv like this:

sdcv -x --data-dir=$HOME/.local/stardict
Dushistov commented 6 years ago

Or use symlinks

ghost commented 6 years ago

I did try the command you shared, and it still created an empty ~/.stardict folder! All i'm looking for is to not have such a dir created!

Dushistov commented 6 years ago

I did try the command you shared, and it still created an empty ~/.stardict folder! All i'm >looking for is to not have such a dir created!

$HOME/.stardict creation is not optional, but you can always set HOME variable to what you want:

HOME=$HOME/.local sdcv

after that you find that $HOME/.local/.stardict exists, but no $HOME/.stardict

ghost commented 6 years ago

Thx, this solved the problem for me!