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

Re: Gnome+Nautilus umask



Le vendredi 17 février 2006 à 23:57 +0100, Jérôme Warnier a écrit :
> Le vendredi 17 février 2006 à 16:15 +0100, Sereg Tibor a écrit :
> > Dear Jérôme,
> > 
> > 
> >   today I have the same problem as you described it in your mail:
> >   http://lists.debian.org/debian-gtk-gnome/2004/09/msg00007.html
> > 
> >   I cannot find any solutions on the web yet. I hope you can help me, 
> > have you found any solution or workaround since your mail?
> I think that my problem, in the end, was that I commented the existing
> line and added a line under with the right value, like this:
> #UMASK=022
> UMASK=002
> 
> And, due to a bad bug, the second line was never read.
> I thought I had submitted a bug already in the BTS, but I cannot find it
> anymore. I should maybe do it, but I'd have to verify that the bug is
> still present, if you can do it, go ahead.
> 
> I also submitted #254840, which is certainly related.
It seems that I wrote the attached file (55umask) and put it
in /etc/X11/Xsession.d/ and that it solved my problem in the end.

> Now, I wonder if libpam-umask could not help in some related matters.
> 
> Hope it helps
> 
> > WBR and many thanks,
> > Tibor Sereg
# In the script that called this, set -e has been set. Errors in any
# command will abort the entire script and X won't start. By putting
# this part in a subshell, any errors will abort the subshell - which
# we want, in case numlockx fails.

# The 'true' at the end ensures that the entire script will never end
# with an error code, even if there was an error.

# Ariel Shkedi <asdebian@dsgml.com>

# Most of this script has been borrowed from old /etc/gdm/Sessions/Gnome
# by me, Jerome Warnier <jwarnier@beeznest.net>
# Will be extended later to copy completely the old Session script

logindefsfile=/etc/login.defs

(

haveloginoption() {
  optionname=$1
  echo "$0: checking $logindefsfile for option $optionname" >&2
  grep -qs ^$optionname $logindefsfile
}

loginoptionvalue() {
  optionname=$1
  optionvalue=`awk "\\$1 == \"$optionname\" { print \\$2 }" $logindefsfile`
  echo "$0: $logindefsfile: \"$1\" is \"$optionvalue\"" >&2
  echo $optionvalue
}

# Get defaults from /etc/login.defs
if haveloginoption UMASK; then
  umask `loginoptionvalue UMASK`
  echo `umask` # This line is for debugging purpose only
fi

)

true

Reply to: