How to Symlink the Desktop to Another Folder

I'm trying to symlink the desktop folder to another folder. To do that, I have to first delete the folder, but it immediately recreates itself.

Alternatively, I could set up a boot process to mount --bind the two folders, but I feel like the symbolic link should work, and don't want to wade out of my depth.

How can I link these two folders? Something special is going on with ~/Desktop that I don't understand. I'm using Cinnamon.

Add the --force argument to your link command.

ln -sf /new/desktop/folder ~/Desktop

The folder structure is part of xdg-user-dir, which maintains the folder structure based on your locale.

1 Like

Oddly, that command put a "new_desktop" symlink in ~/Desktop, rather than replace ~/Desktop.

However, xdg-user-dir was a good clue, and I modified ~/.config/user_dirs.dirs, editing the XDG_DESKTOP_DIR line to point to the other folder, and that achieved what I was trying to do.

Thanks!

2 Likes

After changing your desktop folder in ~/.config/user_dirs.dirs, now you can easily symlink any folder to ~/Desktop and then put "$HOME/Desktop" in ~/.config/user_dirs.dirs back again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by