TLDR: Can I pre-define a stow folder other than /usr/local with GNU Stow?

I do not have admin privileges on the machine I use for work, and I was told that I could use GNU Stow to manage my installations. The tool looks great, but everywhere in the documentation I read that stow uses /usr/local as the installation directory where it builds the symlink farm.

Unfortunately this folder was already populated by root, and I do not have write privileges on anything under /usr/local.

There is a flag -t that I can use in the command line to specify the target directory, but since I will always be using the same (I want my installations to consistently be under the same target directory), I was wondering if there is a way to use a default path of my choice.

  • 1
    Did you read the INSTALL file? What have you tried? I'd never even heard of GNU Stow before, but I found the various prefix options in less than 5 mins. – depquid Apr 13 '13 at 20:59
  • 1
    Thanks @depquid, the only thing I found is the command line flag --t that I can pass to stow to specify the target directory. I am looking for something that is a bit more persistent (perhaps an environment variable). From what I read, the STOW_DIR environment variable specifies the stow directoryand not the target directory. – Amelio Vazquez-Reina Apr 13 '13 at 23:07

You can configure a default target via the .stowrc file; please see this section of the manual. If there is a compelling reason for needing to also set the default target directory via an environment variable, I can implement that for the next release too.

  • 1
    It would actually be really nice to be able to use environment variables within the .stowrc. For example, I like to put my stow files in my home directory so it looks something like --dir=/my/home/stow. It would be nice to share this file between computers using something like --dir=$HOME/stow. – Ben Sidhom Mar 9 '14 at 5:40
  • 1
    Good idea; feel free to submit a bug. – Adam Spiers Mar 10 '14 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.