[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] reset-default-dekstops script

On Sat, 2005-01-29 at 10:27 -0800, Eric Harrison wrote:
> On Fri, 28 Jan 2005, Eric Harrison wrote:
> > On Sat, 29 Jan 2005, Sudev Barar wrote:
> >> On Fri, 2005-01-28 at 15:41 -0700, Joe Guenther wrote:
> >>> I noticed that the reset-default-desktop script does NOT copy the
> >>> /Desktop folder.  I have placed various icons on the desktop for my users.
> >>>  It does work to populate new users from the /etc/skel, but the script to
> >>> reset a particular user's desktop does not include the
> >>> /Desktop with its included icon files.
> >>> 
> >>> Can anyone give me instructions on how to tweak the script the Eric
> >>> Harrison has included so that this would work?
> >
> > This needs to be fixed. I'll get a new version out shortly.
> >
> I *think* I have the logic behind this correct:
> 1) remove all of the desktop config files (.gnome, .kde, etc)
> 2) copy over all the entries in /etc/skel IF they do not exist in the
>     user's home directory
> This will nuke the desktop settings, but won't have any side effects such
> as removing documents saved in ~/Desktop. All new files in /etc/skel are
> copied to the user's home if the user does not already have that specific
> file.

Minor thing; the "find" pushing files in the user's homedir would miss a
symlink. Maybe:

find . -xtype f -exec sh -c "[ -f $HOMEDIR/\"{}\" ] || cp -d \"{}\" $HOMEDIR/\"{}\" && chown --reference=$HOMEDIR $HOMEDIR/\"{}\"" \;

Dan Young <dan_young parkrose k12 or us>
Parkrose School District

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]