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

Re: How to change default umask in Stretch?

On Mon, Aug 07, 2017 at 06:54:13PM +0200, Dejan Jocic wrote:
> Depends on terminal. If you use xterm under Gnome, it will respect umask
> settings, wherever those are, global or local in .profile or .bashrc.
> But gnome-terminal does not respect those settings. Guess that you
> should file bug against gnome.

Parts of this paragraph are not correct.

Putting a umask command in .bashrc would cause it to be run every time
you run a non-login bash shell, for example by opening an xterm, or a
new tab inside a gnome-terminal.  That particular instance of bash would
have the umask that you expect, because it's overriding the terminal's
umask due to the command it reads in .bashrc.

But the OP was trying to get gedit's umask to be different, and I'm
guessing (s)he's running gedit directly from GNOME, e.g. from some
kind of drop-down menu or hotkey, not by typing the gedit command in
a terminal.  Thus, gedit only inherits the umask from the window
manager (or whatever its parent is), not from any instance of bash.

To set umask of the window manager (or whatever), the instructions I gave
previously should work.  They do for *my* window manager.  But GNOME
may unilaterally decide to *change* the user's umask to whatever GNOME
decides is a correct value.  We've seen other unsolvable questions from
GNOME users here, e.g. one person was trying to set LC_* locale variables,
and GNOME just blew them away.  I don't believe we ever found an answer
for how to make it stop doing that.

Anyway, GNOME is a disaster, with the software assuming that it knows
better than you what you want, and with (apparently) no way to tell
it how to act differently.

Fortunately we have lots of other choices.

Reply to: