summaryrefslogtreecommitdiff
path: root/startx.cpp
AgeCommit message (Collapse)Author
2022-10-24startx: Source XINITRC and XSERVERRC variablesTim Egenton
Fix issue #14 Check XINITRC and XSERVERRC, if those files do not exist then just use ~/.xinitrc and ~/.xserverc as normal. Signed-off-by: Tim Egenton <tegenton@splattim.me>
2022-07-17stop unsetting DBUS_SESSION_BUS_ADDRESS variableDominik 'Rathann' Mierzejewski
It's not necessary as we no longer support running startx from an existing X session. Fixes #9. Signed-off-by: Dominik Mierzejewski <dominik@greysector.net>
2022-06-19darwin: Wait for font_cache to complete to avoid a race with `xset fb=`Jeremy Huddleston Sequoia
Partially fixes: https://github.com/XQuartz/XQuartz/issues/216 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-04-07startx: don't attempt to catch SIGKILLnia
Most shells ignore attempts to catch SIGKILL. Some, such as NetBSD's /bin/sh, print an annoying message helpfully reminding you that it isn't possible to catch SIGKILL whenever X starts. Signed-off-by: Nia Alarie <nia@NetBSD.org>
2021-06-04Remove non-portable grep usage from startxArthur Williams
startx uses non-portable grep flags (-o). grep isn't even needed for this and has been replaced with substring removal. Closes #6
2021-03-15darwin: Specify +extension GLX when the user requests IGLX supportJeremy Huddleston Sequoia
Fixes: https://github.com/XQuartz/XQuartz/issues/54 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2020-08-28startx: use uname -n instead of hostnameRickie Schroeder
startx calls hostname to obtain the hostname, but this is not defined by POSIX, so not guaranteed to work. The script already does some checks to deal with different hostname implementations on Linux. Using uname -n instead fixes this in a portable way.
2020-07-23Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2016-05-28startx: Add support for enabling IGLX for XQuartzJeremy Huddleston Sequoia
https://bugs.freedesktop.org/show_bug.cgi?id=96260 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-28startx: Add -listen tcp if nolisten_tcp is disabled for XQuartzJeremy Huddleston Sequoia
https://bugs.freedesktop.org/show_bug.cgi?id=95379 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-12-29launchd: Install binaries into libexecdirJeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-03-26startx: don't init defaultdisplay to :0Peter Hutterer
This is misleading - it is always overwritten after looping through the lock files. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-25startx: Fix startx picking an already used display number when -nolock is usedHans de Goede
Currently startx relies on /tmp/.X?-lock being present for automatically picking a free display number. This does not work if -nolock is used when starting the server, or if the server is started with -displayfd as -displayfd implies -nolock. This is becoming a problem now that -displayfd is getting used by display-managers (e.g. gdm), this fixes this by also checking for /tmp/.X11-unix/X? Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-25startx: fix comment typoPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-16Remove support for ancient A/UX 3.0 supportGaetan Nadon
This was Apple Computer’s implementation of the Unix operating system for some of their Macintosh computers. From 1988 to 1995. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-01-30startx: Don't use GNU expr extensionsMark Kettenis
Use the ':' operator instead of "match" and avoid the use of "\+". Both constructions aren't specified by POSIX and not supported in BSD expr. Also drop the '^' from the regular expressions as it is implicit and POSIX leaves its behaviour undefined. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2015-01-23startx: Pass -keeptty when telling the server to start on the current ttyHans de Goede
Detaching from the tty causes systemd-logind to refuse service to the xserver, the xserver already tries to detect that it is being asked to run on the current tty and then automatically enables -keeptty, but this code fails if all of stdin, stdout and stderr are redirected to a file. So explicitly tell the xserver to not detach when we're telling it to run on the current tty. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1177513 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-26startx: Make the bugzilla reference in a comment survive cpp processingHans de Goede
https://bugs.freedesktop.org/show_bug.cgi?id=83019 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-04-07startx: Pass vtX as long as the user did not specify oneHans de Goede
Adding vtX to $defaultserverargs means that it will only be added when the user specifies no server arguments. This means that doing ie: "startx -- -depth 16" will cause the server to start on a different vt then just "startx", which does not meat the principle of least surprise. Instead always pass the vtX argument, except when the user has specified its own vtX argument. Note that vtX still only gets added for the default server, since for ie Xnest or Xephyr it makes no sense. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: James Cloos <cloos@jhcloos.com>
2014-04-04startx: Under Linux start X on the current VTHans de Goede
When we let X allocate a new VT, systemd-logind will not recognize any processes running on this VT as belonging to a valid session (since there was no pam session opened on that tty). This causes problems like PolicyKit denials for these processes. ConsoleKit under Linux has been deprecated for a few years now and is no longer being maintained, so simply make this the default under Linux. Note we do not pass in the vt if the user has specified an alternative server to start, as the vtX argument is only valid for the Xorg server, likewise we omit it if the user has specified any other server arguments. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=806491 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-31Remove unixware / sco supportHans de Goede
We don't support SCO / Unixware anymore, so lets remove the SCO / Unixware specific bits from startx and xinitrc SCO support was removed from the server in 2010: http://lists.x.org/archives/xorg-devel/2010-December/017209.html Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2012-07-24XQuartz: Fix an issue where -dpi was not being passed to the server despite ↵Jeremy Huddleston
being set For some reason 'defaults' sometimes shows dpi in quotes and sometimes doesn't. Regression-from: 335937217a51e5e159a14463e0b1e3aedf35c6be Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-19darwin: Silence a syslog message from defaultsJeremy Huddleston
Unfortunately defaults has no way to check if a preference exists, and it prints a message to syslog if we read one that doesn't exist. dpi is one that commonly doesn't exist and results in user confusion when they read syslog. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-08Use default clientargs, serverargs, and display if none were setJeremy Huddleston
Previously, we did not use the default values unless server or client weren't set, but we should still use the defaults if they were not set but the server was. This is most evident when you want to tell startx which server to use, but you want startx to figure out which display to use automatically. This fixes a regression introduced by the previous patch on XQuartz: http://xquartz.macosforge.org/trac/ticket/523 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-17startx: Choose an unused $DISPLAY by default on all platformsJeremy Huddleston
Now everyone can benefit from this code that I previously added for darwin https://bugs.freedesktop.org/show_bug.cgi?id=1789 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11Rename launchd-id-prefix to bundle-id-prefixJeremy Huddleston
It's used many other places than just for launchd. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-24Fix minor typos in startx's comments.Cyril Brulebois
Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-05-03darwin: Make __APPLE__ path in startx POSIX compliantJeremy Huddleston
http://xquartz.macosforge.org/trac/ticket/399 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11darwin: Handle home directories that contain a single-quote (')Jeremy Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2009-10-27Apple: Export X11_PREFS_DOMAIN for children (quartz-wm)Jeremy Huddleston
2009-10-03Strip RCS/CVS tagsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-02launchd: Added --with-launchd-id-prefix option to set non-standard launchd ↵Jeremy Huddleston
id prefix (org.x is still default)
2009-08-03app/xinit: make startx's $? a useful valueAndres Salomon
When startx fails to start X, it's most likely xinit that failed. xinit returns a proper return code (1), but that gets clobbed in the startx script by clean-up commands. This patch saves $? from xinit and forces startx to exit with that value. This way, if startx actually fails to start X, $? reflects that. Signed-off-by: Andres Salomon <dilinger@debian.org>
2009-03-06Cygwin can also have spaces in $HOMEJon TURNEY
2009-01-16startx: fix misparsing of initial client and server arguments which begin ↵Robert Macomber
with / or ./ If you invoke startx with a client whose initial command-line arguments begin with / or ./, it uses the last such argument as the base command for the client. E.g.: startx /usr/bin/xterm /usr/bin/mutt will use /usr/bin/mutt as the client to run instead of /usr/bin/xterm. This is because of the way in which startx parses its arguments. It's a loop over a case with three clauses; the bug is in the first. When it's looking at one of startx's args it checks to see if $clientargs is empty in order to see if it should set $client or add the argument to $clientargs. It should also check to see whether $client is set. There is a similar bug in parsing server args, where it checks to see if $serverargs is empty to decide whether to set $server. Debian bug#511717 (http://bugs.debian.org/511717) Signed-off-by: Julien Cristau <jcristau@debian.org>
2008-12-17Apple: Allow defaults option that maps to a -dpi server command line in startxJeremy Huddleston
2008-12-09OSX: More prefix fixesJeremy Huddleston
2008-12-02Apple: Honor X11_PREFS_DOMAIN if it's set (1.4.2-apple26 and later)Jeremy Huddleston
2008-07-02Apple: Using eval to protect people who have spaces in their home path.Jeremy Huddleston
2008-06-29startx.cpp: Made some things a little more friendly for people who have ↵Jeremy Huddleston
spaces in pathnames.
2008-05-28Properly handle using xserverrcJeremy Huddleston
2008-05-21Unset session environment variables so startx works within a running session.Adam Jackson
2008-05-13Check for proper cookie creation on all platformsAlan Coopersmith
2008-04-19Cleaned up handling of defaultserver{,args}Jeremy Huddleston
Per comments from Jeremy Reed on the list... basically doing for everyone what I do for Apple
2008-04-14Apple: Wait for privileged_startx to finish, so we don't race to create ↵Jeremy Huddleston
/tmp/.X11-unix
2008-04-13Apple: We renamed font_cache.sh to font_cache for better consistency... ↵Jeremy Huddleston
Changing startx to work with this
2008-04-13Apple: privileged_startx is in XINITDIRJeremy Huddleston
2008-04-04Apple: Execute /usr/X11/bin/privileged_startx if it's presentJeremy Huddleston
2008-04-04Apple: Fixed issue where display would not be passed correctly to the server ↵Jeremy Huddleston
if nolisten tcp was enabled.
2008-03-15Use /dev/urandom for cookie it it existsJeremy C. Reed
else fall back to /dev/random. Not doing in configure.ac because can't easily check for existence when doing cross-builds. (Alternative would be to define this for every operating system in configure.ac. Currently only is defined for OpenBSD. Systems that have mcookie also will not be effected.)