CrossOver Support - Community Forums

Important Information These are community forums and not official technical support. If you need official support: Contact Us

CrossOver Linux
Discussion about CrossOver Linux

The following comments are owned by whoever posted them. We are not responsible for them in any way.

Back to Threads Reply to Thread

Modify default bottle settings?

I think I've looked through most of the config files and script that come with Crossover, but still haven't been able to change one thing that annoy me - all bottles I create have the My Documents, My Pictures, My Music, and My Videos symlinked to directories in my Documents folder by default. Is there a way to modify this default behaviour?

Though I agree it's likely a reasonable default setup for most uses, personally I'd like to set it to work the other way around (link if it useful for a specific bottle).

Apologies if this has been asked before, search didn't want to tell.

Unfortunately not. The symlink creation is done by C code in shell32. It the Wine code its in dlls/shell32/shellpath.c, the function name is _SHCreateSymbolicLinks. There is a comment explaining the basic rules here http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/shell32/shellpath.c#l2564 .

I think CrossOver has some logic on top of it, like creating the Y:\ drive to point to $HOME. I haven't located the exact logic, but I don't think it's configurable. You can try to rebuild the Wine parts in CrossOver from source (see http://www.codeweavers.com/products/faq/source/, there's a download link to the crossover sources) and replace the shell32 library. I can't guarantee that this will work though.

Just to say that I would like it too if you guys exposed it in the interface somewhere. The symlink aren't always where I want them and manually modifying them is a bit anoying. I have thought about making a script, but my skills aren't there yet.

This (rather old) wine bug entry http://bugs.winehq.org/show_bug.cgi?id=10363 makes it sound like shell32 should be detecting a user's xdg directories and doing shell folder redirection, but I have never seen this behavior in Crossover - new bottles always create new "My" directories in ~/Documents if they don't already exist.

Crossover does however expose this setting in the GUI, though it needs to be set for each bottle. From the main crossover window, Tools -> Manage bottles -> select a bottle -> Control Panel -> Wine Configuration ->Desktop Integration.

Interesting, but I would rather have a central interface, not per bottle. Further, there is no choice for the "my games" folder which is kept in the documents folder, somehting I don't want.

J-P Simard wrote:

Interesting, but I would rather have a central interface, not per
bottle.

Here's a solution that works for me on Linux (I'm not sure whether I found that out myself or not, though). Create a file called "01.setup_folders" in the folder "$HOME/.cxoffice/scripts.d" and enter the following contents:


#!/bin/bash

function wine_link_directory
{
    if [ -e "$1" ]; then
        rm "$1"
    fi

    if [ ! -d "$1" ]; then
        ln -s -f "$2" "$1"
    fi
}

# setup special folders
BOTTLE_USER_DIR="$WINEPREFIX/drive_c/users/crossover"
WINE_DOCUMENTS_DIR="$HOME/Dokumente/wine"

wine_link_directory "$BOTTLE_USER_DIR/My Documents" "$WINE_DOCUMENTS_DIR"
wine_link_directory "$BOTTLE_USER_DIR/My Music" "$WINE_DOCUMENTS_DIR/Eigene Musik"
wine_link_directory "$BOTTLE_USER_DIR/My Pictures" "$WINE_DOCUMENTS_DIR/Eigene Bilder"
wine_link_directory "$BOTTLE_USER_DIR/My Videos" "$WINE_DOCUMENTS_DIR/Eigene Videos"

This will be run at creation time of every bottle and create symlinks in the folder "$HOME/Dokumente/wine" (which has to exist already). Adjust to your preferences and enjoy... :)

Thanks, great script!

Please Note: This Forum is for non-application specific questions relating to installation/configuration of CrossOver. All application-specific posts to this Forum will be moved to their appropriate Compatibility Center Forum.

CrossOver Forums: the place to discuss running Windows applications on Mac and Linux

CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi01LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzA4NjEzODE4LCJjc3JmX3Rva2VuIjoiTHczWXh4WnBXVkJGd2YyTCIsImdkcHIiOjB9