PMS shutdown addition

Discuss third-party additions, plugins and translations for PS3 Media Server

PMS shutdown addition

Postby HontoniLinux » Thu Nov 11, 2010 4:49 pm

PMS Shutdown addition
This is an addition to the Playstation3 Media Server core adding functionality of remote shutdown (have a look at features for details). Personally I feel this would be worthwhile integrating to the program, however if maintainers don't like this and users still want it I'll consider writing it in the form of a plugin instead.

Anyhow, here are the details:

Features:
  • Remote (via UPnP) shutdown of Windows, Mac and Linux
  • Customisable shutdown command: Change shutdown parameters/command to whatever suits you.
  • Allows user to submit password as might be required for shutdown on Linux/Mac machines (sudo)
  • Enable/disable option

Security issues:
  • There is no authentification needed from the UPnP client in order to execute a shutdown command.
  • Possibly needed computer user account password is stored as plain text as part of the configuration.
Simply put: Don't enable this the shutdown option on nuclear reactor computers or any environment in which it might be abused.

Download:

File name: ps3mediaserver+shutdown_binary.zip File size: 56.21 MB

File name: ps3mediaserver+shutdown_source_included.zip File size: 152.48 MB


Brief user guide:
  • Start program by opening the PMS.jar file in the main directory.
  • Configuration is stored under the "General Configuration" tab. Enabling, setting command and password is all done from here.
  • The shutdown is executed by opening the dummy video called "Shutdown computer" in the "#Video settings#" folder.
  • ONLY ENABLE THIS ADDITION IF YOU'RE IN AN UNTHREATENED HOME ENVIRONMENT.
  • Enjoy the software, thinking of those steps you don't have to walk to shut down your computer anymore! :D

Source code with instructions:
The work was carried out on build 412 2010-10-04T18:23:16.263731Z, use this to ensure functionality.
Quicker, less portable:
PMS_shutdown (replace corresponding files in build 412 and recompile)

More portable, although manually modifying files required
Manual code insertion (see in which files and where code was inserted and manually insert it yourself, likely to work with future releases as well).


Some design choices explained:
  • The reason I put it here is because it's treated as a "video" and as such it didn't feel worth it making a new folder with a name like System settings. Such a folder wouldn't serve any purpose to Music or Image viewing either.
  • The shutdown option is disabled by default due to previous mentioned security issues.

Possible further additional features:
Custom user commands: While it technically is possible to supply any command (i.e. non-shutdown commands) to the shutdown computer button it might be an interesting idea to allow users to dynamically add their own commands to new dummy videos.


If you have any questions or want to discuss something just reply to this thread or send me a pm.
Last edited by HontoniLinux on Mon Dec 27, 2010 2:24 am, edited 3 times in total.
HontoniLinux
 
Posts: 3
Joined: Wed Nov 10, 2010 10:08 pm

Re: PMS shutdown addition

Postby Chaoz » Sun Dec 26, 2010 9:04 pm

Can someone provide a step by step instruction on how to install this plugin?
Chaoz
 
Posts: 45
Joined: Mon Jan 19, 2009 10:26 pm

Re: PMS shutdown addition

Postby HontoniLinux » Mon Dec 27, 2010 2:13 am

Chaoz wrote:Can someone provide a step by step instruction on how to install this plugin?
Hi Chaoz.

I realised installation procedure wasn't very straight forward so I decided to upload a ready to use version, which then you just download and then run the file PMS.jar to start the program.
I updated the main post, so have a look under the download section :). Let me know if you still have problems.


Otherwise, if you want to compile it yourself, you need to use a program called apache-ant.
HontoniLinux
 
Posts: 3
Joined: Wed Nov 10, 2010 10:08 pm

Re: PMS shutdown addition

Postby Chaoz » Mon Dec 27, 2010 8:07 pm

Thanks, that works great. Is it possible to add a sleep option as well?
Chaoz
 
Posts: 45
Joined: Mon Jan 19, 2009 10:26 pm

Re: PMS shutdown addition

Postby HontoniLinux » Tue Dec 28, 2010 12:53 pm

Chaoz wrote:Thanks, that works great. Is it possible to add a sleep option as well?
Happy you got it running :).

The command "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" puts the computer into sleep mode (assuming it's windows you're using). It would be easy to implement such a feature but I'm quite tempted just allowing users to make their own custom functions instead.

Should you want the sleep option right now a "dirty fix" would be to replace the "shutdown -s -t 0" with the "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" command. That would make you only able to enter sleep mode and not shutdown though.
HontoniLinux
 
Posts: 3
Joined: Wed Nov 10, 2010 10:08 pm


Return to Additions and Plugins

Who is online

Users browsing this forum: No registered users and 8 guests