SliTaz SliTaz Forum

You are not logged in.

#1 2012-07-22 11:00:09

MatthGyver
Member
Registered: 2012-07-16
Posts: 5

Logon script and CPU charge

Hi,

I've a strange problem. I've made a little script to display an interface with Yad at logon and when I launch it automatically it take 80% of my CPU !

If I run it directly with a terminal it take less than 2 %.

For launch it at logon I had put a line (/path/to/script.sh <param>) into ~/.config/openbox/autostart.sh file.

My script on pastebin -> http://pastebin.com/pYVuEH6e

Have you an idea or a solution please.

Thank's in advance & sorry for my bad english

Offline

#2 2012-07-23 09:30:05

MatthGyver
Member
Registered: 2012-07-16
Posts: 5

Re: Logon script and CPU charge

I think that's a Yad bugg with list option.

If I remove my list I've no problem.

When I launch my script over a terminal I've some problems with my keyboard after I've close it. For exemple I can't type password after su . My terminal type "enter" automaticly when password prompt apear. I've some problems with vi too ...

Offline

#3 2012-07-23 09:55:12

MatthGyver
Member
Registered: 2012-07-16
Posts: 5

Re: Logon script and CPU charge

OK I found the origin of my problem. It was a syntax problem :

I've :

[c]

    action=$(yad --window-icon="gtk-home" --height "225" --width "300" --skip-taskbar --title "Panneau de contrôle" \

             --text "<big><b>Choisissez une action :</b></big>" --list \

             --column="Connexion" --no-headers \

             "Connexion automatique" \

             "Connexion au serveur principal" \

             "Connexion au serveur de secours" \

             "Redémarrer le terminal" \

             "Eteindre le terminal")

[/c]

But the good syntax is :

[c]

      action=$(

        ( echo "Connexion automatique"

        echo "Connexion au serveur principal"

        echo "Connexion au serveur de secours"

        echo "Redémarrer le terminal"

        echo "Eteindre le terminal" ) | yad --window-icon="gtk-home" --height "215" --width "300" --skip-taskbar --title "Panneau de contrôle" \

             --text "<big><b>Choisissez une action :</b></big>" --list --no-headers \

             --column="Connexion" \

             )

[/c]

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]