Gentoo Archives: gentoo-user

From: "Randolph Maaßen" <r.maassen60@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Running a program on a headless computer ?
Date: Sun, 28 Sep 2014 16:24:45
Message-Id: CAOEsN6ZDXFywVBNPJejKw15ofYj-Pb=3M8T7Bx+WGTq-4YBUZQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Running a program on a headless computer ? by meino.cramer@gmx.de
1 2014-09-28 18:08 GMT+02:00 <meino.cramer@×××.de>:
2 >
3 > Randolph Maaßen <r.maassen60@×××××.com> [14-09-28 16:24]:
4 >> On Sep 28, 2014 4:14 PM, <meino.cramer@×××.de> wrote:
5 >> >
6 >> > Hi,
7 >> >
8 >> > I want to run programs, which insist on haveing a terminal
9 >> > to write their status to and which are writing files which
10 >> > their results on a headless computer (beaglebone).
11 >> >
12 >> > I tried things like
13 >> >
14 >> > my_program -o file.txt -parameter value > /dev/null &2>&1 &
15 >> >
16 >> > but this results in a idle copy of this process and a defunct
17 >> > child.
18 >> >
19 >> > The program does not use X11 in any way...
20 >> >
21 >> > Is there any neat trick to accomplish what I am trying to do here?
22 >> >
23 >> > Thank you very much in advance for any help!
24 >> > Best regards,
25 >> > mcc
26 >> >
27 >> >
28 >> >
29 >>
30 >> I would suggest to run the program in a screen session, you can disconnect
31 >> frim the session and reconnect later.
32 >>
33 >> http://www.gnu.org/software/screen/
34 >>
35 >> --
36 >> Best regards
37 >> Randolph Maaßen
38 >
39 > Hi Randolph,
40 >
41 > ...the headless device will be booted and the programm will be startet
42 > via a kind of autostart script. No human intervention is
43 > wanted/possible...
44
45 This is possilble with screen. yust start a screen session in your script
46 screen -dmS "SessionName"
47 and run the program you want
48 screen -S "SessionName" -p 0 -X stuff "$program\n"
49 where -p gives the screen window number
50
51 >
52 > Best regards,
53 > mcc
54 >
55 >
56 >
57
58
59
60 --
61 Mit freundlichen Grüßen / Best regards
62
63 Randolph Maaßen