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

Re: Re: umask for GUI applications?

Hash: SHA1

On Tue, Nov 10, 2015 at 08:06:16PM +0200, Tapio Lehtonen wrote:
> > I'd expect this to be the job ow whatever session manager you are
> > afflicted with. For example, if you're "on" Gnome, I'd look into
> > .gnomerc; I don't know whether Freedesktop has come up with a common
> > theme for that.
> There seems to be no .gnomerc file anywhere.
> Display Manager is gdm3. Window manager (or is it session manager?) is
> Gnome.
> > 
> > For desktopless users (like me, Fvwm), the "classic" X session mechanism
> > applies, rooted in /etc/X11/Xsession.
> > 
> > Regards
> > - -- tomás
> /etc/X11/Xsession would affect all users. Unless there is some stuff
> there that executes a script from users home directory.

It's the root. I usually follow the breadcrumbs from there: typically
it sources things from the user directories. That's the mechanism to
allow per-user configuration. As an example, I want a per-user Xmodmap:
in /etc/X11/Xsession.d/80x11xmodmap (which didn't exist) I have:

  # 2015-01-10 tomas: why did they steal my xmodmap?
  # Snarfed from <http://forums.debian.net/viewtopic.php?t=77008>
  # This file is sourced by Xsession(5), not executed.
  if [ -x /usr/bin/X11/xmodmap ]; then
      if [ -f "$SYSMODMAP" ]; then
          xmodmap "$SYSMODMAP"
      if [ -f "$USRMODMAP" ]; then
          xmodmap "$USRMODMAP"

...the rest is in $HOME/.Xmodmap.

Debian ships those things partially disabled (as was the case with
Xmodmap), so I enable them in /etc first and put the relevant per-user
configuration bits in the user's home, of course.

This should work independently of the desktop, AFAIK. But I can't tell
from first-hand experience.

> I am still looking for a documented or supported way to make GUI
> applications use the umask I want.
> I have tested Libreoffice. When started from terminal window it honors
> the umask that is shown with umask -S in there. But started from the GUI
> menu it uses some other umask.

Yes, this is to be expected, since in the former case it inherits the
settings of the shell and in the latter case it inherits whatever the
X session/the desktop environment has.

- -- tomás
Version: GnuPG v1.4.12 (GNU/Linux)


Reply to: