Page 1 of 1

Quit button in Console.

PostPosted: Sun Oct 23, 2011 7:30 pm
by pteeson
It would be convenient to have a Quit button in the Console so that the serviio process could be terminated.
At the moment I stop it and then have to Force Quit it using the Activity Monitor (for example).
Why do I bother to Force Quit? I suppose because I must be a bit obsessive.
We hardly watch TV at all and for movies only usually on the weekends and then only rarely.
I think of serviio as an app which I start and then quit when I'm done.

So a Quit button would be nice, pretty please.

Peter

Re: Quit button in Console.

PostPosted: Sun Oct 23, 2011 8:08 pm
by zip
This functionality is already there, just right-click on the system tray icon of the Console.

Re: Quit button in Console.

PostPosted: Tue Nov 15, 2011 4:40 am
by OldManPeabody
Hey there Zip, long time fan first time poster...

I think there may be some confusion re: what 'Quit' and Exit do. Correct me if I'm wrong, but...

- From the Console itself, Quit closes just the Console; server keeps running and appears unresponsive, but it actually running just fine. Force Quit will kill it
- From the menu bar, Exit Serviio Console does the same thing
- From the menu bar, Exit Serviio closes both Console and the server

I run Serviio the same way Peter does - only when required. Peter, do you get same result when choosing Exit Serviio from the menu bar?
pHIL

Re: Quit button in Console.

PostPosted: Tue Nov 15, 2011 9:51 am
by zip
OldManPeabody wrote: - From the Console itself, Quit closes just the Console; server keeps running and appears unresponsive, but it actually running just fine. Force Quit will kill it
- From the menu bar, Exit Serviio Console does the same thing
- From the menu bar, Exit Serviio closes both Console and the server

correct

Re: Quit button in Console.

PostPosted: Mon Nov 21, 2011 1:05 am
by danzeb
Once an Exit Serviio is done then to restart the Serviio Console is a multiple step process in WindowsXP:

1. Start the Serviio Server from Start Programs Menu or run Serviio.bat
2. Start Serviio Console from the Start Progams Menu - Console does not open but a Quick Launch Icon appears
3. Start Serviio Console a second time from the Start Programs Menu or the quick launch bar and it the Console opens.

Maybe it's just my setup but I would be nice to have an icon that opens the Server and Console with one click.

Re: Quit button in Console.

PostPosted: Mon Nov 21, 2011 3:39 am
by Cerberus
danzeb wrote:Once an Exit Serviio is done then to restart the Serviio Console is a multiple step process in WindowsXP:

1. Start the Serviio Server from Start Programs Menu or run Serviio.bat
2. Start Serviio Console from the Start Progams Menu - Console does not open but a Quick Launch Icon appears
3. Start Serviio Console a second time from the Start Programs Menu or the quick launch bar and it the Console opens.

Maybe it's just my setup but I would be nice to have an icon that opens the Server and Console with one click.


just create a startup bat file that runs both the serviio bat files ;) ( Windows only )

1. Click Start
2. Click Run
3. Type: notepad and press enter.
4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

@ECHO OFF
c:
cd \program files (x86)\serviio\bin\
CALL serviio.bat
SLEEP 2
CALL serviio-console.bat
EXIT

5. Click File and click Save; browse to where you want to save the file. For the file name, type "Serviio Startup.bat", and if your version of Windows has
a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.

6. Now, to run the batch file, double-click or run the file like any other program. Once the batch file has completed running it will close the window
automatically.

...FOR 32BIT WINDOWS YOU MAY NEED TO REMOVE THE (X86) FROM THE FILE PATH...

WINDOWS XP USERS : The Sleep command doesnt work on XP so if running on XP you will need the sleep.exe file attached below, put this file in your serviio\bin\ directory.

sleep.zip
(60.72 KiB) Downloaded 524 times

Re: Quit button in Console.

PostPosted: Mon Nov 21, 2011 9:12 am
by zip
you may have to add some 'sleep' between those two to enable the REST server to start

Re: Quit button in Console.

PostPosted: Mon Nov 21, 2011 8:56 pm
by Cerberus
zip wrote:you may have to add some 'sleep' between those two to enable the REST server to start


yer im not at home to test, so if someone wants to try it and confirm i will add the sleep command if required but i dont think it will be as with the CALL command it waits until the first Bat file and finished and closed before starting the second one :) .

Re: Quit button in Console.

PostPosted: Tue Nov 22, 2011 12:13 am
by danzeb
zip wrote:you may have to add some 'sleep' between those two to enable the REST server to start


The bat file didn't work so I assume there has to be a pause or maybe there is a different problem. I can do it manually by first running Serviio.bat then waiting about 5 seconds (How do I know when the Serviio Service is started?) and then running serviio-console.bat. That gives me the Serviio Console quick launch icon. I can then click on that to finally get the console on the screen.

I would be nice to have an icon on my desktop that starts the Serviio Service and displays the Serviio Console on my screen in one click.

Re: Quit button in Console.

PostPosted: Tue Nov 22, 2011 1:28 am
by jhb50
Here are the bat files with the necessary delays on my W7-64.
You may wish to alter the delays since I understand that the 30 seconds it takes my system to start Serviio is not normal.

Re: Quit button in Console.

PostPosted: Tue Nov 22, 2011 5:11 am
by Cerberus
danzeb wrote:
zip wrote:you may have to add some 'sleep' between those two to enable the REST server to start


The bat file didn't work so I assume there has to be a pause or maybe there is a different problem. I can do it manually by first running Serviio.bat then waiting about 5 seconds (How do I know when the Serviio Service is started?) and then running serviio-console.bat. That gives me the Serviio Console quick launch icon. I can then click on that to finally get the console on the screen.

I would be nice to have an icon on my desktop that starts the Serviio Service and displays the Serviio Console on my screen in one click.


see updated post above with sleep delay added.

Re: Quit button in Console.

PostPosted: Wed Nov 23, 2011 12:43 am
by danzeb
jhb50 wrote:Here are the bat files with the necessary delays on my W7-64.
You may wish to alter the delays since I understand that the 30 seconds it takes my system to start Serviio is not normal.


I tried StartServiio.bat on a WindowsXP machine and got the following:

..
Now Starting Serviio Service and Console.....
..
This takes about 30 seconds...
..
[SC] StartService FAILED 1058:

The service cannot be started, either because it is disabled or because it has n
o enabled devices associated with it.

'CHOICE' is not recognized as an internal or external command,
operable program or batch file.
..
And 10 seconds to start the Console...
'CHOICE' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

Re: Quit button in Console.

PostPosted: Wed Nov 23, 2011 1:28 am
by danzeb
Cerberus wrote:
danzeb wrote:Once an Exit Serviio is done then to restart the Serviio Console is a multiple step process in WindowsXP:

1. Start the Serviio Server from Start Programs Menu or run Serviio.bat
2. Start Serviio Console from the Start Progams Menu - Console does not open but a Quick Launch Icon appears
3. Start Serviio Console a second time from the Start Programs Menu or the quick launch bar and it the Console opens.

Maybe it's just my setup but I would be nice to have an icon that opens the Server and Console with one click.


just create a startup bat file that runs both the serviio bat files ;) ( Windows only )

1. Click Start
2. Click Run
3. Type: notepad and press enter.
4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

@ECHO OFF
CALL C:\Program Files (x86)\serviio\bin\serviio.bat
SLEEP 1800
CALL C:\Program Files (x86)\serviio\bin\serviio-console.bat
EXIT

5. Click File and click Save; browse to where you want to save the file. For the file name, type "Serviio Startup.bat", and if your version of Windows has
a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.

6. Now, to run the batch file, double-click or run the file like any other program. Once the batch file has completed running it will close the window
automatically.

...FOR 32BIT WINDOWS YOU MAY NEED TO REMOVE THE (X86) FROM THE FILE PATH...

====================================

Thanks for the help. I'm very rusty with BATCH files.
My Windows XP didn't like the CALL C:\Program Files\serviio\bin\serviio.bat. It complained about C:\Program. Maybe it didn't like the space between Program and Files. I don't know. Also I changed Sleep 1800 to Sleep 2 (2 seconds). Some versions of windows don't have Sleep.exe so it would be necessary to download it. I put the sleep.exe file in the serviio\bin folder. The SLEEP command may not even be necessary but the following works for me with a Pentium Pro running Windows XP.

@ECHO OFF
c:
cd \program files\serviio\bin
CALL serviio.bat
SLEEP 2
CALL serviio-console.bat
EXIT

Re: Quit button in Console.

PostPosted: Wed Nov 23, 2011 1:44 am
by Cerberus
danzeb wrote:
Cerberus wrote:
danzeb wrote:Once an Exit Serviio is done then to restart the Serviio Console is a multiple step process in WindowsXP:

1. Start the Serviio Server from Start Programs Menu or run Serviio.bat
2. Start Serviio Console from the Start Progams Menu - Console does not open but a Quick Launch Icon appears
3. Start Serviio Console a second time from the Start Programs Menu or the quick launch bar and it the Console opens.

Maybe it's just my setup but I would be nice to have an icon that opens the Server and Console with one click.


just create a startup bat file that runs both the serviio bat files ;) ( Windows only )

1. Click Start
2. Click Run
3. Type: notepad and press enter.
4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

@ECHO OFF
CALL C:\Program Files (x86)\serviio\bin\serviio.bat
SLEEP 1800
CALL C:\Program Files (x86)\serviio\bin\serviio-console.bat
EXIT

5. Click File and click Save; browse to where you want to save the file. For the file name, type "Serviio Startup.bat", and if your version of Windows has
a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.

6. Now, to run the batch file, double-click or run the file like any other program. Once the batch file has completed running it will close the window
automatically.

...FOR 32BIT WINDOWS YOU MAY NEED TO REMOVE THE (X86) FROM THE FILE PATH...

====================================

Thanks for the help. I'm very rusty with BATCH files.
My Windows XP didn't like the CALL C:\Program Files\serviio\bin\serviio.bat. It complained about C:\Program. Maybe it didn't like the space between Program and Files. I don't know. Also I changed Sleep 1800 to Sleep 2 (2 seconds). Some versions of windows don't have Sleep.exe so it would be necessary to download it. I put the sleep.exe file in the serviio\bin folder. The SLEEP command may not even be necessary but the following works for me with a Pentium Pro running Windows XP.

@ECHO OFF
c:
cd \program files\serviio\bin
CALL serviio.bat
SLEEP 2
CALL serviio-console.bat
EXIT


yer i wondered if it would have that issue with winXP as it not very tollerant of spaces and Capitals. I hadnt realised that Sleep command doesnt work on XP but does work on new versions of windows so yes if running on XP you will need the sleep.exe file attached below.

ok i have edited my original post to add these changes thanks for the input danzeb :)

Re: Quit button in Console.

PostPosted: Thu Nov 24, 2011 2:51 pm
by Cerberus
ok this has now been added to the Wiki thanks for all the help testing danzeb

http://wiki.serviio.org/doku.php?id=startup_win