summaryrefslogtreecommitdiff
path: root/startx.cpp
Commit message (Collapse)AuthorAgeFilesLines
* startx: Add support for enabling IGLX for XQuartzJeremy Huddleston Sequoia2016-05-281-0/+10
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=96260 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* startx: Add -listen tcp if nolisten_tcp is disabled for XQuartzJeremy Huddleston Sequoia2016-05-281-0/+2
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=95379 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* launchd: Install binaries into libexecdirJeremy Huddleston Sequoia2015-12-291-2/+2
| | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* startx: don't init defaultdisplay to :0Peter Hutterer2015-03-261-1/+1
| | | | | | | | 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>
* startx: Fix startx picking an already used display number when -nolock is usedHans de Goede2015-03-251-1/+1
| | | | | | | | | | | | | | 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>
* startx: fix comment typoPeter Hutterer2015-03-251-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove support for ancient A/UX 3.0 supportGaetan Nadon2015-02-161-5/+0
| | | | | | | | 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>
* startx: Don't use GNU expr extensionsMark Kettenis2015-01-301-2/+2
| | | | | | | | | | | 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>
* startx: Pass -keeptty when telling the server to start on the current ttyHans de Goede2015-01-231-1/+1
| | | | | | | | | | | | 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>
* startx: Make the bugzilla reference in a comment survive cpp processingHans de Goede2014-08-261-1/+1
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=83019 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* startx: Pass vtX as long as the user did not specify oneHans de Goede2014-04-071-1/+13
| | | | | | | | | | | | | | | | 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>
* startx: Under Linux start X on the current VTHans de Goede2014-04-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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>
* Remove unixware / sco supportHans de Goede2014-03-311-52/+1
| | | | | | | | | | | | 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>
* XQuartz: Fix an issue where -dpi was not being passed to the server despite ↵Jeremy Huddleston2012-07-241-1/+1
| | | | | | | | | | | 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>
* darwin: Silence a syslog message from defaultsJeremy Huddleston2012-05-191-1/+3
| | | | | | | | | 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>
* Use default clientargs, serverargs, and display if none were setJeremy Huddleston2011-11-081-8/+17
| | | | | | | | | | | | 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>
* startx: Choose an unused $DISPLAY by default on all platformsJeremy Huddleston2011-10-171-4/+5
| | | | | | | | 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>
* Rename launchd-id-prefix to bundle-id-prefixJeremy Huddleston2011-05-111-1/+1
| | | | | | It's used many other places than just for launchd. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix minor typos in startx's comments.Cyril Brulebois2011-03-241-3/+3
| | | | | | 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>
* darwin: Make __APPLE__ path in startx POSIX compliantJeremy Huddleston2010-05-031-7/+11
| | | | | | http://xquartz.macosforge.org/trac/ticket/399 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* darwin: Handle home directories that contain a single-quote (')Jeremy Huddleston2010-03-111-1/+1
| | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Apple: Export X11_PREFS_DOMAIN for children (quartz-wm)Jeremy Huddleston2009-10-271-1/+1
|
* Strip RCS/CVS tagsAlan Coopersmith2009-10-031-2/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* launchd: Added --with-launchd-id-prefix option to set non-standard launchd ↵Jeremy Huddleston2009-09-021-1/+1
| | | | id prefix (org.x is still default)
* app/xinit: make startx's $? a useful valueAndres Salomon2009-08-031-0/+4
| | | | | | | | | | | 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>
* Cygwin can also have spaces in $HOMEJon TURNEY2009-03-061-2/+2
|
* startx: fix misparsing of initial client and server arguments which begin ↵Robert Macomber2009-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* Apple: Allow defaults option that maps to a -dpi server command line in startxJeremy Huddleston2008-12-171-0/+4
|
* OSX: More prefix fixesJeremy Huddleston2008-12-091-6/+6
|
* Apple: Honor X11_PREFS_DOMAIN if it's set (1.4.2-apple26 and later)Jeremy Huddleston2008-12-021-9/+13
|
* Apple: Using eval to protect people who have spaces in their home path.Jeremy Huddleston2008-07-021-0/+10
|
* startx.cpp: Made some things a little more friendly for people who have ↵Jeremy Huddleston2008-06-291-24/+23
| | | | spaces in pathnames.
* Properly handle using xserverrcJeremy Huddleston2008-05-281-10/+10
|
* Unset session environment variables so startx works within a running session.Adam Jackson2008-05-211-0/+3
|
* Check for proper cookie creation on all platformsAlan Coopersmith2008-05-131-1/+1
|
* Cleaned up handling of defaultserver{,args}Jeremy Huddleston2008-04-191-5/+2
| | | | Per comments from Jeremy Reed on the list... basically doing for everyone what I do for Apple
* Apple: Wait for privileged_startx to finish, so we don't race to create ↵Jeremy Huddleston2008-04-141-1/+3
| | | | /tmp/.X11-unix
* Apple: We renamed font_cache.sh to font_cache for better consistency... ↵Jeremy Huddleston2008-04-131-1/+3
| | | | Changing startx to work with this
* Apple: privileged_startx is in XINITDIRJeremy Huddleston2008-04-131-2/+2
|
* Apple: Execute /usr/X11/bin/privileged_startx if it's presentJeremy Huddleston2008-04-041-0/+4
|
* Apple: Fixed issue where display would not be passed correctly to the server ↵Jeremy Huddleston2008-04-041-1/+4
| | | | if nolisten tcp was enabled.
* Use /dev/urandom for cookie it it existsJeremy C. Reed2008-03-151-1/+5
| | | | | | | | | 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.)
* Apple: font caching and defaultsJeremy Huddleston2008-02-181-1/+24
| | | | | | | | Quieted defaults "error" messages by initializing default values Do font caching in startx, so users with custom ~/.xinitrc won't have to worry about updating it. Add "cache_fonts" defaults item to toggle whether or not to cache fonts at startup Fall back on fc-cache if font_cache.sh is not present.
* OS-X: Fixed typoJeremy Huddleston2008-02-011-1/+1
|
* OS-X: Add bindir to $PATH in startx if it's not thereJeremy Huddleston2008-01-091-13/+20
| | | | | This should also fix this on SCO since it was using the incorrect BINDIR instead of __bindir__ in that code block...
* OS-X: Properly set enable_xauth if the user has no defaults set and choose a ↵Jeremy Huddleston2008-01-041-2/+11
| | | | valid $display for fast-user-switching.
* OS-X: Made defaults test more robustJeremy Huddleston2007-12-201-2/+2
|
* Added support for OS-X preferences to disable tcp/ip connections and xauthJeremy Huddleston2007-12-201-52/+71
|
* Bug #12448: Don't try to trap 'ERR'.Tilman Sauerbeck2007-09-171-1/+1
| | | | | | startx is advertised as a POSIX sh script. These shells don't necessarily support trapping 'ERR'. This makes startx work again with dash (and probably others).
* remove .serverauth.$$ file on signals or errorsMatthieu Herrb2007-09-151-0/+1
|