torios-dev team mailing list archive
-
torios-dev team
-
Mailing list archive
-
Message #00193
Re: [Torios] Reboot Dialog Was:(Re: Plymouth Theme)
Hi again Israel,
I should also mention, that I have never messed with dbus - but I think
the error is the quotes in line 14:
so please change
"${SHUTDOWN}"
to
${SHUTDOWN}
Best regards
Nio
Den 2015-05-11 07:59, Nio Wiklund skrev:
> Den 2015-05-11 07:09, Israel skrev:
>> On 05/11/2015 12:01 AM, Nio Wiklund wrote:
>>> Hi Israel and Jack,
>>>
>>> Please tell me with details, what I should look for. I don't understand
>>> what is the problem.
>>>
>>> Best regards
>>> Nio
>>>
>>> Den 2015-05-11 02:49, Israel skrev:
>>>> ...
>>>
>> Hi,
>> I will post the code here, and attach it as well.
>> Maybe it will be easy to spot if there is an error......
>> I did fix one typo, so it may be fully working (I hope so)
>> But maybe I am missing something else...
>>
>>
>> #!/bin/bash
>> if [ ! -z "$(which dbus-send)" ]
>> then
>> SHUTDOWN="dbus-send --system --print-reply
>> --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager
>> org.freedesktop.ConsoleKit.Manager.Restart"
>> else
>> SHUTDOWN="xterm -e 'sudo reboot'"
>> fi
>>
>> if [ ! -z "$(which zenity)" ]
>> then
>> zenity --question --title="Restart" --text="Restart?"
>> case $? in
>> 0) echo "Reboot"
>> "${SHUTDOWN}"
>> ;;
>> 1) exit 1;;
>> -1) exit 2;;
>> esac
>> else
>> if [ ! -z "$(which gxmessage)" ]
>> then
>> MESSAGE="$(which gxmessage) -borderless"
>> else
>> if [ ! -z "$(which xmessage)" ]
>> then
>> MESSAGE=xmessage
>> else
>> xterm -e "echo Reboot; ${SHUTDOWN}"
>> fi ## XMESSAGE
>> fi ## GXMESSAGE
>>
>> $MESSAGE -nearmouse -buttons "Yes:3,No:4" -name "Restart" "Restart?"
>> case $? in
>>
>> 3) echo "Reboot"
>> "${SHUTDOWN}"
>> ;;
>>
>> *) echo "Not restarting"
>> ;;
>>
>> esac
>>
>> fi ## zenity
>>
>>
>
> Hi Israel,
>
> I get the error output in the attached file when I try 'torios-reboot'
> in the installed system (and it does not reboot).
>
> Best regards
> Nio
>
>
References