← Back to team overview

torios-dev team mailing list archive

Re: [Torios] Reboot Dialog Was:(Re: Plymouth Theme)

 

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


tester@torios ~ $ chmod ugo+x torios-reboot
tester@torios ~ $ ./torios-reboot 

(zenity:4005): Gtk-WARNING **: Unknown key gtk-toolbar-size in /home/tester/.config/gtk-3.0/settings.ini
Reboot
./torios-reboot: line 14: dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart: No such file or directory
tester@torios ~ $ 


Follow ups

References