[gdm-list] Per-user session scripts for GDM defaults?



Terve!

I use a very simple script to compress and decompress my Firefox profiles
to a small, 64 MB tmpfs ram disk, every time I log in or out.
This works wonderfully, especially on minilaptops with slow flash drives
(like my Acer A110L).

Currently, I add

  if [ -n "$HOME" ] && [ -n "$USER" ] && [ -d "$HOME/.session/" ]; then
    for script in "$HOME/.session"/* ; do
      if [ -f "$script" ]; then
        /bin/su -l "$USER" "$script" postlogin
      fi
    done
  fi

to /etc/gdm/PostLogin/Default, and
to /etc/gdm/PreSession/Default with postlogin changed to presession, and
to /etc/gdm/PostSession/Default with postlogin changed to postsession.

The Firefox session script I use is downloadable at
	http://www.iki.fi/~joorava/firefox-profiles

Essentially, the scriptlet runs any scripts in $HOME/.session/
as the user, with a parameter describing the phase (postlogin, presession,
or postsession). This seems to work quite reliably and without problems.

However, I'm up shit creek with a lousy paddle every time I update GDM.

More often than not, I need to compare the distribution-updated Defaults
to my own, and decide if there was any sensible changes.
If I just accept the new Defaults, I lose my profiles.
If I decline, there may be a misconfiguration that'll bite my ass later.
(Lately, I've mostly used Xubuntu on my workstations.)

Because of this fragility, I cannot even recommend this to others.
Other administrators balk at the extra work and TLC GDM needs for
this to work -- quite correctly so.

And it irks me: I've found storing the Firefox profiles on a tmpfs
makes for a much snappier browser, without any of the drawbacks of
having a purely ephemeral profile. And I'd be surprised if this was the
only trick people do with their session scripts.

Would you be willing to add something like the above scriptlets
to PostLogin, PreSession.in and PostSession.in,
to provide this per-user session script functionality?

Please note that the scriptlet expressly verifies the existence
of the directory, and does nothing if it does not exist. And as the
scripts are run as the user themselves, without extra privileges,
it is not easy to subvert this mechanism for nefarious purposes.

Because we are talking about a change to default configuration files,
changes which do not conflict with existing configuration,
nor introduce extra work (except for a directory existence test)
in the default case, I believe the changes have no serious drawbacks,
nor can they be categorized as bloat or feature creep.

The other alternative would be for me to try to push for the distributions
to modify the GDM upstream configuration files, but that'd be rather
stupid: it'd just create extra work for everyone.
Unless I'm mistaken, Xubuntu at least uses the upstream defaults.

Thanks for your time, consideration, and work,
	Jouko Orava


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