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 ...
-
21st November 2008, 12:40 PM #1 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!
-
-
IDG Tech News
-
21st November 2008, 03:01 PM #2 
Originally Posted by
iSteve
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 03:05 PM.
-
-
21st November 2008, 03:50 PM #3 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.
-
-
1st July 2009, 04:16 PM #4
- 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?
-
-
3rd July 2009, 04:24 PM #5 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.
-
-
3rd July 2009, 08:31 PM #6
- 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!
-
-
16th February 2010, 04:36 PM #7
- 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:
Similar Threads
-
By billbow1 in forum Networks
Replies: 2
Last Post: 18th January 2008, 12:21 PM
-
By kerrymoralee9280 in forum Windows
Replies: 3
Last Post: 3rd August 2007, 09:30 AM
-
By BKGarry in forum Windows
Replies: 1
Last Post: 27th February 2007, 05:14 PM
-
By wesleyw in forum How do you do....it?
Replies: 2
Last Post: 15th January 2006, 11:14 PM
-
By mullet_man in forum Networks
Replies: 4
Last Post: 6th December 2005, 11: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
-
Forum Rules