I'm trying to permanently change where ALL the profile data is stored. I want all data to be on a USB drive where the output data is stored. (Note: I don't mean the downloaded output data, I've got that worked out)
I think what I am after is everything in the ".get_iplayer" folder, which is located by default (Linux) in in "/home/user/.get_iplayer" folder, which I want to change to "/home/user/Multimedia/.get_iplayer"
PLUS I would like anything else that GIP records and needs so I can re-install GIP and point to the data file folder on a USB drive.
I searched this issue and only found one reference, and tried various iterations such as:
get_iplayer --profile-dir "/home/user/Multimedia/.get_iplayer"
get_iplayer --prefs-add --profile-dir "/home/user/Multimedia/.get_iplayer"
But this only changed the "options" file within the ".get_iplayer" folder, PLUS the change is not persistant.
Any ideas? Thank you!
Jim
What you probably need to do is:
- Create the new directory to hold get_iplayer profile files on the USB stick
- Copy the contents of the current .get_iplayer profile directory to that new directory on the USB stick
- Add a preference to the options file in the original .get_iplayer profile folder setting the new profile directory
If you do that, I think get_iplayer will read the .get_iplayer profile options, see the new location for the profile directory on your USB stick and then use the options, .cache files and history files it finds there at the new location.
So when you move/reinstall, all you should need to do is add the USB stick profile directory using the command you already tried:
get_iplayer --prefs-add --profile-dir "/home/user/Multimedia/.get_iplayer"
Are you sure that's the right path to the USB stick? You mounted it in your home directory? If you can't find the path, just open it in the file explorer and hit ctrl+l (lower case L) and on most distros it'll show the direct path in the top bar of the window.
Probably the easiest way is to move the .get_iplayer folder where you want it to be, and then create a symbolic link from there to your home directory.
e.g. mv ~.get_iplayer /somewhere/.get_iplayer ; ln -s /somewhere/get_iplayer ~/
If you rebuilt your system or mounted your USB drive somewhere different you'd have to remake the symlink.
Jon
Hmmm.
My post above doesn't seem to work. Not sure exactly how/where the --profile-dir command is saved or read from. Using the command creates a new directory and options file, but it's not read from and nor does get_iplayer --prefs-add --profile-dir "/path/to/new/.get_iplayer" get saved to original options file location.
Jon's right that a symlink would work, but so should --profile-dir, if I've understood how it works properly
The --profile-dir option can't be saved in preferences, nor would that make sense (think about it for a moment). You can use the GETIPLAYERUSERPREFS environment variable in your shell to set the location of the profile directory.
Yeah, just reading the source as you commented.
This bit?
Might not be the correct analogy in this specific case, but lots of software chains config files, like Nginx with include statements for example. I figured get_iplayer would just read from the default config location and detect the equivalent of the 'include' statement and then use options found there to override those in default config location.
Nested configuration files would be overkill for get_iplayer. It would still require a one-time setup whenever you change the profile directory, and for the extremely small number of users who might want an alternate profile directory, I think it's better to do that with a generic mechanism. Of course, on Linux you also have the option of just creating shell aliases for get_iplayer with different values of --profile-dir, which may be even easier.
Thanks fior the info. I am new to this, btw.
To answer, my USB drive, which is NTFS if that makes any difference, is mounted at /home/user/Multimedia/
I can substitute the real path. Is that necessary?
Sounds to me like there is no way to simply change the default location of the /.get_iplayer folder. Right?
And the --profile-dir command ONLY changes the location of the OPTIONS and CACHE files withing that folder, not all the files in the folder, including the most important HISTORY file. And it does not persist reboot. Do I have it correctly?
So what do folks do who want multiple machines to share the profile data? Albeit one at a time.
Thanks again, Jim
Three ways of changing the location of your config files have been offered to you:
- move it and add a symlink
- set the GETIPLAYERUSERPREFS environment variable
- create an alias for 'get-iplayer --profile-dir=/home/user/Multimedia/'
- just add --profile-dir=/home/user/Multimedia/ every time you use gip
Yeah, I know. That's four bullets. But the last two are basically the same thing, which is my excuse for not being able to count.
It's logically impossible to put the location of the config file in the config file. Some software chains config files so that you can put (most of) the config somewhere else, but you *still* need a config file in the usual location. get-iplayer doesn't chain config files, nor is there a compelling case for doing so.
Incidentally, --profile-dir is supposed to move where gip looks for the options file, cache, history, pvr searches and presets (i.e. everything in the profile directory), but this only works if you provide it on the command line. If it does anything else it's probably a bug.
>So what do folks do who want multiple machines to share the profile data?
that would be unusual. But you've got some options. Pick one ;-)
Cheers
Jon