umask in ubuntu

Carlos Escutia Chávez carlosescutia at gmail.com
Fri Nov 26 15:21:29 UTC 2004


~/.gnomerc is called by /etc/X11/Xsession.d/55gnome-session_gnomerc.
So, if you want system-wide umask for gnome users, add your umask 002
line at the end of this file. Mine looks like this:

------------------------------------------------------------------------------------------------------------------------
carlos at portatil ~ $ cat /etc/X11/Xsession.d/55gnome-session_gnomerc

# If we are running the GNOME session, source ~/.gnomerc

if [ `basename "$STARTUP"` = gnome-session -o \
        \( `basename "$STARTUP"` = x-session-manager -a \
        `readlink /etc/alternatives/x-session-manager` = \
                /usr/bin/gnome-session \) ]; then
  GNOMERC=$HOME/.gnomerc
  if [ -r "$GNOMERC" ]; then
    . "$GNOMERC"
  fi
fi

umask 002

------------------------------------------------------------------------------------------------------------------------

DISCLAIMER: I don't know if this is the _RIGHT_ way to change default
umasks in gnome, but at least it works ;-)


Regards


On Wed, 24 Nov 2004 19:25:25 +0100, agenteo <mailinglist at agenteo.it> wrote:
> Carlos Escutia Chávez wrote:
> 
> 
> 
> >I had a VERY hard time at getting a custom umask working with gnome
> >(many weeks). Just create a file named ~/.gnomerc which contains:
> >
> >umask 002
> >
> >save, logout / login and that's it.
> >
> >
> >Regards.
> >
> >
> >On Tue, 23 Nov 2004 17:31:22 +0100, agenteo <mailinglist at agenteo.it> wrote:
> >
> >
> >>Hi,
> >>I've tried to change the umask in ubuntu to create files with a
> >>different set of permissions (umask 002).
> >>So I've searched in .bash_profile
> >>Where I've founded this:
> >># ~/.bash_profile: executed by bash(1) for login shells.
> >># see /usr/share/doc/bash/examples/startup-files for examples.
> >># the files are located in the bash-doc package.
> >>
> >># the default umask is set in /etc/login.defs
> >>#umask 022
> >>
> >>So I was assuming to change the umask in /etc/login.defs
> >>Actually I didn't understant if the login package is used even by the
> >>Gnome Display Manager to log in the user, is it? I guess it's not cause
> >>changing umask there does nothing....
> >>
> >>I've solved changing umask in /etc/bash.bashrc
> >>Or better now every file created from a shell have the new umask. But
> >>files created from programs like OpenOffice.org and other in GUI (like
> >>GIMP) doesn't!
> >>
> >>Is this normal? How can I handle it?
> >>
> >>Thanks in advance,
> >>Enrico
> >>
> >>--
> >>ubuntu-users mailing list
> >>ubuntu-users at lists.ubuntu.com
> >>http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >>
> >>
> >>
> >
> >
> >
> >
> Thanks, really cool :-)
> Is it possible to set it for all the system users?
> Enrico
> 


-- 
007 - License to... write, read, execute




More information about the ubuntu-users mailing list