public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joshua Murphy <poisonbl@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: went from x86 to ~x86: no more X11
Date: Wed, 9 Dec 2009 23:41:14 -0500	[thread overview]
Message-ID: <c30988c30912092041p1930b55k5435fc89ebe65cea@mail.gmail.com> (raw)
In-Reply-To: <4B1FCEBE.9020703@xunil.at>

On Wed, Dec 9, 2009 at 11:22 AM, Stefan G. Weichinger <lists@xunil.at> wrote:
> Am 09.12.2009 16:31, schrieb walt:
>
>>> So it seems more gdm/gnome-related to me, right?
>>
>> That would be my guess.  I don't use gdm so I don't know how to fix it.
>> I use startx with "exec /etc/X11/Sessions/gnome" in my ~/.xinitrc. You
>> could try that to see if gnome starts correctly.
>
> Yep, that works!
>
> So I could see how to always start X via startx or research where gdm
> fails. Thanks for helping me this step further ...
>
> S

Well, on my netbook, where I have to give a passphrase to access the
encrypted root anyhow (and am, therefore, not terribly interested in
typing yet more passwords moments later), I have this...

in /etc/inittab:
...
c6:2345:respawn:/sbin/agetty 38400 tty6 linux
c7:345:respawn:/usr/sbin/auto_start_x.sh
...

and /usr/sbin/auto_start_x.sh:
#!/bin/bash
ASXFILE="/var/run/asx.pid"
if [ ! -r /etc/nologin ] ; then
  if [ -f $ASXFILE ] ; then
    XPID=`head -1 $ASXFILE`
    if NAME=`ps -p $XPID -o command=` ; then
      OLDNAME=`tail -1 $ASXFILE`
      if [ "$NAME" == "$OLDNAME" ] ; then
        sleep 5
        exit 1
      else
        rm -f $ASXFILE &>/dev/null
      fi
    else
      rm -f $ASXFILE &>/dev/null
    fi
  fi

  /bin/su myuser -l -c "startx >/dev/null 2>&1" &
  XPID=$!
  NAME=`ps -p $XPID -o command=`
  echo $XPID > $ASXFILE
  echo $NAME >> $ASXFILE
  wait $XPID
  exit $?
fi
# ** End auto_start_x.sh


Respawns on close/crash... doesn't allow attempts to start more than
once (hence the 'lockfile' type hack in the script), doesn't break on
a stale lockfile, and does whatever the user ('myuser' should be
replaced with a real username) wishes in terms of WM/desktop by way of
the user's ~/.xinitrc ... and all without ever asking me for a user
password.

-- 
Poison [BLX]
Joshua M. Murphy



  reply	other threads:[~2009-12-10  4:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 19:26 [gentoo-user] went from x86 to ~x86: no more X11 Stefan G. Weichinger
2009-12-08 20:16 ` Joshua Murphy
2009-12-08 20:37   ` Stefan G. Weichinger
2009-12-09  0:24 ` [gentoo-user] " walt
2009-12-09  7:28   ` Stefan G. Weichinger
2009-12-09 15:31     ` walt
2009-12-09 16:22       ` Stefan G. Weichinger
2009-12-10  4:41         ` Joshua Murphy [this message]
2009-12-10  8:32           ` Stefan G. Weichinger
2009-12-10 10:16             ` Joshua Murphy
2009-12-11 16:55           ` Stefan G. Weichinger
2009-12-11 18:15             ` Joshua Murphy
2009-12-12 13:21               ` Stefan G. Weichinger
2009-12-12 20:56                 ` Joshua Murphy
2009-12-12 21:18                   ` Stefan G. Weichinger
2009-12-25 10:38                     ` Stefan G. Weichinger

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=c30988c30912092041p1930b55k5435fc89ebe65cea@mail.gmail.com \
    --to=poisonbl@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /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