public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: "W. Trevor King" <wking@tremily.us>
Subject: Re: [gentoo-catalyst] [PATCH] livecd-bashrc: Avoid a startx race by restricting to tty1
Date: Fri, 8 Mar 2013 18:49:42 -0800	[thread overview]
Message-ID: <CAEdQ38FnfpXMAN24Xhun+HGAjDp_tEvjOFwJ510cOa4h8OhT0Q@mail.gmail.com> (raw)
In-Reply-To: <6d3c93bde552943c26acbf6c1946dae23821860c.1362366795.git.wking@tremily.us>

On Sun, Mar 3, 2013 at 7:13 PM, W. Trevor King <wking@tremily.us> wrote:
> From: "W. Trevor King" <wking@tremily.us>
>
> Otherwise several virtual consoles may notice the existence of
> /etc/startx, and spawn simultaneous X servers.  This way we only spawn
> a single X server, regardless of timing.
>
> A better solution here is probably to add a "start" or "x-server"
> service to /etc/init.d/, but that's more work than I'm up to at the
> moment.
> ---
>  livecd/files/livecd-bashrc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/livecd/files/livecd-bashrc b/livecd/files/livecd-bashrc
> index 983e657..7abfbd4 100644
> --- a/livecd/files/livecd-bashrc
> +++ b/livecd/files/livecd-bashrc
> @@ -4,7 +4,7 @@ if [ ! "$(grep nox /proc/cmdline)" ]
>  then
>         if [ -x /usr/bin/X ]
>         then
> -               if [ -e /etc/startx ]
> +               if [ -e /etc/startx ] && [ "$(tty)" == /dev/tty1 ]
>                 then
>                         rm -f /etc/startx
>                         ##STARTX
> --
> 1.8.2.rc0.16.g20a599e
>
>

Seems reasonable, but I don't really know how any of this works. Have
you experienced the problem you describe? I.e., multiple X servers
starting.


  parent reply	other threads:[~2013-03-09  2:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03 16:53 [gentoo-catalyst] [PATCH] livecdfs-update.sh: Escape ampersands in STARTX sed expression W. Trevor King
2013-03-04  3:13 ` [gentoo-catalyst] [PATCH] livecd-bashrc: Avoid a startx race by restricting to tty1 W. Trevor King
2013-03-06 17:02   ` [gentoo-catalyst] [PATCH v2 0/2] Fix livecdfs-update.sh startx handling W. Trevor King
2013-03-06 17:02     ` [gentoo-catalyst] [PATCH v2 1/2] livecd-bashrc: Avoid a startx race by restricting to tty1 W. Trevor King
2013-03-06 17:02     ` [gentoo-catalyst] [PATCH v2 2/2] livecdfs-update.sh: Use `bash --login` to spawn startx W. Trevor King
2013-03-09  2:55       ` Matt Turner
2013-03-09 11:48         ` [gentoo-catalyst] " W. Trevor King
2013-03-09  2:49   ` Matt Turner [this message]
2013-03-09 11:46     ` [gentoo-catalyst] Re: [PATCH] livecd-bashrc: Avoid a startx race by restricting to tty1 W. Trevor King
2013-03-09  2:47 ` [gentoo-catalyst] [PATCH] livecdfs-update.sh: Escape ampersands in STARTX sed expression Matt Turner
2013-03-09 11:48   ` [gentoo-catalyst] " W. Trevor King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEdQ38FnfpXMAN24Xhun+HGAjDp_tEvjOFwJ510cOa4h8OhT0Q@mail.gmail.com \
    --to=mattst88@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    --cc=wking@tremily.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox