Re: [dwm] quitting dwm-in-pipe

From: mikshaw <mrblog_AT_yahoo.com>
Date: Wed, 18 Oct 2006 16:02:21 -0400

My opinion is the pipe loop is not an ideal way to handle dwm status,
but it seems to be the only thing that works as it is coded. The problem
seems to be that the "while" command is actually the main X process when
dwm is run this way, so killing dwm does not end xinitrc. My choice would
have been to allow dwm to run as the final command in .xinitrc and also
allow it to read stdin...something like exec dwm < loop command, perhaps?

In any case, my current start script for dwm looks like this:

   while pidof dwm &>/dev/null
   do
      date +"[%H:%M] %a %b %d" && sleep 5
   done | /opt/dwm/bin/dwm

It's still not ideal for two reasons:
1) i still have to wait up to 5 seconds for X to shut down
2) sometimes it results in a broken pipe, presumably if dwm does not
   start immediately (pidof exits non-zero?).

>From Antoni Grzymala, (18/10/06 20:23):
>
> Tako rzecze David Tweed (w li??cie z 2006-10-18, 18:14):
>
> > I'm really not sure what's going on then:
> >
> > 1. If I just run dwm directly I'm sure I often used M-S-q quit
> > successfully back to xdm when I had open xterms.
> >
> > 2. If I run in the pipe and close all the clients and M-S-q then I
> > stay in X.
> >
> > 3. Even dropping the sleep down to 4 seconds M-S-q hasn't caused X to
> > quit after 5 minutes.
> >
> > 4. I'm trying this at work on a machine that's running whatever fedora
> > uses (gdm-binary?), but it also didn't work on a machine with a two
> > year older version of all software and where I go into a VC and then
> > "startx".
> >
> > I'm sure it's something simple I'm doing wrong/been misconfigured, but
> > I can't figure it out. The sleep timeout still applies, but obviously
> > it's not the case :).
> >
> > Just to confirm it's my setup: anyone using Fedora 5 with gdm-thingy &
> > running dwm in pipe: the quit action of dwm gets you back to the login
> > screen, yes?
>
> No, really it is just the matter of the loop. I'm running dwm on a
> different system (Gentoo, gdm-2.16.1, xorg-x11-7.1), and it acts the
> same.
>
> If I have a loop updating dwm I have to quit my xclients. If I don't it
> exits immediately killing the clients (connection to xserver lost, they
> say).
>
> That happens both whether I run dwm from .xinitrc via startx, or from an
> identical dwm-session file from gdm-login-thingy.
>
> So it's a design question that we should perhaps ask arg (arg, are you
> reading this?).
>
> antoni
>
> --
> . Antoni Grzymala - antoni (at) chopin.edu.pl -------------------.
> | OpenPGP KeyID EB315583 available now from a keyserver near you |
> | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 |
> `----------------------------------------------------------------'
>
>
Received on Wed Oct 18 2006 - 21:57:37 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:07 UTC