Controlling the Global User Directory: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
(Modernizing and adding in the portable.txt on linux information that passed us by! Removing the instructions for moving saves from old versions (important then but irrelevant now), and shortcut instructions (portable.txt was always better))
(Restructured the page to clearly separate each operating system, in order to prepare for adding information about Android. Also decreased the focus on past versions of Dolphin and editing the Windows registry.)
Line 1: Line 1:
The '''Global User Directory''' was brought to Windows in {{revision|3.5-2381}} and release {{revision|4.0}}. Now, like Linux and macOS before it, Windows builds have a central location where saves, settings, screenshots, themes, etc are kept. All builds will have the same settings and saves, and updating from one revision to another will be much easier.
The user directory is where Dolphin stores saves, settings, screenshots, and other data. Where the user directory is located depends on the Dolphin version, operating system, and your configuration. Some locations let the user directory be shared by different installations of Dolphin (a global user directory), and some locations are tied to a specific installation of Dolphin (a local user directory).


== Choose the Location of the Global User Directory ==
== Windows ==
===Windows===
Versions of Dolphin before {{revision|3.5-2381}} always used a local user directory, stored in the same folder as Dolphin.exe and named User. In {{revision|3.5-2381}}, the global user directory system was introduced on Windows. By default, the user directory is now a folder in Documents named Dolphin Emulator, but it's possible to configure Dolphin to use the old local user directory or a custom location.
*Open the registry. Simply type "regedit" in the search bar of the Start Menu and hit enter.
 
=== Disable the Global User Directory for a Specific Build with "portable.txt" ===
To make a build use a local user directory, create a text file named "portable" next to the executable files of the build. With the extension it should be named "portable.txt". Dolphin will check if that file exists in the same directory, then it will not use the global user directory, instead it will create and use the local user directory in the same directory.
 
=== Custom Command Line Path ===
If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the <tt>-u</tt> option:
 
<pre>C:\Path\To\Dolphin\Build\Dolphin.exe -u E:\Path\To\User\Directory\</pre>
 
Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use <tt>-u</tt> again.
 
=== Registry Configuration ===
The user directory behavior can be changed for all Dolphin installations at once using the registry. Editing the registry is an advanced topic and is not recommended for most users!
 
==== Choose the Location of the Global User Directory ====
*Open the registry. Type "regedit" in the search bar of the Start Menu and hit enter.
*Expand <var>HKEY_CURRENT_USER</var>.
*Expand <var>HKEY_CURRENT_USER</var>.
*Right click <var>Software</var> and select <var>New &gt; Key</var>. Name the key <kbd>Dolphin Emulator</kbd>.
*Right click <var>Software</var> and select <var>New &gt; Key</var>. Name the key <kbd>Dolphin Emulator</kbd>.
Line 9: Line 24:
*Double click the "UserConfigPath" value and an Edit String dialog appears. Under "Value Data", enter the path to the custom User directory. Make sure that the "User" folder is explicitly specified, since Dolphin will assume whatever path it is directed to is the <var>\User\</var> folder. If it is pointed to Desktop for example, the Desktop will be flooded with folders unnecessarily.
*Double click the "UserConfigPath" value and an Edit String dialog appears. Under "Value Data", enter the path to the custom User directory. Make sure that the "User" folder is explicitly specified, since Dolphin will assume whatever path it is directed to is the <var>\User\</var> folder. If it is pointed to Desktop for example, the Desktop will be flooded with folders unnecessarily.


=== Linux and macOS ===
==== Use Local User Directories ====
On Linux and macOS, the Global User Directory's location can be changed with the command:
*Open the registry. Type "regedit" in the search bar of the Start Menu and hit enter.
*Expand <var>HKEY_CURRENT_USER</var>.
*Right click <var>Software</var> and select <var>New > Key</var>. Name the key <kbd>Dolphin Emulator</kbd>.
*Right click the new <var>Dolphin Emulator</var> key, and select <var>New > String Value</var>. Name the value <kbd>LocalUserConfig</kbd>.
*Double click the "LocalUserConfig" value and an Edit String dialog appears. Under "Value Data", type the number <var>1</var>.
 
== Linux ==
By default, Dolphin uses a global user directory and follows the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG Base Directory Specification] for determining its location. If the directory <tt>~/.dolphin-emu</tt> exists, or you are using a version of Dolphin older than {{revision|4.0-8143}}, <tt>~/.dolphin-emu</tt> will be used as the location of the global user directory instead.


<pre>/path/to/dolphin/build/dolphin-emu -u /path/to/user/directory</pre>
=== Disable the Global User Directory for a Specific Build with "portable.txt" ===
In Dolphin {{revision|5.0-148}} and later, it's possible to use the same <tt>portable.txt</tt> method as on Windows to set a local user directory for a Dolphin build.


== Disable the Global User Directory for a Specific Build with "portable.txt" ==
To make a build use a local user directory, create a file named <tt>portable.txt</tt> in the same directory as the executable files of the build. Dolphin will check if that file exists in the same directory, then it will not use the global user directory, instead it will create and use the local user directory in the same directory.
To make a build use a local user directory, create a text file named "portable" next to the executable files of the build. With the extension it should be named "portable.txt". Dolphin will check if that file exists in the same directory, then it will not use the global user directory, instead it will create and use the local user directory in the same directory.


This will work on Windows and Linux (as of {{revision|5.0-148}}). macOS and Android are not supported for this method.
=== Custom Command Line Path ===
If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the <tt>-u</tt> option:


== Use Local User Directories on Windows ==
<pre>/path/to/dolphin/build/dolphin-emu -u /path/to/user/directory</pre>
The Global User Directory system can be disabled entirely with a registry key. The key is global, so it is a "once and for all" change.


When done editing the Windows Registry, and before launching Dolphin, be sure to move the <var>\User\</var> folder along with Dolphin executable files (or check if it's placed correctly). Otherwise, Dolphin will create a new one instead.
Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use <tt>-u</tt> again.


=== Manual Registry Editing ===
== macOS ==
*Open the registry. Simply type "regedit" in the search bar of the Start Menu and hit enter.
*Expand <var>HKEY_CURRENT_USER</var>.
*Right click <var>Software</var> and select <var>New > Key</var>. Name the key <kbd>Dolphin Emulator</kbd>.
*Right click the new <var>Dolphin Emulator</var> key, and select <var>New > String Value</var>. Name the value <kbd>LocalUserConfig</kbd>.
*Double click the "LocalUserConfig" value and an Edit String dialog appears. Under "Value Data", type the number <var>1</var>.


=== Automatic Process with .REG Files ===
By default, Dolphin uses a global user directory located at <tt>~/Library/Application Support/Dolphin</tt>.
These registry keys can be created and removed with .reg files to make the process easier.


To create the LocalUserConfig registry key, open notepad, paste the following in it and save it as a .reg file:
=== Custom Command Line Path ===
<pre>Windows Registry Editor Version 5.00
If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the <tt>-u</tt> option:
[HKEY_CURRENT_USER\Software\Dolphin Emulator]
"LocalUserConfig"="1"</pre>


To remove the LocalUserConfig registry key and revert back to the Global User Directory system, open notepad, paste the following in it and save it as a .reg file:
<pre>/path/to/dolphin/build/dolphin-emu -u /path/to/user/directory</pre>
<pre>Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Dolphin Emulator]
"LocalUserConfig"=-</pre>


The first key will set all Dolphin builds to use a Local User Directory, whereas the second will remove the Local User config and return to the Global User Directory system.
Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use <tt>-u</tt> again.


[[Category:Tutorials]]
[[Category:Tutorials]]

Revision as of 15:07, 30 October 2021

The user directory is where Dolphin stores saves, settings, screenshots, and other data. Where the user directory is located depends on the Dolphin version, operating system, and your configuration. Some locations let the user directory be shared by different installations of Dolphin (a global user directory), and some locations are tied to a specific installation of Dolphin (a local user directory).

Windows

Versions of Dolphin before 3.5-2381 always used a local user directory, stored in the same folder as Dolphin.exe and named User. In 3.5-2381, the global user directory system was introduced on Windows. By default, the user directory is now a folder in Documents named Dolphin Emulator, but it's possible to configure Dolphin to use the old local user directory or a custom location.

Disable the Global User Directory for a Specific Build with "portable.txt"

To make a build use a local user directory, create a text file named "portable" next to the executable files of the build. With the extension it should be named "portable.txt". Dolphin will check if that file exists in the same directory, then it will not use the global user directory, instead it will create and use the local user directory in the same directory.

Custom Command Line Path

If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the -u option:

C:\Path\To\Dolphin\Build\Dolphin.exe -u E:\Path\To\User\Directory\

Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use -u again.

Registry Configuration

The user directory behavior can be changed for all Dolphin installations at once using the registry. Editing the registry is an advanced topic and is not recommended for most users!

Choose the Location of the Global User Directory

  • Open the registry. Type "regedit" in the search bar of the Start Menu and hit enter.
  • Expand HKEY_CURRENT_USER.
  • Right click Software and select New > Key. Name the key Dolphin Emulator.
  • Right click the new Dolphin Emulator key, and select New > String Value. Name the value UserConfigPath.
  • Double click the "UserConfigPath" value and an Edit String dialog appears. Under "Value Data", enter the path to the custom User directory. Make sure that the "User" folder is explicitly specified, since Dolphin will assume whatever path it is directed to is the \User\ folder. If it is pointed to Desktop for example, the Desktop will be flooded with folders unnecessarily.

Use Local User Directories

  • Open the registry. Type "regedit" in the search bar of the Start Menu and hit enter.
  • Expand HKEY_CURRENT_USER.
  • Right click Software and select New > Key. Name the key Dolphin Emulator.
  • Right click the new Dolphin Emulator key, and select New > String Value. Name the value LocalUserConfig.
  • Double click the "LocalUserConfig" value and an Edit String dialog appears. Under "Value Data", type the number 1.

Linux

By default, Dolphin uses a global user directory and follows the XDG Base Directory Specification for determining its location. If the directory ~/.dolphin-emu exists, or you are using a version of Dolphin older than 4.0-8143, ~/.dolphin-emu will be used as the location of the global user directory instead.

Disable the Global User Directory for a Specific Build with "portable.txt"

In Dolphin 5.0-148 and later, it's possible to use the same portable.txt method as on Windows to set a local user directory for a Dolphin build.

To make a build use a local user directory, create a file named portable.txt in the same directory as the executable files of the build. Dolphin will check if that file exists in the same directory, then it will not use the global user directory, instead it will create and use the local user directory in the same directory.

Custom Command Line Path

If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the -u option:

/path/to/dolphin/build/dolphin-emu -u /path/to/user/directory

Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use -u again.

macOS

By default, Dolphin uses a global user directory located at ~/Library/Application Support/Dolphin.

Custom Command Line Path

If you are launching Dolphin from the command line, you can set a custom user directory path for the current session of Dolphin by using the -u option:

/path/to/dolphin/build/dolphin-emu -u /path/to/user/directory

Dolphin will use the regular user directory path again the next time you launch Dolphin, unless you use -u again.