summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* meson: allow building with elogindDudemanguy2023-04-281-1/+1
| | | | | | | Currently, the GDM meson build has a hard dependency on systemd. However, GDM can function just fine if one is using elogind. This allows a user to build GDM against libelogind and also disable the systemd system and user units.
* gdm-common: Let GPtrArray deal with its contentAlessandro Bono2023-04-281-2/+1
|
* gdm-settings-direct: Use g_auto*Alessandro Bono2023-04-281-12/+4
|
* gdm-settings-direct: Don't pass an error if we are not interested in itAlessandro Bono2023-04-281-8/+1
|
* gdm-settings-desktop-backend: Use g_auto*Alessandro Bono2023-04-281-42/+15
|
* gdm-settings-desktop-backend: Plug a memory leakAlessandro Bono2023-04-281-4/+2
| | | | error was leaked. While at it use g_auto*.
* gdm-settings-desktop-backend: Plug a memory leakAlessandro Bono2023-04-281-6/+4
| | | | Variables g, k, l are leaked. While at it, use g_autofree.
* gdm-settings-desktop-backend: Don't pass an error if we are not interested in itAlessandro Bono2023-04-281-7/+1
|
* gdm-profile: Use g_auto*Alessandro Bono2023-04-281-5/+2
|
* gdm-address: Use g_auto*Alessandro Bono2023-04-281-7/+3
|
* gdm-settings-backend: Add missing guards in public functionsAlessandro Bono2022-10-291-0/+4
|
* gdm-settings: Add missing guards in public functionsAlessandro Bono2022-10-291-0/+3
|
* gdm-settings-utils: Add missing guards in public functionsAlessandro Bono2022-10-291-2/+22
|
* gdm-settings-direct: Add missing guards in public functionsAlessandro Bono2022-10-291-3/+7
| | | | | gdm_settings_direct_get_string() is never called with value == NULL. Remove the check to make it behave like the other "get" functions.
* gdm-settings-desktop-backend: Add missing guards in public functionsAlessandro Bono2022-10-291-7/+6
| | | | | | | | ...and also in private get/set functions that are called via gdm_settings_get_value() and gdm_settings_set_value(). gdm_settings_get_value() is never called with value == NULL. Remove this case and add a guard.
* gdm-common: Add missing guards in public functionsAlessandro Bono2022-10-291-0/+6
|
* gdm-address: Add missing guards in public functionsAlessandro Bono2022-10-291-0/+4
|
* gdm-settings: Guard against missing backendAlessandro Bono2022-10-271-0/+2
| | | | Otherwise we are going to read `res` that contains a garbage value.
* gdm-settings-direct: Remove dead codeAlessandro Bono2022-10-271-5/+0
| | | | Value stored to 'ret' is never read.
* gdm-settings-direct: Remove leftoversAlessandro Bono2022-09-082-11/+0
| | | | | | | gdm_settings_direct_set doesn't exist. gdm_settings_direct_get is unused. Fixes: e1a7b7cac426f81ea2ab60263907bd92032f1068
* gdm-settings-utils: Remove leftoversAlessandro Bono2022-09-081-1/+0
| | | | | | This function doesn't exist. Fixes: e1a7b7cac426f81ea2ab60263907bd92032f1068
* common: Add API to reload settings from diskRay Strode2022-03-014-2/+24
| | | | | | | | | | Ideally we would reread /run/gdm/custom.conf after we've decided graphics setup is complete. This is because the file may not get written out by udev until after GDM is already started and waiting. As a first step to get there, this commit adds an API for rereading the file, and changes the SIGHUP handler to use it (instead of the complete teardown and reinitialization it was doing before).
* daemon: Provide more flexibility for configuring display serverRay Strode2021-07-221-0/+2
| | | | | | | | | | | | | | | | | | | There's currently a way to disable wayland, but no way to disable Xorg. We currently prefer wayland if it's not disabled, but have no way to prefer Xorg without disabling wayland entirely. There's currently no way use legacy Xorg support at all if user display server support is enabled at a build time. This commit adds more flexibility to display server selection. It adds two new keys: XorgEnable and and PreferredDisplayServer. XorgEnable=false disables Xorg support entirely on seat 0. PreferredDisplayServer can be set to "wayland", "xorg", "legacy-xorg" or "none" to select which display server is used by default. If it's set to "wayland", it will fall back to "xorg". If it's set to "xorg" it will fall back to "wayland".
* launch-environment: Read XDG_DATA_DIRS from env.d for initial-setupCosimo Cecchi2021-07-092-4/+12
| | | | | | | | | | | In the initial setup session we may need to run a Flatpak application; Flatpak requires XDG_DATA_DIRS to include its locations to work correctly, but that's not set at the moment for the initial-setup session. This commit borrows the code from GdmSessionWorker to read XDG_DATA_DIRS from gdm's env.d machinery for the initial-setup session as well.
* common: Factor out gdm_load_env_d()Cosimo Cecchi2021-07-092-0/+123
| | | | | We need to use this machinery from a second location; as a first step factor it out to gdm-common.
* daemon,common,libgdm: Drop use of sd_seat_can_multi_sessionRay Strode2021-02-251-18/+0
| | | | It's deprecated now, and always returns TRUE.
* cleanup: Use more literal errorsMarco Trevisan (Treviño)2021-02-221-8/+8
| | | | Replace g_set_error with g_set_error_literal where it makes sense.
* Drop autogoo goo gooRay Strode2020-04-301-90/+0
| | | | | | Our turkey has freezer burn, so I'm dropping it. https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/96
* data: switch gdm.service.in to use cmake formatNiels De Graef2020-04-301-0/+43
| | | | | | | | | | We're going to be switching to meson, and meson doesn't deal too well with an @ in the configuration file that's not part of a substitution variable. This commit switches the gdm service over to use a cmake style of substitution variables, so we can later tell meson to use configure in cmake mode and workaround the @ confusion.
* manager: Try looking up session based on PID firstBenjamin Berg2020-04-222-7/+30
| | | | | | | | | | | | | | Unfortunately, GDM may be running multiple greeters, and each greeter is currently using the same user. So while in a lot of setups each user should only have one graphical session and also only one DBus session bus, this is not true for the gdm greeter. Lacking another solution (e.g. separate users), we need to be able to correctly lookup the session information for all greeter instances. We can do so by using sd_pid_get_session and using this information is safe if it does return something. See: #526
* Removed unused pixmaps and references to pixmapdirStasiek Michalski2019-08-061-1/+0
|
* manager: Find user's current graphical session, not session of callerwip/benzea/systemd-userIain Lane2019-08-052-4/+120
| | | | | | | If (e.g.) gnome-shell is started as a systemd --user unit, it won't be part of the login session. We should instead look through all of the user's sessions until we find the login session, and take that as our session.
* Allow sessions to register with GDMIain Lane2019-05-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | Recording when sessions start, for Wayland → Xorg fallback or transitioning to the user session, is currently done with timeouts. This isn't ideal, because on some very slow machines the timeout can be hit before the session has had a chance to fail: if gnome-session takes more than 3 seconds to fail then the session will be considered to have exited rather than failed, and so we don't do Xorg fallback. We can do this more reliably if we allow sessions to optionally register themselves with GDM. Then we will know when they've started, so can shut down the greeter or fall back to Xorg as appropriate. The mechanism is that they specify X-GDM-SessionRegisters=true in their file, and then call RegsterSession on the DisplayManager interface on the bus (added in the previous commit) to say that they've started up. If X-GDM-SessionRegisters is missing or false, GDM will call the same method for them after 10 seconds. Closes: #483
* Use G_PARAM_STATIC_STRIGS on propertiesNiels De Graef2019-01-071-1/+1
| | | | This prevents strings from being unnecessarily copied.
* settings-desktop-backend: use G_DECLARE_FINAL_TYPENiels De Graef2018-12-232-54/+29
|
* settings-backend: use G_DECLARE_DERIVABLE_TYPENiels De Graef2018-12-232-34/+4
|
* settings: use G_DECLARE_FINAL_TYPENiels De Graef2018-12-232-43/+16
| | | | | | | | | Note that we need to remove the signal vfunc in GdmSettingsClass, so make sure to change the `g_signal_new("value-changed", ...)`, to cope with that. It also immediately gets rid of the deprecated `g_type_class_add_private()`.
* common: don't bail if session disappears out from under usRay Strode2018-08-311-1/+7
| | | | | | | | | | | | | | | | | | | | | It's entirely possible for a session returned by sd_seat_get_sessions to disappear immediately after the sd_seat_get_sessions call returns. This is especially likely at logout time where the session will briefly be in the "closing" state before getting reaped. If that happens when we're looking for a greeter session, we stop looking for a greeter session and bail out all confused. This commit fixes the confusion by gracefully handling the session disappearing by just proceeding to the next session in the list. This commit is very similar to commit 155ee7eca which got accidentally reverted during code consolidation. The main difference is this commit checks the correct error code of -ENXIO instead of -ENOENT, so it might actually fix what it's ostensibly supposed to fix.
* common: remove unnecessary freeRay Strode2018-08-311-3/+1
| | | | | | | | | | | | This commit drops an erroneous free call, that would potentially free a dangling pointer. Luckily the error condition can never occur because the error code checked is never returned, so the free call is dead code. This commit removes the free call. A subsequent commit will fix the error code checking.
* common: get rid of some tabs that snuck inRay Strode2018-08-311-1/+1
| | | | | This commit removes some tab characters that inadvertently snuck into the code.
* common: dedupe activate_session_idRay Strode2018-08-022-5/+11
| | | | | | Right now there are three copies of activate_session_id. This commit consolidates the code to gdm-common.c
* common: dedupe gdm_get_login_window_session_idRay Strode2018-08-022-13/+36
| | | | | | | | Right now there are two slightly different cut-and-pastes of the function to get the session id of the login session in the code. This commit deduplicates them.
* Remove mkdtemp() and its wrappers.Niels De Graef2018-06-245-262/+0
| | | | GLib has provided a wrapper for this with g_mkdtemp() since 2.30.
* common: Support runtime configurationsFelix Zhang2018-02-124-44/+155
| | | | | | | Add runtime configuration file /run/gdm/custom.conf, making device dependent configurations possible. https://bugzilla.gnome.org/show_bug.cgi?id=789081
* common: Also set GROUP in scriptsSam Spilsbury2018-01-081-0/+26
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787287
* common: don't run scripts with bogus DISPLAY and XAUTHORITYRay Strode2018-01-081-2/+7
| | | | | | | | | | | | DISPLAY and XAUTHORITY might not be set if we're starting the X server as part of the session. In that case we should ensure the variables aren't set in the environment of the gdm session scripts. This commit fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=792150
* Remove unused variablesRobert Ancell2017-12-041-3/+0
|
* Revert "common: Also set GROUP in scripts"Ray Strode2017-10-031-26/+0
| | | | This reverts commit 6594b1f262ffaa3d120c0b23f92bad2802f17e4a.
* common: Also set GROUP in scriptsSam Spilsbury2017-10-031-0/+26
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787287
* settings: Make sure to set old settings global to NULL on finalizeSam Spilsbury2017-09-051-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787288