How to "restart" ROX without restarting X? (Solved)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

How to "restart" ROX without restarting X? (Solved)

#1 Post by Argolance »

Bonjour,
Question: I made a script which prompts user to restart X for new ROX options to take effect. I would like to know if it is possible to "kill" the ROX process properly and run it again to make these new options working immediately, without restarting X and obviously, getting any problem (while other applications are eventually running and so on)...
Thank you for your attention.

Cordialement.
Last edited by Argolance on Wed 19 Jun 2013, 21:40, edited 1 time in total.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

# trap -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
18 ) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN

# pidof ROX-Filer
31403

# kill -19 31403
# kill -18 31403
:?:

# kill -1 31403
# rox -p /root/Choices/ROX-Filer/PuppyPin

Works for me .

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#3 Post by Argolance »

Bonsoir,
Thank you!

Cordialement.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#4 Post by ASRI éducation »

Argolance wrote:Bonsoir,
Thank you!

Cordialement.
@ Argolance
Cela permettrait d'ajouter un raccourci sur le bureau lors d'une installation, sans avoir à relancer X.
J'imagine que tu as testé. Alors, quel résultat ?

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#5 Post by Argolance »

Bonjour,
ASRI wrote:Cela permettrait d'ajouter un raccourci sur le bureau lors d'une installation, sans avoir à relancer X
J'imagine que tu as testé. Alors, quel résultat ?.
Le but recherché était d'intégrer la commande directement dans un script et par là d'épargner à l'utilisateur un redémarrage du serveur X. Ces commandes fonctionnent, c'est pourquoi j'ai étiqueté ce fil comme "SOLVED" mais, pour moi, cela introduisait d'autres complications qui font que j'ai (provisoirement) renoncé... :oops:

Cordialement.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#6 Post by ASRI éducation »

Argolance wrote:Bonjour,
ASRI wrote:Cela permettrait d'ajouter un raccourci sur le bureau lors d'une installation, sans avoir à relancer X
J'imagine que tu as testé. Alors, quel résultat ?.
Le but recherché était d'intégrer la commande directement dans un script et par là d'épargner à l'utilisateur un redémarrage du serveur X. Ces commandes fonctionnent, c'est pourquoi j'ai étiqueté ce fil comme "SOLVED" mais, pour moi, cela introduisait d'autres complications qui font que j'ai (provisoirement) renoncé... :oops:

Cordialement.
De mon côté, je recherche le moyen d'ajouter des raccourcis sur le bureau, lors d'installation de paquets et/ou d'activation de scripts sans avoir à relancer X.
J'avais une solution simple et fonctionnelle que j'avais ajoutée à un ancien paquet qui est mort avec mon ancien disque dur. :?
Depuis, j'ai testé la solution de musher0, mais cela ne me convient pas.
Je vais prochainement reprendre mes recherches.
Cordialement,

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Hi / Salut, argolance.

Which options of ROX are your speaking of? / De quelles options de ROX parles-tu ?

Voici une solution proposée par l'auteur : / Here is a solution proposed by the author:
http://rox.sourceforge.net/desktop/book ... l/181.html
Second-to-last paragraph, last sentence / Avant-dernier paragraphe, dernière phrase :
You can just restart ROX by killing the ROX-Filer process : under Linux, use killall ROX-Filer and restart it.
Trad. :
"Il vous suffit de redémarrer ROX en trucidant le processus ROX-Filer : sous Linux, utilisez "killall ROX-Filer" et redémarrez-le."

Karl te dit de faire sensiblement la même chose... / Karl is telling you to do basically the same thing.

A plus. / TWYL.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

@argolance:
> J'avais une solution simple et fonctionnelle que j'avais ajoutée à un ancien paquet qui est mort avec mon ancien disque dur.

Euh, tu as créé un utilitaire exprès pour TooPy, il me semble... C'est celui-là que tu as perdu? Parce que tu avais déjà ta solution, tu m'avais même fait enlever ou désactivé le petit script que j'avais créé pour placer l'icône "Boutique" au milieu du punaiseur (pour les scripts d'utilitaires micro-entreprise).

C'est pas une critique du tout. Je te rappelle simplement que tu as 2 solutions à ta disposition, la tienne et la mienne, et qu'elles n'ont pas été "enterrées" avec le décès de ton disque dur, car elles sont forcément en ligne quelque part ! :)

En espérant que le dernier paragraphe a fait baisser ton niveau d'anxiété ! ;)

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#9 Post by Argolance »

J'avais une solution simple et fonctionnelle que j'avais ajoutée à un ancien paquet qui est mort avec mon ancien disque dur.
C'est pô moi m'sieur, c'est ASRI qui l'a dit! :D

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#10 Post by ASRI éducation »

Argolance wrote:
J'avais une solution simple et fonctionnelle que j'avais ajoutée à un ancien paquet qui est mort avec mon ancien disque dur.
C'est pô moi m'sieur, c'est ASRI qui l'a dit! :D
Exact.
musher0 wrote:@argolance:
> J'avais une solution simple et fonctionnelle que j'avais ajoutée à un ancien paquet qui est mort avec mon ancien disque dur.

Euh, tu as créé un utilitaire exprès pour TooPy, il me semble... C'est celui-là que tu as perdu? Parce que tu avais déjà ta solution, tu m'avais même fait enlever ou désactivé le petit script que j'avais créé pour placer l'icône "Boutique" au milieu du punaiseur (pour les scripts d'utilitaires micro-entreprise).

C'est pas une critique du tout. Je te rappelle simplement que tu as 2 solutions à ta disposition, la tienne et la mienne, et qu'elles n'ont pas été "enterrées" avec le décès de ton disque dur, car elles sont forcément en ligne quelque part ! :)

En espérant que le dernier paragraphe a fait baisser ton niveau d'anxiété ! ;)

musher0
Salut musher0 !
C'est vrai que j'avais un paquet qui intégrait l'ajout d'un raccourci sur le bureau, hélas le paquet étant à un stade beta, je ne l'avais pas enligné (aucune sauvegarde n'existe).
Depuis, je n'ai jamais retrouvé un moyen simple d'ajouter un raccourci sur le bureau lors de l'installation d'un paquet (via le pinstall).
Je crois que je vais à nouveau tester ta solution.
Cordialement,

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#11 Post by musher0 »

Allô, ASRI.

Désolé, argolance, de t'avoir confondu avec ASRI !

Je vais remettre en ligne mon paquet "micro-entreprise", qui contient le script pour ajouter une icône, et mettre ici un "tiré-à-part" du script en question. Comme ça ce sera plus simple à retrouver pour tout le monde.

C'est pas bien malin à faire si tu suis le modèle présenté dans n'importe quel "PuppyPin".

On conserve les 2-3 premières lignes pour le fond d'écran;
on ajoute les icônes à la suite en suivant le modèle offert par PuppyPin;
on conclut en collant les 2-3 lignes obligatoires de la fin.

Ça se fait avec cat, tail et head. (Je cite de mémoire, car je suis sur mon ordi de production, pas sur celui de développement.)

À demain !

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#12 Post by greengeek »

musher0 wrote:Voici une solution proposée par l'auteur : / Here is a solution proposed by the author:
Hi musher...thanks for your translation throughout this post. My schoolboy french is long forgotten and it is nice to be able to follow the thread a little. I really need to brush up my skills - i often see things in the francophone side of the forum that I want to understand but see too many long words that we did not learn at school... :-)

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#13 Post by ASRI éducation »

@ greengeek
This is often the same for us.
It is not always easy to understand English, it is much less easy to speak in understandable English.
It is for this reason that we often use the French language.
Fortunately, musher0 is bilingual.
Cordialement,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#14 Post by greengeek »

Bien sur. Je comprend!

I need to find my old school textbooks and skill up! :-)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#15 Post by musher0 »

greengeek wrote:
musher0 wrote:Voici une solution proposée par l'auteur : / Here is a solution proposed by the author:
Hi musher...thanks for your translation throughout this post. My schoolboy french is long forgotten and it is nice to be able to follow the thread a little. I really need to brush up my skills - i often see things in the francophone side of the forum that I want to understand but see too many long words that we did not learn at school... :-)
Hi, greengeek.

Thanks for the thanks!

Since, sadly :(, I'm not always present on the Puppy BBS, here is a good
site that provides more precise automatic translation than Google's:

http://www.reverso.net/text_translation.aspx?lang=FR
(French interface)

http://www.reverso.net/text_translation.aspx?lang=EN
(interface in English)

The translation will still be a bit jumbled (like verbs in the wrong place),
but the end result is much better than what the Google service offers,
and it might save you taking a refresher course!

Among translators, it's bit of a professional joke to have a couple of
sentences translated by Google and then compare it with what it should
have been. It never fails to get a laugh.

Not so with reverso. They no doubt have better algorithms to analyze and
synthetize language.

Reverso provides the service in several other languages too, so it might
allow you to access the German or Spanish sides of this forum as well.

BTW, I hold no shares in reverso. I just happen to know this from my
years of experience as a translator and also from recommendations
by colleagues.

BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#16 Post by musher0 »

@ASRI

Chose promise, chose due !

Voici le script pour ajouter l'icône "boutique" sur le bureau.

Pas de souci, ça marchera pas chez toi ! :lol: Car les fichiers mentionnés
aux variables F et G ne sont pas inclus. Mais remplace ces fichiers par les
tiens et qui sait... ?

L'intèrêt de le joindre ici est de donner un exemple de comment on peut faire.

À noter que, pour que ça marche, il faut "retravailler" trois fichiers :
  • /root/Choices/ROX-Filer/PuppyPin
    /root/.config/rox.sourceforge.net/ROX-Filer/globicons
    /root/Choices/ROX-Filer/globicons


A+

musher0

Code: Select all

#!/bin/sh
# ~/my-applications/ae/ajouter1icone.sh
# En plus de l'ajout d'icône à PuppyPin, ce script est 
# aussi un exercice en maximum de variables ! Désolé ! (:-)
# (c) musher0, mi-avril 2013.
####

# 0) Variables
declare -a rep=('/root/Choices/ROX-Filer/' '/root/.config/rox.sourceforge.net/ROX-Filer')
Z="globicons"
P="PuppyPin"
#
A="cp -f $Z $Z.bkp"
B="let x=\"`wc -l $Z | cut -d' ' -f1`\""
C="let y=\"`expr $x - 1`\" >/dev/null 2>&1"
D="glbcns1"
E="head -n $y $Z > "
F="echo \"<rule match=\"/root/my-applications/ae/GP.sh\">\" >>" 
G="echo \"<icon>/usr/share/pixmaps/shop-icon.png</icon>\" >>"
H="echo \"</rule>\" >>" 
I="echo \"</special-files>\" >>"
J="mv $D $Z"
K="unset x"
L="unset y"

# 1a) Aller au répertoire 0
cd ${rep[0]}
cp -f $P $P.bkp

# 1b) Ajouter la commande au punaiseur
let x="`wc -l PuppyPin | cut -d' ' -f1`"
let y="`expr $x - 1`"
head -n $y $P > pun1
echo "  <icon x=\"96\" y=\"64\" label=\"Gestion m.-e.\">/root/my-applications/ae/GP.sh</icon>" >> pun1
echo "</pinboard>" >> pun1
mv pun1 $P
$K
$L

# 2) Associer l'icone de la commande dans ~/Choices/ROX-Filer/globicons
$A
#
$B
$C
$E $D >/dev/null 2>&1
$F $D >/dev/null 2>&1
$G $D >/dev/null 2>&1
$H $D >/dev/null 2>&1
$I $D >/dev/null 2>&1
$J
$K
$L

# 3a) Aller au répertoire 1
cd ${rep[1]}

# 3b) Associer l'icone de la commande dans 
# ~/.config/rox.sourceforge.net/ROX-Filer/globicons
$A
#
$B
$C
$E $D >/dev/null 2>&1
$F $D >/dev/null 2>&1
$G $D >/dev/null 2>&1
$H $D >/dev/null 2>&1
$I $D >/dev/null 2>&1
$J
$K
$L

# 4) Réafficher le punaiseur
rox -p=/root/Choices/ROX-Filer/PuppyPin

### 30 ###
Attachments
ajouter1icone.sh.zip
Script ci-dessus, zippé.
(1.05 KiB) Downloaded 109 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply