Does anyone know of a daemon that in essence "does nothing"?
I couldn't find it googling.
I think I want a daemon that does nothing but keep this bash script, (specified in the ~/.xinitrc exec line) alive: (What I would like is written in bold) Code:
LIBGL_ALWAYS_INDIRECT=1 I figure, anyhow, it makes sense to have the life of ~/.xinitrc depend on a process that isn't used for anything else (?). |
inetd with all services disabled :-))? There are options to inetd to allow it to use a command line specified config file.
|
Why don't you try to write a program or script that sleeps for eternity?
If I got it right, you want your xsession to die by another program, and not the compiz (I've never used compiz, so I'm not quit shure for what I say). Have you tried to add at the end of .xinitrc "exec xterm" ? then the session will be terminated by closing that xterm (or any other program put there). |
(Pardon the delayed response)
Quote:
Quote:
Code:
NAME Quote:
EDIT: Maybe I was out of my mind writing "daemon"! That is probably not what I need. :doh: I need something that stays attached to the script (~/bin/mo-de), keeping it alive. Sorry for being difficult/ignorant :P Thank you for the answers so far. |
Quote:
Code:
while true; do sleep 60m; done I found that the C standard library function "atof" (it converts text to a floating point number, and I would assume that this is what sleep uses) converts "inf" and "infinity" to an infinite value. I tried this and it seems to work: Code:
sleep inf |
If you want to detach something from a script -- for example, from a startup script or a terminal --, use
Code:
( setsid command ... & ) </dev/null &>/dev/null For normal session commands, use Code:
command ... & |
Quote:
Should have tested this on my own :redface:. It does seem to work. I'll then just put sleep inf as the last line of my "DE" script and do a killall mo-de to end .xinitrc and thereby the x-session... Feel free to object if there is a more elegant/portable/obvious way to acheive what I want :) Quote:
Code:
( setsid compiz ... & ) </dev/null &>/dev/null Am I way off? These process control techniques seem interesting, but I'm just learning about ps's, pgrp's, and session's, so I'm not sure I'll use this for some time. Just want to show my appreciation for the suggested solution; it doesn't seem to involve any extra software running at all, which is elegant. Tnx all. |
Quote:
For compiz, you'll want to use Code:
compiz ... & |
Quote:
This is exactly what I need. Just a single wait... Huge thank you Nominal Animal. |
For anyone who reads this thread; you might find the following information useful.
I found it by accident on the arch wiki .xinitrc page: https://wiki.archlinux.org/index.php/Xinitrc Quote:
Quote:
Thanks everyone. Won't touch the thread anymore by myself. |
All times are GMT -5. The time now is 12:20 AM. |