Desktop folder location

I use the Desktop as my workspace - files, shortcuts, downloads etc. I also have a separate data drive for the things I back up.

By default the Desktop folder is kept on the OS drive, so when I do backups I have to do two steps - back up my data drive, THEN back up the Desktop folder. That way I have a backup of all the files I care about, and which I would need if I reinstalled an OS or my PC spontaneously combusted during an experiment with psychic manipulation of apparent reality.

Question: is there a way to tell Linux to use a folder on my data drive (which I could name Desktop) as the location for the Desktop? Then I'd only have one location to back up. I have a document of tweaks to make after installing an OS, so would just add the step of making that change as part of my setup in future.

Thanks!

I do not think it is possible.
@Aravisian might be able to confirm this?

Only solution I can think of is to have a Home partition on the data drive. I had such configuration when I was running Hackintosh for about 2 years, partly because of the instability for such system. But since Linux is rock solid, I dropped that habit and my Home directory including desktop sits on the OS drive.

1 Like

I think that this is the Strongest suggestion.
A symlinked folder would not back up properly.

2 Likes

So I guess my data drive would just have one extra root folder called Home, and I wouldn't see all the other folders.

However, it might make clean OS installs harder, because the other folders would include stuff I don't want to keep, relics of previous OS installs. Plus that is extra unnecessary data to backup - I think my non-Desktop Home folders currently include a few GB of unnecessary files, which would grow over time, and maybe lead me to having to empty them in between OS installs. In that sense maybe it is easier just to do two backup stages each time. Hmmm.

I had hoped it might be as simple a process as something like this Change Linux Desktop Location - Leo's Notes

(Though, of course, we found in previous queries that I can't edit that file in Zorin Gnome without it breaking other things - my hope would be that Xfce works better for tweaks like that).

No, you would see all the folders as normal.

Whenever I cook...
I clean as I go. How often is it that you have moments that you must wait for something as it cooks? Use that free moment to knock out some of the pans and dishes that pile up.
It is not unusual that by the time the food is all cooked, the kitchen is now clean, too.

This is one reason to do so, actually. It preserves your settings and configurations. It may need some clean up if you upgrade from Zorin OS 15 to Zorin OS 16... But the primary point is if a person backs up due to needing to reinstall the OS.

The problem is more complex by you wanting to change it to a different Drive. If doing this, you must mount that drive and have /Desktop as a partition on that drive.
The only other option would be to symlink it - which would only back up the symlinks, not the actual data, which be a spectacular failure.

2 Likes

Many thanks. Is it simple to change the location of the Home folder to be on my data drive? And is it the same process for all versions of Linux?

I think so.
Be sure to set this drive as Automount, so that you do not have to manually mount it at each system startup.

Yes.

2 Likes

I can give you my personal anecdote for that.
macOS also uses this symlink system like Linux.

One of our acquaintances (like all other musicians, a Mac user) gave us some photos on CD. He just copied all photo files he had on his desktop. When we read that CD, all we got was simlink files not the actual photos :frowning:

3 Likes

That's exactly what I do in my kitchen!

1 Like

Yep, my drive automounts, so I think I have it all set up correctly. It's the blue ext4 partition here:

With these mount options:

You are almost all set then :slight_smile:
To move the location of your Home to this drive...
I think I'd rather pass the baton to @Aravisian
I know my limit :sweat_smile:

2 Likes

I'm gonna pass it to @337harvey so I can log out of the forum and do other tasks. :wink:

2 Likes

Ha ha, have a good weekend all of you! I should add this isn't urgent, I'll come back to it next week some time. Or the week after. :slight_smile:

1 Like

Why not use Timeshift in your arsenal? This is the GNU/Linux equivalent of System Restore and works really well - it has saved m more than a couple of times. I set snapshots to be stored in the /home folder and use the rsync option when first running.

Personally, I would ensure all files in you /home folder are regularly backed up by ensuring you have pressed Ctrl+ H to show all hidden files and just create a folder on your data drive marked Zorin 16 and copy the entire contents of your /home folder there so you know which OS /home folder you have backed up.

I never bothered with System Restore. I have all my important personal data backed up so if ever the whole system somehow died I'd just reinstall the OS. All I care about is backing up my personal files, not any other part of the OS.

1 Like

Well, that's creating extra manual steps, which is what I'm trying to streamline/avoid. If the data I want backing up is on a single drive, I don't need to copy and paste anything - I just set the backup off for the whole drive (synchronisation then just copies new or changed files). So my priority is making sure all my data is on one drive (separate from the OS drive). Personal files, work, pictures, Thunderbird profile etc.

You can try a soft link to the home folder in the data drive, though you will have to read up on whether and how timeshift would treat a link (whether it would follow the link or ignore it. You can do it the other way as well, link a folder on your desktop to a directory on your data drive.

You need to decide what to call the link directory and whether there is one existing directory you are linking to in the data drive or creating a new one. Once decided you can accomplish this by opening terminal and creating the directory on your desktop that will be the link:

mkdir ~/Desktop/<name-of-link-dir>

ln -s ~/Desktop/<name-of-link-dir> /mnt/<where-the-data-drive-is-mounted>/<name-of-directory-to-link-to>

Now all the files are on the data drive but accessed and manipulated through the desktop directory linked to it.

2 Likes

Hi, I'm a bit confused by this. So this would mean my /Desktop would be physically stored on my data drive? E.g. (in Windows terms) instead of C:/users/Karl/Desktop it would be D:/Desktop?

Others suggested moving the whole home directory, not just the Desktop, so is this an alternative to that?

Cheers!

Be earnest with you, I'd rather avoid using symlinks myself. It can get quite complicated in a long run. For me, having an entire Home directory on the separate drive is a simpler solution.

For the back up, I have a large enough capacity external drive and copy whatever the file I changed/created on a daily bases (mirroring).

3 Likes