Tech Support banner

Status
Not open for further replies.
1 - 11 of 11 Posts

·
Registered
Joined
·
5 Posts
Discussion Starter #1
Afternoon all,

I run an Ubuntu box as a SAMBA server, sharing my media collection. (recently upgraded to Ununtu 9.10)

I have configured the server for WOL, so that it automatically goes into an S3 state when there is no network activity and can be woken from this by sending a magic packet from any of my client machines.

What I'd like to achieve is the automatic sending of a magic packet whenever I try to open any media on the server using my HTPC (mediaportal frontend running on Win7 Pro). I currently have it set up so that I can just run a batch file to send the packet before trying to access the media, however this means having to minimise MP and execute a batch file manually before going back into MP and opening the media. I'd like to automate this in some way, so that the batch file is automatically executed (or the packet send is initiated in some other way) whenever the system tries to access any files on the SAMBA share (mapped as a network drive).

I'm sure that it will be possible, but my brain really isn't engaging today...think that half bottle of Southern Comfort last night may have something to do with it, lol.

Any suggestions would be greatly appreciated.

Cheers,

Marc
 

·
Administrator, Manager, Microsoft Support, Acting
Joined
·
34,380 Posts
Afternoon all,

I run an Ubuntu box as a SAMBA server, sharing my media collection. (recently upgraded to Ununtu 9.10)

I have configured the server for WOL, so that it automatically goes into an S3 state when there is no network activity and can be woken from this by sending a magic packet from any of my client machines.

What I'd like to achieve is the automatic sending of a magic packet whenever I try to open any media on the server using my HTPC (mediaportal frontend running on Win7 Pro). I currently have it set up so that I can just run a batch file to send the packet before trying to access the media, however this means having to minimise MP and execute a batch file manually before going back into MP and opening the media. I'd like to automate this in some way, so that the batch file is automatically executed (or the packet send is initiated in some other way) whenever the system tries to access any files on the SAMBA share (mapped as a network drive).

I'm sure that it will be possible, but my brain really isn't engaging today...think that half bottle of Southern Comfort last night may have something to do with it, lol.
Any suggestions would be greatly appreciated.

Cheers,

Marc
Hi Marc. . .

That is the problem...... you need to finish the other 1/2 !

I'm following most of what you wrote, but got lost with what it is the batch file precisely does. Can you provide a line or two if you think it would be helpful?

Regards. . .

jcgriff2

.
 

·
Registered
Joined
·
5 Posts
Discussion Starter #3
Hi jcgriff2,

The batch file just executes an *.exe file.

Code:
START "C:\svrtools\wol.exe"
EXIT
That exe file is a small application which fires off a "magic" udp packet to the server telling it to wake up.

Hope this helps...and I think you're right about the other 1/2 bottle...at least it would numb this heacache :laugh:

Cheers,

Marc
 

·
Registered
Joined
·
5 Posts
Discussion Starter #5
I just want to automate it, so that as soon as the system tries to access a file on the network share the batch file is run, as otherwise the system will return an error that the network share cannot be accessed, because the server will still be in S3.

Other than automating it, the batch and application run fine and do exactly what they're intended for. :)

Cheers!
 

·
Administrator, Manager, Microsoft Support, Acting
Joined
·
34,380 Posts

·
Administrator, Manager, Microsoft Support, Acting
Joined
·
34,380 Posts
I run an Ubuntu box as a SAMBA server, sharing my media collection. (recently upgraded to Ununtu 9.10)
... can be woken from this by sending a magic packet from any of my client machines.
Is the media collection being shared with those in your household/ office.... or are the client machines on the outside?

Either way, have you thought through the potential disaster that may occur if bad code somehow were to get into the batch script? I'm sure you can see the problem that may exist here.

JC

.
 

·
Registered
Joined
·
5 Posts
Discussion Starter #8
All clients are internal. :) It's just a means to share my media collection (DVD rips, MP3's etc.) with my HTPC and other systems.

I'll take a look at Task Scheduler now. I know that it can be triggered by an event, but wasn't sure that the "event" could be something as simple as accessing a file within a certain location (ie. any file found within Z:)

Thanks for your help, I'll let you know how I get on with it. ;)
 

·
Registered
Joined
·
5 Posts
Discussion Starter #10
Good Luck. That is a nice setup you have, btw.
Thanks, and thanks. :grin:

I've just been playing with Task Scheduler and have figured out how to schedule a task based on a logged event, however I'm not sure whether mediaportal trying to access a file on the server would be logged, or if so where it would be logged?

Thinking about it, the HTPC also goes into S3 when idle for more than 30 mins, so I could probably just set a schedule to run the batch every time the system resumes? If I set the suspend time on the server to the same then there should never be an overlap.
 

·
Registered
Joined
·
1 Posts
I'm curious if you ever found a solution for this?

I have a main computer that acts as my main pc as well as my server, I then also have several computers throughout the house as well as laptops. If I turn off Magic Packet my computer only sleeps for 10-20 seconds before waking up. I'd like to configure the other computers to send a wake up packet ie. when trying to access data or media from the computer. Hope it was doable, I'm pullin my hair out.
 
1 - 11 of 11 Posts
Status
Not open for further replies.
Top