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

Re: Redirection of .dot files during NFS/NIS login from GNOME desktop



On Fri, 2005-08-19 at 13:35 -0400, Craig M. Houck wrote:
> We are using NIS/NFS to allow uses to login to a Debian desktop machine
> that connects them to there Sun Solaris work space. We would like to direct
> the many  .dot files that are written to be directed to a sub-directory to
> stop any interferance with pre-existing/duplicated files that are created
> during a 'regular' login via SSH to the users Sun account.
> 
> A partial list of the sort of .files I am talking about.
> .dmrc 
> .gnome2_private 
> .gstreamer-0.8 
> .gtkrc-1.2-gnome2 
> .metacity 
> .nautilus 
> Desktop 
> .thumbnails 
> .gnome 
> .recently-used 
> .gksu.lock 
> .xsession-errors 
> .gnome2 
> .gconf 
> .ICEauthority 
> .gconfd 
> .Xauthority 

In ~/.profile (or whatever profile your shell uses) I have checked
'uname' to determine what shell aliases I wanted to use on a particular
machine.  

You might want to check uname to create symlinks to your files.  Eg:

Set up your dotfiles like this:

mkdir ~/.sun.dotfiles ~/.debian.dotfiles
cp -a ~/.gnome2 ~/.sun.dotfiles
mv ~/.gnome2 ~/.debian.dotfiles


Then in /etc/profile (or wherever), do something like:

ostype=`uname`
if [ "$ostype" == "Linux" ]
then
	ln -sf ~/.debian.dotfiles/.gnome2 ~/.gnome2
else
	ln -sf ~/.sun.dotfiles/.gnome2 ~/.gnome2
fi

Because it is in /etc/profile, it should be sourced by all users.  I
haven't used the above in production, so test it thoroughly.  ;)  

A good script would also check if the symlink is pointing to the right
place already and not recreate it (I am thinking of opening multiple
xterms).  One way to do this is with a lockfile.

Jamie




Reply to: