Bug 89285 - Allow to define a default session at a system-wide level
Summary: Allow to define a default session at a system-wide level
Status: RESOLVED MOVED
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-23 19:46 UTC by Raphaël Hertzog
Modified: 2018-08-07 09:32 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Raphaël Hertzog 2015-02-23 19:46:28 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=594733 has been closed on gdm with the rationale that now that gdm relies on accountservice to retrieve the user's session, the feature of defining the default session should really be implemented at that level.

To the best of my knowledge, there's no such facility yet (or it's not documented anywhere where I tried to look it up).

So please provide a way (preferrably through a gsetting) to define the default session to use when a user has not made any explicit choice.

Thank you in advance!
Comment 1 Ray Strode [halfline] 2015-02-23 20:15:06 UTC
there isn't a good way to do it at the moment, though there is a convoluted way:

1) Create /etc/X11/sessions directory and put copies of the gnome-session-xsession and gnome-classic-session session files in it, but with high numbered prefixes: 

# mkdir /etc/X11/sessions
# cp /usr/share/xsessions/gnome-classic.desktop /etc/X11/sessions/3-gnome-classic.desktop
# cp /usr/share/xsessions/gnome.desktop /etc/X11/sessions/4-gnome.desktop

2) Ensure the session you want to be default has a lowered number prefix. KDE does this by default:

# ls -l /usr/share/xsessions/| grep kde
-rw-r--r--. 1 root root 4791 Apr 29 14:57 1-kde-plasma-standard.desktop
-rw-r--r--. 1 root root 7208 Apr 29 14:57 2-kde-plasma-safe.desktop

But if not, also copy the session you want from /usr/share/xsessions to /etc/X11/sessions and give it a low numbered prefix manually.

3) remove /usr/share/xsessions/gnome-classic.desktop and /usr/share/xsessions/gnome.desktop from your system (for instance # rpm -e gnome-session-xsession gnome-classic-session )

4) Restart gdm
Comment 2 James Hogarth 2015-07-16 14:14:10 UTC
The downside of clearing out /usr/share/xsessions is that on a package upgrade these files will be restored.

The better method would be if, similar to systemd, firewalld, polkit, etc, the /etc/X11/sessions directory overrode /usr/share/xsessions for matching file names.
Comment 3 Ray Strode [halfline] 2015-07-16 17:08:29 UTC
indeed, a shadow file with Hidden=true is sort of standard for key files, so might make sense to implement.
Comment 4 Ray Strode [halfline] 2015-07-16 17:09:16 UTC
alternatively, the systemd way of linking to /dev/null
Comment 5 GitLab Migration User 2018-08-07 09:32:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/27.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.