Changing the .bliss folder location

Another email in the inbox, this time from David Sweeney in the US:

David Sweeney
I'm a new bliss user and enjoying the product. Is there a way to direct where the .bliss folder is located? I would like to get it off my C drive and onto another hard drive in the computer.

This is possible, although it's a bit technical. You have to edit a file, depending on the way you start bliss. And, of course, it depends on the operating system you are using.

Windows

On Windows, the folder is by default stored inside the user's home folder, e.g C:\Users\david\.bliss on Windows Vista or later.

If you are starting bliss via the exe file (the default and what 99% of users do), you must change the bliss.l4j.ini file inside the bliss\bin folder. You'll see a list of lines starting "-D". Add one more line after them (and before the -XX lines) as so:

-Dbliss_working_directory="D:\path\to\folder"

Obviously, change D:\path\to\folder as you see fit. The .bliss folder will be created within the folder you specify (so don't specify D:\path\to\folder\.bliss because you'll end up with two .bliss folders).

I'd suggest taking a backup of the .ini file first. Also, you will have to edit it as an administrator. Remember to save it as a plain text file.

If you start via the batch file, before running the batch file issue the following command:

SET VMARGS=-Dbliss_working_directory="D:\path\to\folder"

Then run the batch file. You need to do this on every start, so you might want to write your own batch file to do it for you.

Mac OS X

The first thing to make clear is that bliss doesn't have a .bliss folder in OS X! This was changed in bliss version 20160304 to be in the more idiomatic location /Users/[username]/Library/Preferences/bliss.

The whole process is more complicated in OS X because of the way bliss is packaged. Specifically, because the app is code signed you cannot make changes to it. Instead, you must copy the app and then make changes.

So the first step is to make a copy of the bliss.app file. This is simple; if you haven't already, first drag the bliss.app file out of the bliss.dmg to a location of your choosing. Many people choose /Applications. Next, make a copy of the file. You could name it something like bliss-diff-folder.app. This copy can be located anywhere.

Now we can change the settings. A .app "application bundle" is actually a folder with a standardised layout inside (meaning the files and folders within have standardised names). It's possible to see these folders by right-clicking the app and selecting Show package contents. You can also use the command line in Terminal. Once you can see the contents, you need to locate bliss-diff-folder.app/Contents/Info.plist. Open Info.plist in your favourite text editor. You should be able to find a section that looks like:

...[more settings]
<string>-Dbliss.bootstrapbundle.initialbundledir=$APP_ROOT/Contents/Resources/bliss-bundle</string>
...[yet more settings]

We need to add the same parameter as we did on Windows, on a new line:

...[more settings]
<string>-Dbliss.bootstrapbundle.initialbundledir=$APP_ROOT/Contents/Resources/bliss-bundle</string>
<string>-Dbliss_working_directory=/path/to/folder</string>
...[yet more settings]

Save the file, and restart bliss from the copied bliss-diff-folder.app file (or whatever you called it). bliss should start and will store its data in the path you specified.

Linux

The default location for the .bliss folder in Linux is, again, in the user's home folder. For example: /home/david/.bliss.

To change this, override the VMARGS environment variable before starting bliss. For example:

export VMARGS=-Dbliss_working_directory=/path/to/folder
./bliss.sh

That needs to be done every time bliss is started. To automate this, either set the variable in your .bashrc file, or change the bliss.sh file to set the VMARGS in there.


Hopefully that will help if you ever need to move your .bliss folder!

tags: technical

The Music Library Management blog

Dan Gravell

I'm Dan, the founder and programmer of bliss. I write bliss to solve my own problems with my digital music collection.