+ Post New Thread
Results 1 to 7 of 7
Mac Thread, Desktop folder redirection in 10.5? in Technical; Hello again! We are experimenting with setting our 10.5.5 iMacs to run a 'localhomes' set-up. This means that when a ...
  1. #1

    Join Date
    Jan 2007
    Location
    The Console
    Posts
    236
    Thank Post
    22
    Thanked 29 Times in 23 Posts
    Rep Power
    22

    Desktop folder redirection in 10.5?

    Hello again!

    We are experimenting with setting our 10.5.5 iMacs to run a 'localhomes' set-up. This means that when a user logs in they are given a fresh home folder from a template, with links made to their documents on the network. A script performs the template copying and redirection on login. This works perfectly on our 10.4.11 machines, but under 10.5 the 'Desktop' folder will not redirect!

    I was looking at cache redirection on the forums here, and was thinking if there was a way to delete the /Users/%@/Desktop folder, and make it link to their Desktop on the network?

    Is there are variable like '%@' for user, for the home path?

    Thanks!

  2. #2
    torledo's Avatar
    Join Date
    Oct 2007
    Posts
    2,928
    Thank Post
    168
    Thanked 155 Times in 126 Posts
    Rep Power
    47
    Quote Originally Posted by iSteve View Post
    Hello again!

    We are experimenting with setting our 10.5.5 iMacs to run a 'localhomes' set-up. This means that when a user logs in they are given a fresh home folder from a template, with links made to their documents on the network. A script performs the template copying and redirection on login. This works perfectly on our 10.4.11 machines, but under 10.5 the 'Desktop' folder will not redirect!

    I was looking at cache redirection on the forums here, and was thinking if there was a way to delete the /Users/%@/Desktop folder, and make it link to their Desktop on the network?

    Is there are variable like '%@' for user, for the home path?

    Thanks!
    In osx, the tilde ~ character designates current users home folder. So you'd have ~/Desktop or ~/Documents. That's it. As far as i'm aware that will only work with the current logged on user but i see no reason why you can't use that in a script....although i'm not sure if it might be applescript or bash specific.

    btw, i'd be interested in seeing that script, if your happy to share. We want to setup something akin to manadatory profiles for network home folders on 10.4 and we want more granular control over things like access to the desktop for users - so that script sounds quite useful
    Last edited by torledo; 21st November 2008 at 02:05 PM.

  3. #3

    Join Date
    Jan 2007
    Location
    The Console
    Posts
    236
    Thank Post
    22
    Thanked 29 Times in 23 Posts
    Rep Power
    22
    Here's our script:

    Code:
    #!/bin/bash
    
    # Leopard Localhomes script July 2008
    
    homePath=`/bin/ls /Volumes/ | /usr/bin/grep "NetworkHomes\|year\|extra"`
    if [ "$homePath" ]; then
    
    ######## Softlink homefolder
    
            # Remove the dummy desktop if it's there
            /bin/rm -rf /Users/${USER}/Desktop
    
         # Check the Desktop folder exists then softlink
            if [ ! -d /Volumes/$homePath/$USER/Desktop ]; then
                    mkdir /Volumes/$homePath/$USER/Desktop
            fi
            /bin/ln -Fs /Volumes/$homePath/$USER/Desktop ~/Desktop
    
            # Check the Documents folder exists then softlink
            if [ ! -d /Volumes/$homePath/$USER/Documents ]; then
                    mkdir /Volumes/$homePath/$USER/Documents
            fi
            /bin/ln -fs /Volumes/$homePath/$USER/Documents ~/Documents
    
            # Check the Pictures folder exists then softlink
            if [ ! -d /Volumes/$homePath/$USER/Pictures ]; then
                    mkdir /Volumes/$homePath/$USER/Pictures
            fi
            /bin/ln -fs /Volumes/$homePath/$USER/Pictures ~/Pictures
    
            # Check the Music folder exists then softlink
            if [ ! -d /Volumes/$homePath/$USER/Music ]; then
                    mkdir /Volumes/$homePath/$USER/Music
            fi
            /bin/ln -fs /Volumes/$homePath/$USER/Music ~/Music
    
            /bin/rm ~/Library/Preferences/com.apple.sidebarlists.plist
            /bin/chmod a-w /Users/$USER
    
    ###### Create C13 SMHF subfolders
                   # Check we are in C13
                    if [ `hostname | grep C13` ]; then
                            # Check that the folder doesn't already exist
                        if [ ! -d /Save\ Movie\ Here\ First/${USER} ]; then
                        mkdir /Save\ Movie\ Here\ First/${USER}
                        chmod -R 770 /Save\ Movie\ Here\ First/${USER}
                        fi
                    fi
    
         
      # Restart Finder
      killall Finder
            
    # Inform User config is done
    osascript -e 'tell application "Finder"' -e 'display dialog "This Mac OS X Leopard Computer is now ready for you to enjoy" buttons {"OK"} default button 1' -e 'end tell'  
    else
            osascript -e 'tell application "Finder"' -e 'display dialog "Unable to connect to homefolder"' -e 'end tell'
    fi
    Linking to documents works, as does everything else. It just WON'T do the desktop! It leaves the user's local desktop folder in place like it's ignoring that part.

    We found Mike Bombich's scripts useful on his site, if that helps with your mandatory profiles set-up.

  4. #4

    Join Date
    Jun 2008
    Posts
    11
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I'm trying to do something very similar and have run into the same issue as you, unable to redirect the Desktop folder!

    Did you manage to fix the issue?

  5. #5

    Join Date
    Jan 2007
    Location
    The Console
    Posts
    236
    Thank Post
    22
    Thanked 29 Times in 23 Posts
    Rep Power
    22
    We didn't. In the end we ended up sticking with Network Home Folders (roaming profiles). The slowness which prompted me to try out this redirection was actually down to misconfigured DNS.

  6. #6

    Join Date
    Jun 2008
    Posts
    11
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I ended up sticking with Network Homes. I redirected most of the contents of the Library folder to the local drive using WGM. The performance increase is very noticable!

  7. #7

    Join Date
    Feb 2010
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    If you are using 10.5 Open Directory and it's subsequent Folder Redirection, you cannot create a redirection to force the user’s home, or a sub-folder, to an upstream or network location. These redirections take place before any mount points are available, so the redirection would fail.

SHARE:
+ Post New Thread

Similar Threads

  1. folder redirection
    By billbow1 in forum Wireless Networks
    Replies: 2
    Last Post: 18th January 2008, 11:21 AM
  2. Folder redirection
    By kerrymoralee9280 in forum Windows
    Replies: 3
    Last Post: 3rd August 2007, 09:30 AM
  3. Folder Redirection XP/2003
    By BKGarry in forum Windows
    Replies: 1
    Last Post: 27th February 2007, 04:14 PM
  4. Redirection of the Favourites Folder
    By wesleyw in forum How do you do....it?
    Replies: 2
    Last Post: 15th January 2006, 10:14 PM
  5. Folder redirection no desktop??
    By mullet_man in forum Wireless Networks
    Replies: 4
    Last Post: 6th December 2005, 10:34 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •