Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

lancement automatique d'un programme nécessitant un terminal

7 réponses
Avatar
Prego Jérémy
bonjour,

je cherche une technique pour lancer un programme (skcmd) qui =C3=A0 beso=
in=20
d'un terminal pour son lancement, sans devoir ouvrir un terminal, faire=20
"skcmd.py s&" et exit le terminal.

ce que j'ai essay=C3=A9:
avec nohup: probl=C3=A8me d'encodage donc le programme ne se lance pas.

merci de votre aide si vous avez une id=C3=A9e pas trop lourde.

j'utilise l'environnement mate.

joyeuses f=C3=AAtes =C3=A0 vous.
jerem

7 réponses

Avatar
Bernard Schoenacker
Le Mon, 28 Dec 2015 11:56:11 +0100,
Prego Jérémy a écrit :

bonjour,

je cherche une technique pour lancer un programme (skcmd) qui à
besoin d'un terminal pour son lancement, sans devoir ouvrir un
terminal, faire "skcmd.py s&" et exit le terminal.

ce que j'ai essayé:
avec nohup: problème d'encodage donc le programme ne se lance pas.

merci de votre aide si vous avez une idée pas trop lourde.

j'utilise l'environnement mate.

joyeuses fêtes à vous.
jerem




bonjour,

pourrais tu essayer avec uxterm (xterm) ?

slt
bernard
Avatar
Bernard Schoenacker
Le Mon, 28 Dec 2015 12:49:44 +0100,
Dominique Dumont a écrit :

Le lundi 28 décembre 2015, 11:56:11 11:56:11 Prego Jérémy a écrit :
> je cherche une technique pour lancer un programme (skcmd) qui à
> besoin d'un terminal pour son lancement, sans devoir ouvrir un
> terminal, faire "skcmd.py s&" et exit le terminal.

Essaye

tmux new-session 'skcmd.py ' ; detach &

HTH



bonjour,

j'ai repris la doc en ligne :

http://wiki.vinuxproject.org/skcmd

Usage

Now, to use skcmd, you need to run the daemon, as regular user:

skcmd.py s


reste à voir si avec tmux ça passe ...

slt
bernard
Avatar
Dominique Dumont
Le lundi 28 décembre 2015, 11:56:11 11:56:11 Prego Jérémy a écr it :
je cherche une technique pour lancer un programme (skcmd) qui à bes oin
d'un terminal pour son lancement, sans devoir ouvrir un terminal, fai re
"skcmd.py s&" et exit le terminal.



Essaye

tmux new-session 'skcmd.py ' ; detach &

HTH
--
https://github.com/dod38fr/config-model/ -o- http://search.cpan.org/~dd umont/
http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.o rg
Avatar
Prego Jérémy
Le 28/12/2015 12:58, Bernard Schoenacker a écrit :
Le Mon, 28 Dec 2015 12:49:44 +0100,
Dominique Dumont a écrit :

Le lundi 28 décembre 2015, 11:56:11 11:56:11 Prego Jéré my a écrit :
je cherche une technique pour lancer un programme (skcmd) qui à
besoin d'un terminal pour son lancement, sans devoir ouvrir un
terminal, faire "skcmd.py s&" et exit le terminal.



Essaye

tmux new-session 'skcmd.py ' ; detach &

HTH


bonjour,

j'ai repris la doc en ligne :

http://wiki.vinuxproject.org/skcmd

Usage

Now, to use skcmd, you need to run the daemon, as regular user:

skcmd.py s


reste à voir si avec tmux ça passe ...



non ça ne passe pas. :( enfin plus précisément, ça pa sse si je rentre la
commande dans un terminal. mais pas dans le alt f2 par exemple ...

malheureusement, je crain que ça ne soit pas possible de faire autre ment
...
mais si vous avez d'autres idées, j'écoute !
jerem
slt
bernard

Avatar
Belaïd
--089e011830662906ff0527f4359b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Bonjour,
Donc quand la commande est lancée dans un émulateur de terminal ( exemple
xterm) ça fonctionne mais pas quand elle est exécutée dans u n terminal
virtuel (alt+f2) ?
Le 28 déc. 2015 13:07, "Prego Jérémy" net> a écrit :



Le 28/12/2015 12:58, Bernard Schoenacker a écrit :

Le Mon, 28 Dec 2015 12:49:44 +0100,
Dominique Dumont a écrit :

Le lundi 28 décembre 2015, 11:56:11 11:56:11 Prego Jérémy a écrit :

je cherche une technique pour lancer un programme (skcmd) qui à
besoin d'un terminal pour son lancement, sans devoir ouvrir un
terminal, faire "skcmd.py s&" et exit le terminal.



Essaye

tmux new-session 'skcmd.py ' ; detach &

HTH



bonjour,

j'ai repris la doc en ligne :

http://wiki.vinuxproject.org/skcmd

Usage

Now, to use skcmd, you need to run the daemon, as regular user:

skcmd.py s


reste à voir si avec tmux ça passe ...




non ça ne passe pas. :( enfin plus précisément, ça pa sse si je rentre la
commande dans un terminal. mais pas dans le alt f2 par exemple ...

malheureusement, je crain que ça ne soit pas possible de faire autre ment
...
mais si vous avez d'autres idées, j'écoute !
jerem

slt
bernard








--089e011830662906ff0527f4359b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir="ltr">Bonjour,<br>
Donc quand la commande est lancée dans un émulateur de terminal ( exemple xterm) ça fonctionne mais pas quand elle est exécuté e dans un terminal virtuel (alt+f2) ?</p>
<div class="gmail_quote">Le 28 déc. 2015 13:07, &quot;Prego J érémy&quot; &lt;<a href="mailto:">jerem </a>&gt; a écrit :<br type="attribution"><bl ockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px # ccc solid;padding-left:1ex"><br>
<br>
Le 28/12/2015 12:58, Bernard Schoenacker a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1p x #ccc solid;padding-left:1ex">
Le Mon, 28 Dec 2015 12:49:44 +0100,<br>
Dominique Dumont &lt;<a href="mailto:" target="_blank">do </a>&gt; a écrit :<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1p x #ccc solid;padding-left:1ex">
Le lundi 28 décembre 2015, 11:56:11 11:56:11 Prego Jérémy a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1p x #ccc solid;padding-left:1ex">
je cherche une technique pour lancer un programme (skcmd) qui à<br>
besoin d&#39;un terminal pour son lancement, sans devoir ouvrir un<br>
terminal, faire &quot;skcmd.py s&amp;&quot; et exit le terminal.<br>
</blockquote>
  Essaye<br>
<br>
   tmux new-session &#39;skcmd.py &#39; ; detach &amp;<br>
<br>
HTH<br>
</blockquote>
bonjour,<br>
<br>
j&#39;ai repris la doc en ligne :<br>
<br>
<a href="http://wiki.vinuxproject.org/skcmd" rel="noreferrer" target= "_blank">http://wiki.vinuxproject.org/skcmd</a><br>
<br>
Usage<br>
<br>
Now, to use skcmd, you need to run the daemon, as regular user:<br>
<br>
skcmd.py s<br>
<br>
<br>
reste à voir si avec tmux ça passe ...<br>
</blockquote>
<br>
non ça ne passe pas. :( enfin plus précisément, ça pass e si je rentre la commande dans un terminal. mais pas dans le alt f2 par ex emple ...<br>
<br>
malheureusement, je crain que ça ne soit pas possible de faire autreme nt ...<br>
mais si vous avez d&#39;autres idées, j&#39;écoute !<br>
jerem<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1p x #ccc solid;padding-left:1ex">
slt<br>
bernard<br>
<br>
</blockquote>
<br>
</blockquote></div>

--089e011830662906ff0527f4359b--
Avatar
David Hannequin
--Apple-Mail=_0ACA3D36-9BA0-4726-887C-86603082E6FA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=windows-1252

Bonjour,

Pourquoi tu ne crée pas un service qui se lance au démarrage ? C’est la solution la plus élégante ^^…

Tu peux faire un script systemd comme ci dessous :
—%--—%--—%--—%--—%--—%--—%--—%--—%--—%--
[Unit]
Description=Skcmd
After=syslog.target

[Service]
Type=forking
ExecStart=/usr/sbin/skcmd.py -s

[Install]
WantedBy=multi-user.target
—%--—%--—%--—%--—%--—%--—%--—%--—%--—%—

ou alors sysV selon comment tu as installé ta Debian.

Bonne journée

--Apple-Mail=_0ACA3D36-9BA0-4726-887C-86603082E6FA
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJWgTKBAAoJEJL8iWZZfn/YO38H/jgRASqbkLLezeX3PKEf/pZl
dh1FSuAOD8mkHoZt5lI1DbbOnjY4UGgY0w/Vloz7wYBcvc5/i9JDrHHF+SsOVLhr
Yq+fWrt00eOhD1NymB1mhHQ/uv94BNQAsdLbK+hIruggVxVJb78TmWKwP0SEAkMF
87e1slr3gyo0FwaFkwVs5pNp58UjY3XCk1EHCVpfLvgZfvlXEOrZNGuxD3+5LIWs
3s8cok0bKKhjGMgMW4G6xFq6Fhb0dlsxVIYmyh63isBJYmqtWQ1rcO38IAzQ09dy
OCzr4KKGo+mPm4Z6ZKTYnYD71zLyi392HvE3pg1eYBKPfsu0Ww7IqZZsA/heN0o my9
-----END PGP SIGNATURE-----

--Apple-Mail=_0ACA3D36-9BA0-4726-887C-86603082E6FA--
Avatar
David Hannequin
--Apple-Mail=_6AA4F8D8-DC20-4A0B-A8D5-3CACD0A1146F
Content-Type: multipart/alternative;
boundary="Apple-Mail=_7DE60EC2-35E3-4BCE-8A4C-29CE69D0F64C"


--Apple-Mail=_7DE60EC2-35E3-4BCE-8A4C-29CE69D0F64C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=windows-1252

Pour complément d’information -> https://wiki.debian.org/fr/systemd

De cette manière tu peux démarrer/arrêter le programme quand tu veux et en plus en cas d’erreur tu as une trac dans des fichiers journaux.

A++

--Apple-Mail=_7DE60EC2-35E3-4BCE-8A4C-29CE69D0F64C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=windows-1252

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Pour complément d’information -&gt;&nbsp;<a href="https://wiki.debian.org/fr/systemd">https://wiki.debian.org/fr/sys temd</a>&nbsp;<div><br></div><div>De cette manière tu peux démarrer/arrêter le programme quand tu veux et en plus en cas d’erreur tu as une trac dans des fichiers journaux.</div><div><br></div><div>A++</div></body></html>
--Apple-Mail=_7DE60EC2-35E3-4BCE-8A4C-29CE69D0F64C--

--Apple-Mail=_6AA4F8D8-DC20-4A0B-A8D5-3CACD0A1146F
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJWgTRVAAoJEJL8iWZZfn/YBKgIAIXUvatbmzogqS0q07F4snEe
l5i7hd9CDk6ote17l7wGE21bwT1/vhC546pYg1PMomZOD7qmFdRw27V5wOqF54tj
nVb6HlJYp7yDvW7c6tVIw2gGyoilbeJRsHNqEJ1ePjWSusDoUL80dNUZxrGwYIaL
BQ9LQbTRZED6/tXcmUlOM9uQAT2E8e4bgoJHPvp5E8863oF9zJAw+0txZI2p1k+3
joIijQYIkQt/TGKKJSE/oSwUXi4Da3ziFowEMgFGDechrdCL9VIpGEGqq6caiIHc
1+jFBqGGkNPRZCgwKY+eghnxzH6FOIfkvWh/RgUAzZtntV4Bd2xnUsFzwzw1ZJM =GWPO
-----END PGP SIGNATURE-----

--Apple-Mail=_6AA4F8D8-DC20-4A0B-A8D5-3CACD0A1146F--