![]() After saving and closing you should find you're script in the application menu under Applications->Utilities.Įxec=/bin/bash /home/$USER/.scripts/wake-pc.Start your unattended server wherever you are in the world over the internet. Touch ~/.local/share/applications/sktop & kate ~/.local/share/applications/sktopĬopy and paste these entries in the just opened file. Run this command from the terminal to do so. ![]() We make a new file in you're ~/.local/share/applications/ folder and name it sktop. desktop file to add end execute the script from you're local application menu. Then make the script executable via properties/permissions in a GUI ore execute this command. If you run a GTK desktop, install zenity from the terminal with the following command and replace the kdialog lines with 'zenity -info -text="Whatever you want to say!"'. Mkdir ~/.scripts & touch ~/.scripts/wake-pc.sh & kate ~/.scripts/wake-pc.shĬopy/paste the information from below in the new file and replace the mac and ip value's from those corresponding on you're machine. ![]() Use Gedit, not Kate, in the command if you use a Gnome/GTK desktop. Open a terminal window and execute the following command. Good and clear tutorial thank you! Saves me from running down stairs all the time :) I wrote a little "add-on" to you're tutorial to provide a easy way to execute the script (scripts in general) from the application menu, almost like it's a GUI application. Finally you can note your router’s external ip, or if you want you can use a DynamicDNS, in order to wake up your pc from outside your lan network. That is it, now you if you have a smartphone you can install the wakeonlan app and turn on your computer from anywhere. You shoud find your computer has a dynamic ip, choose “arpdelete” to remove your computer’s ip and then “arpadd” to add it as in below example │intf = LocalNetwork You will see something like that, choose “ip” and then “arplist” to see all computer which are connect to your router. Give your username and password Trying 192.168.1.254. to do that you need to connect to your router via telnet in my case my router’s ip is 192.168.1.254 telnet 192.168.1.254 Otherwise after 30 min it will refresh ips and it will not know where to send the signal. The last step is to declare a static ip and at your router. Because the setup of every router is different you must take a look here how to do that You will need to port forward the port 9 to your computer which you want to wake up. If you want to turn on your pc outside your lan network you will need to do some more steps. Now execute this command with the mac address which you noted before wakeonlan 01:02:03:04:05:06 OK now you turn off your first computer and at the second pc you will need to install this: sudo aptitude install wakeonlan You will need a second computer to wake up the first one. Save the above script and give the below command in orfer to see your mac address of your ethernet card – make sure to note the mac address. Save the file and use the sudo chmod 755 wakewol to make it executable, after that go to sudo nano /etc/network/interfacesĪnd at the end add this line post-down /usr/bin/wakewol The third step is to make a small script on the sudo nano /usr/bin/wakewol Or of you use a graphic environment go to network-manager and add a static ip if you need more information how to do this is easy to find information on the internet. The second step is to declare a static ip to your pc, that is easy you need to edit the sudo nano /etc/network/interfaces We are interested in the line that says “Supports Wake-on: g” if the end of the line is “g” that means it is support to wake up your pc if it is “d” then you will probably need to buy a new one. Supported link modes: 10baseT/Half 10baseT/FullĪdvertised link modes: 10baseT/Half 10baseT/Full The result of this command must be something like this Supported ports: To find this out install this tool: sudo aptitude install ethtool Before you do anything you will need to know if your Ethernet card supports the ability to wake up your pc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |