LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-19-2015, 10:59 AM   #1
hdp160
Member
 
Registered: Aug 2012
Posts: 139

Rep: Reputation: Disabled
Ubuntu 14.04 keyboard shortcut to wakeonlan


Hi, I've wasted to much time trying to get a simple keyboard shortcut working.

From terminal I can successfully run wakeonlan <mac address>

I've tried several times to write this command as a keyboard shortcut.

Applications>System Tools>System settings > Keyboard

Please put me out of my misery.............
 
Old 08-20-2015, 11:23 PM   #2
SometimesRomano
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
WOL Keyboard Shortcut

Hi,

Should be able to do this, when you put in the command to run on the keyboard shortcut page put:

/bin/bash wakeonlan <mac address>

-or-

create a bash script to execute like:

#!/bin/bash
wakeonlan <mac address>

The mark the script as executable with
chmod +x <script name>

and link the keyboard shortcut to the script
 
Old 08-22-2015, 04:05 AM   #3
hdp160
Member
 
Registered: Aug 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Thanks for the ideas but I'm still struggling.............

In the Name box I've put a meaningful name and in the command box I've tried everything I can think of.

Could somebody please be VERY prescriptive and suggest the full precise code with out using a script...

I really am struggling.
 
Old 08-22-2015, 11:41 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I can't tell you how to create a keyboard shortcut in Ubuntu becuase I don't use it but the precise command it needs to run is:
Code:
/usr/bin/wakeonlan <MAC Address of System To Wake>
For example:
Code:
/usr/bin/wakeonlan 00:00:49:d0:30:09
 
Old 08-23-2015, 03:42 PM   #5
hdp160
Member
 
Registered: Aug 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Thanks 273.......

I can run wakeonlan no problem from terminal that has NEVER been a problem.

What I want to do is run it from a keyboard shortcut.....

BUT I can't get it to work.

All the commands I've tried in the Applications>System Tools>System settings > Keyboard > Command box won't work for me.

That is the command I need help with.
 
Old 08-23-2015, 03:53 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I just did this on a Ubuntu VM, the steps I took were:
Hit the button on the top right (start menu type button, whatever they call it).
Typed "keyboard".
Selected the "Keyboard" option shown.
In the "Keyboard" application selected "Custom Shortcuts".
Clicked the "+" symbol to add a shortcut.
Called it "wake" and added the command "/usr/bin/wakeonlan 00:00:49:d0:30:09" to it.
With "wake" listed I clicked on the word "Disabled".
Hit Ctrl+X to set that as the shortcut (for testing purposes, select whatever it is you want).
Closed the keyboard application, then re-opened it to make sure changes had stayed.
Closed the keyboard application again.
Hit Ctrl+X and verified it sent the magic packet using an app called "Wake On LAN Monitor" on my iPad.

The command that you give for any shortcut is exactly the same as you would enter on the command line but should have the whole path to be sure it is running the right thing.

Last edited by 273; 08-23-2015 at 03:55 PM.
 
Old 08-26-2015, 06:11 AM   #7
hdp160
Member
 
Registered: Aug 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Hi 273,
Thanks very much for going to the efforts you have.
I've really hit a brick wall with this one, I've followed your steps to the letter with my mac address.
But still it does not work for me.
I'm going to give up on this one and live with wakeonlan direct from a terminal or from my smart phone.
I really can't take this any more it is so FRUSTRATING!!!

I'm going to leave this unsolved for a few more weeks.

Open question to anyone else who has taken the time to read this thread, Could it be something to do with the fact that wakeonlan is a perl script?
 
Old 08-26-2015, 12:18 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I am interested too -- I use Wake On LAN to power on my desktop regularly so I like to know it works.
 
  


Reply



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
[ASK] change shortcut keyboard ubuntu 12.04 luthfi m00k5 Linux - Newbie 2 05-16-2013 08:25 AM
Trigger wakeonlan upon xbmc (Ubuntu) resume g_srinivas Linux - Newbie 2 04-05-2010 02:52 PM
Ubuntu Server Wakeonlan Not Working When Laptop Lid Closed D11011101 Linux - Laptop and Netbook 1 03-27-2009 02:41 PM
Is There a Keyboard Shortcut on Shutting Down Ubuntu? taurusx5 Linux - Software 18 07-01-2008 09:35 AM
Keyboard Shortcut ceantuco Linux - Newbie 2 05-05-2008 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:20 PM.

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
Open Source Consulting | Domain Registration