Changing the folder the desktop shows - How?

Discussion in 'macOS' started by jakdominance, Sep 30, 2009.

  1. jakdominance macrumors member

    jakdominance

    Joined:
    Nov 18, 2008
    #1
    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:
     
  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
  3. jakdominance thread starter macrumors member

    jakdominance

    Joined:
    Nov 18, 2008
    #3
    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.
     
  4. devburke Guest

    Joined:
    Oct 16, 2008
    #4
    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.
     
  5. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #5
    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
     
  6. jakdominance thread starter macrumors member

    jakdominance

    Joined:
    Nov 18, 2008
    #6
    That, while not being what I am looking for, works pretty well. Thank you.

    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. ;)
     
  7. Arcoooo macrumors newbie

    Joined:
    Oct 14, 2009
    #7
    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!
     
  8. coolbits macrumors member

    Joined:
    Nov 1, 2006
    #8
  9. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #9
    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.)
     
  10. Arcoooo macrumors newbie

    Joined:
    Oct 14, 2009
    #10
    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?
     
  11. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #11
    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.
     
  12. Arcoooo macrumors newbie

    Joined:
    Oct 14, 2009
    #12
    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?
     
  13. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #13
    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.
     
  14. Arcoooo macrumors newbie

    Joined:
    Oct 14, 2009
    #14
    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:
     
  15. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #15
    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.
     
  16. Arcoooo macrumors newbie

    Joined:
    Oct 14, 2009
    #16
    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.
     
  17. Angelo95210 macrumors 6502a

    Angelo95210

    Joined:
    Jan 7, 2009
    Location:
    Paris, France
    #17
    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.
     
  18. matthewturley macrumors newbie

    Joined:
    May 16, 2012
    #18
    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 :)
     
  19. Talal macrumors newbie

    Joined:
    Jun 26, 2013
    #19
    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
     

Share This Page