Friday 22 September 2017

macos - Make another folder my desktop on Mac


I will be buying a new iMac soon but the price to upgrade the storage is horrendous. I started researching and figured out that I could simply buy an external SSD and then store everything onto that. As I was doing my research, I stumbled upon this question. Can I make an external folder my Desktop? In the meaning to have the Desktop folder on the external drive, and then anything I save onto the visible Desktop would be saved into the external SSD. Would that be possible and if so how? Differently, would I be able to move the actual desktop folder to an external drive?



Answer



As literally no one answered me, I tried to figure it out myself. It works like that:




  • Step 1: Make sure the folder to be relinked is empty of all content, except possibly for DS_Store files and other hidden files. This can be easily verified in the Finder.




  • Step 2: Make a backup! This is crucial, since if you mess up there isn't an undo button you can use.




  • Step 3: Log in as the alternative administrator. Do NOT use Fast User Switching to do this - you'll need to do a full log out and back in.




  • Step 4: Launch the Terminal.




  • Step 5: Become the root user, by typing: sudo bash




  • Step 6: Delete the folder to be relinked using the rm command with the -r switch, for recursive (using the desktop of a user with short name julo as an example): rm -r /Users/julo/Desktop




  • Step 7: If necessary, create the folder to link to, using mkdir.




  • Step 8: Link the folders (again using katie's Desktop, and the target a folder inside her Documents folder called Work): ln -s /Users/julo/Documents/Work /Users/julo/Desktop




  • Step 10: Exit the root shell by typing: exit



  • Step 11: Quit the Terminal.

  • Step 12: Log out of the alternate admin user.

  • Step 13: Log into the account that was changed, to verify that it worked. (In this example, I'd log in as julo.)


EDIT: Another option to do this is as follow:


know this thread's been dead a long time, but I think I found a reasonably good solution:


I started by swapping my ~/Desktop folder out with a symbolic link pointing to a folder on my external hard drive.


~/Desktop #symlink → /Volumes/[external drive]/Desktop

However, since I wanted my account to have a functioning desktop when the external drive was offline, I then created a second (local) Desktop within my ~/Library folder, along with a symbolic link like so:


~/Library/DesktopSwap/Desktop.offline #symlink → ~/Library/DesktopSwap/Desktop

Finally, I created a shell script and Finder service (via Automator Applescript), that swap out the two symlinks as follows:


~/Library/Scripts/swapDesktops.sh
#!/bin/bash
sudo mv ~/Desktop ~/Desktop.swap
sudo mv ~/Library/DesktopSwap/Desktop.offline ~/Desktop
sudo mv ~/Desktop.swap ~/Library/DesktopSwap/Desktop.offline
killAll Finder​

swap desktops [Finder service]


do shell script "~/Library/Scripts/swapDesktops.sh" with administrator privileges​

EDIT 2: Lastly, you can try with that: - click on the following application: "Terminal"




  • type: sudo rm -rf ~/Desktop/




  • entered your password (the password of your account on the mac)




  • type: ln -s ~/Skydrive/Desktop




Note that "~" is a shortcut used in our example to mean: "Users/Julo".


This worked. The source I found this at is here.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...