Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jakdominance

macrumors member
Original poster
Nov 18, 2008
35
0
Here's a challenge, I'm sure its been done before.

So I have a work space at home on my macbook, and I'd like it to be that my desktop shows a different folder (as opposed to always showing the /Users/JakD/Desktop/) such as /Users/JakD/Work/ for when I'm working, and maybe if its possible an easy shortcut, like using Automator.

I use my desktop for quickly pulling projects and such from the network at work and it gets muddled very quickly. I remember reading something about this looong ago, but i can't seem to find it on google.

It also has to work for SL.

Thanks in advance!:apple:
 

jakdominance

macrumors member
Original poster
Nov 18, 2008
35
0
Thank you, but I already use Spaces. I was talking about the actual files on the desktop, not the windows which I use. If I'm not mistaken, the files one the desktop don't change with the Space you are in.
 

devburke

Guest
Oct 16, 2008
1,190
0
Have you considered adding each folder you’d like to use as a stack? It’s not quite the same, but you’re only a single click away from a grid of all of the files for that folder, which is pretty close to being effective the same.
 

mysterytramp

macrumors 65816
Jul 17, 2008
1,334
4
Maryland
You might want to create multiple users for your machine. JakD Home and JakD Work.

Or you could create an "I'm Working" script that moves all your desktop files into an "I'm Not Working" folder and moves the files from the "I'm Working" folder to the desktop. Then vice versa.

mt
 

jakdominance

macrumors member
Original poster
Nov 18, 2008
35
0
Have you considered adding each folder you’d like to use as a stack? It’s not quite the same, but you’re only a single click away from a grid of all of the files for that folder, which is pretty close to being effective the same.

That, while not being what I am looking for, works pretty well. Thank you.

Or you could create an "I'm Working" script that moves all your desktop files into an "I'm Not Working" folder and moves the files from the "I'm Working" folder to the desktop. Then vice versa.

That could work very well. Thank you!


Despite these wonderful solutions, is there anyone who knows how the Desktop folder is connected to the actual desktop and/or how to connect the desktop to another folder? sounds like a fun hack, at any rate. ;)
 

Arcoooo

macrumors newbie
Oct 14, 2009
5
0
I Would also really love to know how you can link your desktop to another map.

I want to have my desktop on my external harddisk, so I have the same background on my notebook and my iMac!
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
This is doable, but you have to be very careful, and you cannot do this while logged in as the account to have its Desktop folder remapped. (This hack works for ANY folder in /Users/username, in fact). The safest way to do this is to log in as an alternate administrator user to do it - you can create one, if need be, from System Preferences.

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:
Code:
sudo bash
... at the prompt, and typing the password of the alternate admin when prompted. Note that your typing won't appear at all in the Terminal - this is done for security reasons.
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 katie as an example):
Code:
rm -r /Users/katie/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):
Code:
ln -s /Users/katie/Documents/Work /Users/katie/Desktop
Step 10: Exit the root shell by typing:
Code:
exit
... at the prompt.
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 katie.)
 

Arcoooo

macrumors newbie
Oct 14, 2009
5
0
Wow, thnx for the fast reactions.

Now there is only one thing I don't know wrldwzrd89:
Step 3: Log in as the alternative administrator.

I've only one account, is that a problem? How do I log in as the alternative administrator?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Wow, thnx for the fast reactions.

Now there is only one thing I don't know wrldwzrd89:


I've only one account, is that a problem? How do I log in as the alternative administrator?
You need to create a second account with computer administrator privileges. This is easily done from System Preferences. Go to Accounts, and click the little plus sign. Fill in the details, and make sure to check the box called "Allow user to administer this computer". Once that's done you can proceed. Feel free to delete the second account you created when you're all done - this is also done in System Preferences.
 

Arcoooo

macrumors newbie
Oct 14, 2009
5
0
I've done what you said, first deleted the directory Desktop, then created a new directory Desktop at the same place.
But then when I use the command: ln -s /Volumes/MOBILE-DISK/Desktop /Users/Arco/Desktop
Then there is made in the directory Deskop in Arco a (alias-)file with the name Desktop.
When I run this file, I go to the map /Volumes/MOBILE-DISK/Desktop
So the directory /Volumes/MOBILE-DISK/Desktop is not openend in /Users/Arco/Desktop

Is this correct? Or have I done something wrong?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
I've done what you said, first deleted the directory Desktop, then created a new directory Desktop at the same place.
But then when I use the command: ln -s /Volumes/MOBILE-DISK/Desktop /Users/Arco/Desktop
Then there is made in the directory Deskop in Arco a (alias-)file with the name Desktop.
When I run this file, I go to the map /Volumes/MOBILE-DISK/Desktop
So the directory /Volumes/MOBILE-DISK/Desktop is not openend in /Users/Arco/Desktop

Is this correct? Or have I done something wrong?
You're not supposed to create a Desktop folder in the same place you removed the old Desktop. You're supposed to create the linked folder, but ONLY if it doesn't already exist - i.e. the folder in /Volumes/MOBILE-DISK you want the desktop to be linked to.
 

Arcoooo

macrumors newbie
Oct 14, 2009
5
0
But how do I create a linked FOLDER? When I now use those commands it makes a linked FILE (an alias-file). So the content of the folder where is linked to is not displayed in the folder, only when i double click on the linked FILE, I get directed to the linked folder
(Mine folder where get linked to is: /Volumes/MOBILE-DISK/Desktop)
Or do I understand this all wrong? :eek:
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
But how do I create a linked FOLDER? When I now use those commands it makes a linked FILE (an alias-file). So the content of the folder where is linked to is not displayed in the folder, only when i double click on the linked FILE, I get directed to the linked folder
(Mine folder where get linked to is: /Volumes/MOBILE-DISK/Desktop)
Or do I understand this all wrong? :eek:
You're doing it right, you're just understanding how it works incorrectly. Essentially what you're doing is fooling the Mac OS into thinking your Desktop hasn't gone anywhere, when, in reality, you've moved it.
 

Arcoooo

macrumors newbie
Oct 14, 2009
5
0
Well, I think I van conclude that this is not going to work on the way I would like.
For now I will just copie all the files to my harddisk every time.
You all thanks for your reply's
And probably you will hear of me when I have a solution.
 

Angelo95210

macrumors 6502a
Jan 7, 2009
972
15
Paris, France
This is about touching the BSD structure of Mac OS. I wouldn't play with this .It's possible with Linux (and BSD as well probably which one Mac OS is based on), many softwares have not be planned for this (ie thrid party sftw)

Just my opinion though.
 

matthewturley

macrumors newbie
May 16, 2012
1
0
JakD

I 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

Now I can easily swap between two functioning desktops! Obviously, this could easily be configured to work for the OP's situation, assuming he's still looking for a solution 3 years later :)
 

Talal

macrumors newbie
Jun 26, 2013
1
0
Simple steps

I am a Windows user, just moved to Mac (luckily). Ok, suppose your user name is "Bob", and you want to change the location of your Desktop folder from "Users/Bob/Desktop" to "Users/Bob/Skydrive/Desktop". Here is how it worked with me:

1- click on the following application: "Terminal" (which is just like "command line" in Windows).

2- type: sudo rm -rf ~/Desktop/

3- entered your password (the password of your account on the mac)

4- type: ln -s ~/Skydrive/Desktop

Note that "~" is a shortcut used in our example to mean: "Users/Bob".
Hope this helps,
Talal
 

sjogro

macrumors newbie
Oct 18, 2011
2
0
Thanks @wrldwzrd89 ! I just moved the Desktop of my work computer to a folder within Dropbox so I'll have cloud access to current files. (Basically doing what iCloud desktop sync does on newer macOS)
 

jimmy0920

macrumors newbie
Jan 1, 2018
1
0
I got led to this thread trying to figure out my problem, thinking I could do something in the terminal and there are a lot of capable solutions here. I wanted to be able to synchronize my desktop folder on my older iMac with my desktop folder on the iCloud used by my MacBook (running MacOS Sierra). So what I ended up doing is creating an application with Automator. Using the following steps in the workflow (in the image below) and saving the application to the iCloud desktop folder, now all I have to do is run the workflow and it does what I wanted it to do.
Plus, you can also set it up to run at log in or schedule it through calendar.
upload_2018-1-1_8-2-55.png

UPDATE: After critiquing my solution, I now have the application to where it empties the trash after the process and it is now local on my iMac and set in the dock to avoid deleting files in the iCloud with my MacBook. This is the least complicated way that I have found that works.
 
Last edited:

sobo

macrumors newbie
Dec 23, 2019
1
0
Russia
This is doable, but you have to be very careful, and you cannot do this while logged in as the account to have its Desktop folder remapped. (This hack works for ANY folder in /Users/username, in fact). The safest way to do this is to log in as an alternate administrator user to do it - you can create one, if need be, from System Preferences.

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:
Code:
sudo bash
... at the prompt, and typing the password of the alternate admin when prompted. Note that your typing won't appear at all in the Terminal - this is done for security reasons.
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 katie as an example):
Code:
rm -r /Users/katie/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):
Code:
ln -s /Users/katie/Documents/Work /Users/katie/Desktop
Step 10: Exit the root shell by typing:
Code:
exit
... at the prompt.
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 katie.)

Thanks to @wrldwzrd89 this instruction worked great for years. But after updating to macOS Catalina it doesnt work anymore :( System first relink desktop folder to my custom folder but after some time Catalina recreates default Desktop folder and relink stops working.

Does anyone know how to make it work again?
 

Honza1

macrumors 6502a
Nov 30, 2013
933
433
US
Seems like something SaneDesk can do easily. http://www.sanedeskapp.com
I used it to keep various content of my desktop show/hidden. I suspect it has not been updated for some time, as far as I can say. It may be abandonware by now... But there may be similar apps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.