LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2011, 06:35 AM   #1
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Rep: Reputation: 0
Question WOL - Send Magic Packet


Dear Linux Godís!

As i am posting in this forum you might already have guessed that I am a total linux noob, but I am a pretty faster learner. I know a few basic things but I feel like I am stuck with my problem.

I want to send the Magic packet (wake on LAN) from my linux machine to another, but I am unsure how to approach this. I have googleíed my ass off but I am none the wiser. I found a few forums posts and programs that can do the trick and guides in how to use the programs but I have no idea how to install them.

You have to know that my linux machine is a NAS server and has therefore only Konsole access (no GUI). As I said before I am pretty much a noob at this so I am glad for any help you guys can give me

Here are two links that I have been looking at.

http://linux.die.net/man/8/ether-wake

http://wiki.tcl.tk/15423

Thank you for your time and help!
 
Old 04-01-2011, 07:46 AM   #2
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
I have a follow up question

I am trying to make sense of the guide I have linked below.
I have downloaded the udp.kit file but I am totally blank on what to do with it.


http://wiki.tcl.tk/15423
 
Old 04-01-2011, 08:46 AM   #3
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 360

Rep: Reputation: 40
Quote:
Originally Posted by GanX View Post
I have a follow up question
I am trying to make sense of the guide I have linked below.
I have downloaded the udp.kit file but I am totally blank on what to do with it.
http://wiki.tcl.tk/15423
To run tcl/tk scripts in linux you use the tclsh interpreter. The tclUDP module adds 'UDP' protocol functions into the tcl language. Put the udp.kit file in any folder in your path:

Code:
echo "$PATH"
Then make it executable:
Code:
chmod +x <path/to/udp.kit>
Now you should be able to use tclsh to run your script and it should work.

Good luck!
 
Old 04-01-2011, 08:57 AM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Look in the repositories for what ever version of Linux you are using. There is probably a package called wol. Install that. Then use

Code:
$ wol macaddress
 
1 members found this post helpful.
Old 04-01-2011, 09:10 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Welcome to LinuxQuestions
The basic steps are:
1. Activate WOL in the BIOS.
2. Turn on WOL for your adapter using ethtool utility

There are various methods to automatically configure the adapter to turn on wake on LAN:
http://www.linuxquestions.org/questi...l-work-712283/

There are many apps that send magic packets. wol, wakeonlan are the ones I use. If using the tcl script from the posted link you should use the broadcast address of your network.

Last edited by michaelk; 04-01-2011 at 09:11 AM.
 
Old 04-01-2011, 11:27 AM   #6
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks guys i will give it a try as soon as i get home

Quote:
Originally Posted by michaelk View Post
Welcome to LinuxQuestions
The basic steps are:
1. Activate WOL in the BIOS.
2. Turn on WOL for your adapter using ethtool utility

There are various methods to automatically configure the adapter to turn on wake on LAN:
http://www.linuxquestions.org/questi...l-work-712283/

There are many apps that send magic packets. wol, wakeonlan are the ones I use. If using the tcl script from the posted link you should use the broadcast address of your network.
I do know how to configure the adapter to WOL. Actually i have already used the function but only from another Windows computer. The thing is that i have a NAS server(Linux) at home that is running 24/7 and I would like to use it to turn on my workstation so i can use Remote Desktop to access it. But due to my limited knowledge of Linux I donít know how

But thanks!
 
Old 04-01-2011, 01:16 PM   #7
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by arizonagroovejet View Post
Look in the repositories for what ever version of Linux you are using. There is probably a package called wol. Install that. Then use

Code:
$ wol macaddress
I am sorry to say it but i have no idea how to do that, as i said above somewhere i am a total linux noob and i have no idea what im doing. I can get a Windows PC to flush my toilet or make me coffee if want, but you guys are the masters in linux and i am the dumb one (but im ready to learn ). So if you guys can guide me that would be great!!!
 
Old 04-01-2011, 01:23 PM   #8
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Well tell us what version of Linux you're using...
 
1 members found this post helpful.
Old 04-01-2011, 01:49 PM   #9
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by arizonagroovejet View Post
Well tell us what version of Linux you're using...
I used a the following command and i hope that's what you want to know

Code:
[~] # cat /proc/version
The output was:

Linux version 2.6.33.2 (root@NasX86-5) (gcc version 4.1.3 20070929 (prerelease)
(Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Mar 15 03:58:35 CST 2011

If this is not what you are looking for please let me know so i can find you the right answer, and again thanks for your help and patience!
 
Old 04-01-2011, 01:58 PM   #10
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Well it says Ubuntu, so that's enough. I was sort of assuming that you'd just be able to say since you'd remember from when you installed it. Anyway, in Ubuntu the package is called wakeonlan. To install from command line use

Code:
$ sudo apt-get install wakeonlan
The executable is also called wakeonlan

Code:
$ wakeonlan macaddress
You could also install the package, and lots of other packages, using Synaptic Package Manager. Look on the GNOME menus under System > Administration.
 
1 members found this post helpful.
Old 04-02-2011, 05:17 AM   #11
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by arizonagroovejet View Post
Well it says Ubuntu, so that's enough. I was sort of assuming that you'd just be able to say since you'd remember from when you installed it. Anyway, in Ubuntu the package is called wakeonlan. To install from command line use

Code:
$ sudo apt-get install wakeonlan
The executable is also called wakeonlan

Code:
$ wakeonlan macaddress
You could also install the package, and lots of other packages, using Synaptic Package Manager. Look on the GNOME menus under System > Administration.

Well i didnít know what version it is because i didnít install it, itís a QNAP NAS server and it of course comes pre-installed. Itís pretty much just a web interface i can access or the konsole of course.

I have tried what you said and i have used the apt-get command before on other linux systems but in this case it doesnít seem to work. I am pretty sure i saw somewhere that apt-get is also something you can install? (maybe my version of linux doesnít have it?).

Anyway here is what i did, and what i got in return.

Code:
[~] # sudo apt-get install wakeonlan
-sh: sudo: command not found
[~] #
 
Old 04-02-2011, 06:33 AM   #12
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Quote:
Originally Posted by GanX View Post
Well i didnít know what version it is because i didnít install it, itís a QNAP NAS server and it of course comes pre-installed. Itís pretty much just a web interface i can access or the konsole of course.
Ah. Well that could make things trickier because it's probably a stripped down customised version of Ubuntu intended to full-fill NAS functionality and little else rather than a regular Ubuntu install. These commands
Code:
$ cat /etc/lsb-release
$ cat /etc/issue
$ cat /etc/issue.net
might reveal what version of Ubuntu was used

Quote:
Originally Posted by GanX View Post
Code:
[~] # sudo apt-get install wakeonlan
-sh: sudo: command not found
[~] #
Hmmm. Try this

Code:
$ echo $UID
If that gives you an answer of 0 you're running with root privileges. If that's the case try the command I suggested again but without the sudo. If you're not running with uid 0 try

Code:
$ su -
Then put in your password and if it works, try apt-get again.


Whether you can install anything easily at all depends on whether there are any repos set up to install software from. Which there might not be. You can get a list of repos that are set up using
Code:
$ grep ^deb /etc/apt/sources.list
There might be a neater way than that but I don't know of any, I don't use Ubuntu much.
 
Old 04-02-2011, 10:35 AM   #13
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
hmm i didnt have much luck to be honest here is what i found out:

Code:
[~] # echo $UID
0
Code:
[~] # apt-get install wakeonlan
-sh: apt-get: command not found
Code:
[~] # grep ^deb /etc/apt/sources.list
grep: /etc/apt/sources.list: No such file or directory
Code:
$ cat /etc/lsb-release
$ cat /etc/issue
$ cat /etc/issue.net
I didnt get much out of the code above only one of them gave a reply as you can se below. The other two just gave me a " No such file or directory"

Code:
[~] # cat /etc/issue

Welcome to QNAP Systems Inc,. NasX86(10.0.0.10) development environment.

Thanks for not giving up on me i hope you still have some tricks up your sleeve
 
Old 04-02-2011, 12:33 PM   #14
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Well what you've found it is basically that what you're dealing with is as I suspected a stripped down customised version of Linux that's intended to provide NAS functionality and nothing else. There's mention of Ubuntu in the output you posted before but it's nothing like Ubuntu as you'd by downloading a copy from ubuntu.com. So unless you're already quite skilled in Linux, maybe not even then, there's probably not a lot you can do with it.

With devices that run striped down Linux you can sometimes find a group of people who have hacked them to get extra functionality and such. Try the QNAP website, or Google. You might find someone who has already got a wake on lan client.

The only way I can think of to get a wakeonlan client on there is to copy the relevant binaries over from another machine running a 'proper' version of Ubuntu, but I'm not sure exactly what you'd need to copy over, it depends on what's already on the NAS box.
 
Old 04-02-2011, 07:02 PM   #15
GanX
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by arizonagroovejet View Post
Well what you've found it is basically that what you're dealing with is as I suspected a stripped down customised version of Linux that's intended to provide NAS functionality and nothing else. There's mention of Ubuntu in the output you posted before but it's nothing like Ubuntu as you'd by downloading a copy from ubuntu.com. So unless you're already quite skilled in Linux, maybe not even then, there's probably not a lot you can do with it.

With devices that run striped down Linux you can sometimes find a group of people who have hacked them to get extra functionality and such. Try the QNAP website, or Google. You might find someone who has already got a wake on lan client.

The only way I can think of to get a wakeonlan client on there is to copy the relevant binaries over from another machine running a 'proper' version of Ubuntu, but I'm not sure exactly what you'd need to copy over, it depends on what's already on the NAS box.
I understand. I have already posted on the QNAP forums asking if anyone else has attempted this but i havenít got an answer yet.
I was wondering, the file you are downloading with apt-get is this something I can download ďmanuallyĒ and then copy it over? And as for the idea of doing it on another linux machine, I will try that tomorrow and see what it installs. Maybe Iím lucky and itís something thatís fairly simple to move.

Thanks for the big effort and if you should remember anything else that might help I would appreciate it allot. Anyway I will let you know how it turns out tomorrow.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending wol packet ubuntuv Linux - Networking 1 09-10-2010 08:05 PM
7.10 Server wol (wake-on-lan) via ARP (no magic packet), help? Elohist Linux - Networking 0 01-21-2008 01:02 AM
How to sent magic packet to the neighbourhood Bobymc Linux - Networking 2 06-12-2006 05:53 PM
How do I send WOL packets ? Bobymc Linux - Software 2 06-11-2006 10:01 PM


All times are GMT -5. The time now is 09:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration