Re: How to change default umask in Stretch?
An update for the archives.
On Wed, 9 Aug 2017 08:09:16 -0400
Greg Wooledge <firstname.lastname@example.org> wrote:
> On Tue, Aug 08, 2017 at 01:27:02PM +0300, Reco wrote:
> > Or find gnome-session (or gnome-shell - I don't recall who exactly
> > spawns user applications in GNOME) process pid, execute something like
> > this on login:
> > gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch
> > You'll need gdb to be installed, of course.
> It's beginning to sound like GNOME applications aren't even launched
> by GNOME at all, but rather by systemd/dbus. Somehow.
Couple of experiments later, which involved strace, ltrace *and*
auditctl I confirm that GNOME applications are launched by dbus-daemon
indeed. Not 'system' one, but 'session' dbus-daemon.
If you do it via gnome-shell anyway.
> I'd be interested in hearing the results of your gdb experiment being
> performed on the user session dbus daemon process, by someone using
> GNOME. I have no idea whether it would actually work, but if it does,
> that would help us understand how this... desktop... is put together.
So, once I pinpointed spawning process, I poked it with gdb and it
changed the umask. So, correct hack for the umask in GNOME (as of
gdb -p $(pgrep -U $(id -u) -f '/usr/bin/dbus-daemon --fork') \
-ex 'p umask(0077)' --batch