summaryrefslogtreecommitdiff
path: root/daemon/gdm-server.c
Commit message (Collapse)AuthorAgeFilesLines
* gdm-server: Remove empty branchAlessandro Bono2023-04-281-2/+1
|
* gdm-server: Plug a memory leakAlessandro Bono2023-04-281-9/+3
| | | | | identifier was not freed. While at it use g_autofree and simplify how the identifier is created.
* gdm-server: Add missing guards in public functionsAlessandro Bono2022-10-291-0/+4
|
* gdm-server: Use g_clear_handle_idAlessandro Bono2022-10-271-4/+1
|
* daemon: Support X servers built with -Dlisten_tcp=trueAlan Coopersmith2021-12-221-10/+11
| | | | | | | | | | | | | | | | | Xorg since version 1.17 doesn't listen to tcp sockets by default unless it's explicitly built with -Dlisten_tcp=true. GDM currently assumes X servers 1.17 and later are always built without specifying -Dlisten_tcp=true and doesn't work properly otherwise. This commit enhances GDM to better handle these non-standard builds by always passing '-nolisten tcp' on the command line when tcp should be disabled, and likewise always passing '-listen tcp' on the command line, assuming the X server is new enough to support it, when tcp should be enabled. Related #704
* GdmLocalDisplayFactory: Store VT number, not tty identifierIain Lane2019-05-291-1/+1
| | | | This makes the code a fair bit simpler.
* Use G_PARAM_STATIC_STRIGS on propertiesNiels De Graef2019-01-071-7/+7
| | | | This prevents strings from being unnecessarily copied.
* server: use G_DECLARE_FINAL_TYPENiels De Graef2018-12-251-89/+83
|
* Use standard exit codes.Robert Ancell2017-10-031-15/+7
| | | | | | | | | Use EXIT_ defines for readibility. There were some exit codes > 1, but they don't seem to be checked by any of the parent process code. This does mean that the logs might have changed, but modern logging techniques have probably made this obsolete. https://bugzilla.gnome.org/show_bug.cgi?id=788307
* Use Unicode in translatable stringsPiotr Drąg2017-06-221-5/+5
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772203
* Use -listen instead of -nolisten for new XorgNathaniel Roach2015-11-101-0/+13
| | | | | | | | | | | | | | | | Newer Xorg versions don't listen to tcp sockets by default, so instead of explicitly passing -nolisten to disable tcp sockets by default, we need to explicitly pass -listen to enable tcp sockets when DisallowTCP=false. Older versions don't support the -listen flag, so we check the version and if it's >= 1.17 then we specify -listen tcp Signed-off-by: Nathaniel Roach <nroach44@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=750026
* require logind supportRay Strode2015-06-121-25/+4
| | | | | | | Now that consolekit support is gone, this commit drops all the conditionalizing of logind support. https://bugzilla.gnome.org/show_bug.cgi?id=743940
* drop consolekit supportRay Strode2015-06-121-38/+0
| | | | | | It was deprecated in 3.16 to be removed in 3.18 https://bugzilla.gnome.org/show_bug.cgi?id=743940
* local-display-factory: only set is-initial on first seat0 displayRay Strode2015-02-181-9/+0
| | | | | | | | | | | | is-initial is for hardcoding vt1 on the X server command line. VTs only make sense on seat0, so GdmServer as ignoring is-initial on auxilliary seats. This commit makes sure that is-initial never gets set in the first place for auxilliary seats, and deletes the code the overrides its value. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* server: maintain active_servers list through explicit weak referencesRay Strode2014-03-181-2/+11
| | | | | | | | | It's possible for the server object to get freed before its child watch fires (if the slave is stopped early), so we can't rely on the child watch to main accounting on the active servers list. This commit changes the code over to use weak references instead.
* server: Move Init script processing hereJasper St. Pierre2014-03-141-0/+6
| | | | | We still need to have it in the XDMCP chooser slave, since we need to initialize the X server, even if we didn't start it ourselves.
* server: Force server regeneration offJasper St. Pierre2014-03-141-1/+1
| | | | | | | | | Server regeneration causes Xorg to re-emit the SIGUSR1 signal, which *really* confuses our state machine. Since we also want to control the server lifetime fairly closely, it doesn't really make sense for it to ever trigger, so force it off. https://bugzilla.gnome.org/show_bug.cgi?id=726380
* server: Pull out common X server argsJasper St. Pierre2014-03-141-2/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=726380
* server: Kill off some dead codeJasper St. Pierre2014-03-071-41/+0
|
* server: Process SIGUSR1 more carefullyJasper St. Pierre2014-02-141-14/+72
| | | | | | | | | | | | | If the slave is removed as a separate process, it means that we need to be more careful with our handling of SIGUSR1. If multiple X servers are launched at once, we need to use siginfo_t to get the PID of the thing that sent the user signal, and make sure we signal the correct GdmServer. glib doesn't have native siginfo support, so do it ourselves by using a worker thread that spins around waiting for sigwaitinfo. https://bugzilla.gnome.org/show_bug.cgi?id=724382
* server: Remove unused propertiesJasper St. Pierre2014-02-131-35/+1
|
* server: Properly set the DISPLAY envvarJasper St. Pierre2014-02-131-1/+1
| | | | Noticed by code inspection. Not sure how broken this really is...
* Fix intermittant logging failure on non-journald systemsThomas Andersen2014-01-281-1/+1
| | | | | | | | | | The gdm_server_setup_journal_fds function returns a random value if ENABLE_SYSTEMD_JOURNAL isn't defined. This commit makes sure it returns FALSE in that case, so log file fallbacks work reliably. https://bugzilla.gnome.org/show_bug.cgi?id=722889
* daemon: let the xserver log to the journalPeter Hutterer2014-01-271-6/+65
| | | | | | | | | | | | | | | If systemd is running, don't re-route the xserver's stdout/stderr to a log file. Instead hook it up to a journal stream and let the xserver log to the journal. gdm thus starts the server with: Xorg <other options> -logfile /dev/null -verbose 3 where 3 is the default Xorg log verbosity. Minor changes by Ray Strode. https://bugzilla.gnome.org/show_bug.cgi?id=722889
* Fix checks for logindMartin Pitt2013-03-291-8/+4
| | | | | | | | | | | | It is possible to build systemd without logind or run logind without systemd init, in both cases testing for systemd init is wrong. Check for /run/systemd/seats in the parts which talk to logind instead, as recommended by systemd upstream. For details, see: <https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html> https://bugzilla.gnome.org/show_bug.cgi?id=696266
* Port to g_unix_signal_add(), drop GdmSignalHandlerColin Walters2013-01-221-41/+10
| | | | | | | | | | | The level of copy/paste going on here before is rather astonishing. For example, in some cases, I dropped spurious handling of SIGHUP, when the code didn't have any settings to reread. Anyways, the code is now clearer, and we get to drop all the bits of gdm-signal-handler.[ch] for the integrated GLib handling. https://bugzilla.gnome.org/show_bug.cgi?id=676181
* daemon: Clean up error handling for gdm_server_spawn()Colin Walters2012-10-021-43/+44
| | | | | | | | This fixes a bug where we'd try to call g_child_watch_add() on a 0 pid in case of error. More importantly, this moves us closer to a sane error handling story where the default is to throw. https://bugzilla.gnome.org/show_bug.cgi?id=684315
* server: clean up error handlingRay Strode2012-09-181-5/+8
| | | | | Don't bother creating a child watch if we're about to fail anyway. Don't exit from gdm-server.c, we do clean up from gdm-simple-slave.c
* server: start X with -background none not -brRay Strode2012-09-131-2/+2
| | | | This important for smooth boot transitions.
* Trivial: Update FSF Address.Dominique Leuenberger2012-09-061-1/+1
| | | | Fix bug 683383.
* GdmServer: take a reference to self in child watch functionGiovanni Campagna2012-09-041-0/+4
| | | | | | | | | | | The handlers for the "died" and "exited" signals on gdm server trigger finalization of the slave by calling gdm_slave_stop(). This commit ensures these handlers hold a reference to the server object, so the server doesn't get prematurely finalized before the handler finishes. https://bugzilla.gnome.org/show_bug.cgi?id=682571
* Add configure option to specify directory of some toolsVincent Untz2012-08-271-1/+1
| | | | | | | | | Add --with-gnome-settings-daemon-directory and --with-consolekit-directory for distributions that do not put gnome-settings-daemon and ck-get-x11-display-device directly in LIBEXECDIR. Closes: bgo#582320
* server: fix non-systemd code pathRay Strode2012-08-271-2/+10
| | | | | | | | | | | | I incorrectly used g_strcmp0 in commit 42ef43e603d65390c2c86e276489c8a08c7808a0 breaking consolekit users. This commit rectifies that. https://bugzilla.gnome.org/show_bug.cgi?id=511168
* gdm: always run gdm on VT1Lennart Poettering2012-08-061-67/+34
| | | | | | | | | | | | | | | This drops automatic VT allocation schemes for the initial display in favour of a compile time hardcoded VT assignment. The automatic allocation schemes are inherently racy since a simpler output to the console might already influence it and result in gdm running on another than the intended VT. This patch adds a --with-initial-vt= switch to configure which may be used to set the VT gdm will run the initial server on. It defaults to 1. https://fedoraproject.org/wiki/Features/DisplayManagerRework https://bugzilla.gnome.org/show_bug.cgi?id=511168
* server: pass debug arguments to Xorg in same way for plymouth pathRay Strode2012-06-251-1/+10
|
* server: pass -core to Xorg when debug enabledRay Strode2012-06-251-7/+8
| | | | | | This aids in debugging problems. https://bugzilla.gnome.org/show_bug.cgi?id=678717
* daemon: enable smooth transition between plymouth and XRay Strode2012-05-051-0/+60
| | | | | | | | | | | This commit adds optional support for interacting with plymouth from gdm. This feature can be enabled by passing --with-plymouth to configure. Hopefully, this will enable the various distributions that use plymouth to drop a patch. https://bugzilla.gnome.org/show_bug.cgi?id=572173
* server: call ck-x11-get-display-device even w/o WITH_CONSOLE_KITRay Strode2012-03-191-3/+0
| | | | | | | | | | ck-x11-get-display-device is a soft dependency. If it's installed then pam_ck_connector will function properly, otherwise it won't. Since it's a soft dependencies, we should do it even if building --disable-console-kit . This allows distros to drop the ConsoleKit buildrequires and still keep support for consolekit via pam_ck_connector.
* server: get X tty from consolekit if not with with systemdRay Strode2012-03-191-2/+4
| | | | | | | | | | | commit 932c65c66d2 changed the code to return NULL for the X tty when building with systemd. This is because systemd does tty handling on its own. It's not sufficient to be built with support for systemd, though, we also need to have booted with systemd. Found by ioni.
* user-switching: don't set PAM_TTY when using systemdRay Strode2012-03-191-0/+8
| | | | | | | It does it for us, and we don't know it anyway, so don't bother trying. https://bugzilla.gnome.org/show_bug.cgi?id=655380
* server: Only start Xorg with maximum verbosity if debug is enabledJean Delvare2012-02-241-2/+12
| | | | | | | | | | | Only start Xorg with maximum verbosity if gdm itself was started with debugging enabled. Making Xorg overly verbose by default fills up the log file with driver debugging messages, hiding the important error or warning messages. https://bugzilla.gnome.org/show_bug.cgi?id=670694 https://bugzilla.novell.com/show_bug.cgi?id=748283 https://bugzilla.redhat.com/show_bug.cgi?id=785507
* daemon: Add missing #ifdef WITH_SYSTEMDColin Walters2012-02-221-0/+2
|
* server: invoke X with the systemd multi seat X wrapper if necessaryLennart Poettering2012-02-071-1/+49
| | | | | | | | | | | systemd 39 and newer provide a small wrapper for X which works around the fact that XOrg upstream currently support multi-seat hotplug for displays. Let's make use of this as a stop-gap until this feature is added to XOrg upstream. This code tries to be as defensive as possible and makes use of the wrapper only if the system as actually booted with systemd, the wrapper is available and we actually use a seat != "seat0".
* server: pass seat id to serverLennart Poettering2012-02-071-1/+36
| | | | | | | | | When we spawn a new X server, let's pass the seat id to it via the "-seat" parameter, which has been available since a while in upstream Xorg. -seat causes the X server to only make use of hardware that is assigned to the seat specified, and leave all other hardware untouched.
* Revert some commitsRay Strode2011-06-171-7/+1
| | | | | | | | | | | | I had some inprogress changes in my local tree when when git bz applying the patches on bug 618047. Those unfinished changes got interleaved into the commits, creating a bit of a mess. Also, bug 618047 has been reopened. This commit reverts those changes for now until.
* daemon: drop some fluff codeRay Strode2011-06-151-14/+0
| | | | | | | There's a bit of needless boilerplate and dead code just sort of sitting around in various places. This commit cleans things up a bit.
* daemon: clean up greeter when unusedRay Strode2011-06-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | When user switching GDM needs to show a transient greeter for the user to pick a name from the list and jump to that session. After the user has been jumped to the selected session we don't really have a use for the greeter session. Historically, we've kept it around anyway, though, because X by default jumps back to the VT it started on when it exits, and we don't want the user to get thrown to an empty VT after they log out. This commit changes X to get started with the "-novtswitch" option, so that it doesn't do the undesirable switch-on-exit thing. This allows us to clean up the useless greeter following user switches. Based on work by Josselin Mouette <joss@debian.org> https://bugzilla.gnome.org/show_bug.cgi?id=618047
* daemon: Up verbosity of X loggingRay Strode2011-05-241-1/+1
| | | | This makes things a little easier for debugging problems.
* Wrap getpw* calls to retry in EINTRWilliam Jon McCann2010-08-171-2/+2
| | | | | | if getpwnam(username) returns NULL, errno needs to be checked for EINTR. This indicates that a signal was received while waiting for the blocking call to return, and getpwnam() should be retried.
* Various memory leak fixesWang Xin2010-06-171-0/+12
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=620430 With help from Pablo Castellano