LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-21-2016, 05:01 PM   #1
Boykin5
LQ Newbie
 
Registered: Dec 2016
Posts: 4

Rep: Reputation: Disabled
Can I sent a push notification to my phone from the linux terminal?


Hi all,

I would like to send a push notification to my phone after a task is completed on my linux desktop. For example after encoding videos is completed. Is this possible?

PS: This will be done locally via wifi as my linux machine and phone are on the same wifi network space. Thank you

Last edited by Boykin5; 12-21-2016 at 05:02 PM.
 
Old 12-21-2016, 05:24 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
iOS

https://www.urbanairship.com/push-no...ions-explained

Google (android)
http://stackoverflow.com/questions/1...ork-on-android

Last edited by BW-userx; 12-21-2016 at 05:28 PM.
 
Old 12-21-2016, 05:28 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,748

Rep: Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927
Another method is using SMS messages. Many mobile carriers have the capability to send SMS messages via email using the cell phone number. For example Sprint is 1235551212@messaging.sprintpcs.com (replace with your real phone number and domain name). You can use mutt configured with your email provider via the command line to send the message.

Last edited by michaelk; 12-21-2016 at 05:32 PM.
 
Old 12-21-2016, 06:32 PM   #4
af7567
Member
 
Registered: Nov 2012
Posts: 295

Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by Boykin5 View Post
I would like to send a push notification to my phone after a task is completed on my linux desktop. For example after encoding videos is completed. Is this possible?
I have been using pushbullet to send notifications to my android phone. After installing pushbullet on the phone I used curl to find out the id of the device and then use curl and my api key to send notifications.

You can find the pushbullet api and some examples here: https://docs.pushbullet.com/#api-quick-start


This is the command I currently use to send a notification to my phone
Code:
curl https://api.pushbullet.com/v2/pushes -k -u XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: -d device_iden=XXXXXXXXXXXXXXXXXXXXXX -d type=note -d title="Incoming call" -d body="Phone call from $LOOKUP - $1" -X POST
 
Old 12-22-2016, 07:24 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,680

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by Boykin5 View Post
Hi all,
I would like to send a push notification to my phone after a task is completed on my linux desktop. For example after encoding videos is completed. Is this possible?

PS: This will be done locally via wifi as my linux machine and phone are on the same wifi network space. Thank you
Hmm...same LAN and Linux desktop involved? If you're running KDE, look at KDE Connect...I've been using it with good results. You say "from the linux terminal" in your subject, which is a bit unclear. Do you mean from a terminal window, or do you mean from the Desktop environment in general?

https://community.kde.org/KDEConnect

Last edited by TB0ne; 12-22-2016 at 07:26 AM.
 
1 members found this post helpful.
Old 12-22-2016, 05:09 PM   #6
Boykin5
LQ Newbie
 
Registered: Dec 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hello everyone, sorry I took awhile to get back to this forum.

@ BW-userx: Thanks for the link, but I believe this info is more suited for developers.

@ michaelk: Setting up an email server to send email is complex for me. I tried in the past.

@ af7567: PushBullet seems interesting. I might give it a try in the future.

@ TB0ne: I was referring to the terminal window to type commands.

During my research, I found a way to do this by using Node.js, notify-cli, a Node.js package and an android app called Notify. It was quite easy to setup and the usage to send a push notification to the phone is very simple.

https://nodejs.org/en/
https://mashlol.github.io/notify/

Thanks All for suggestions and replies

Last edited by Boykin5; 12-22-2016 at 05:11 PM.
 
Old 12-22-2016, 06:47 PM   #7
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Have you seen kde connect?

Highly recommended!
 
1 members found this post helpful.
Old 12-22-2016, 09:20 PM   #8
Boykin5
LQ Newbie
 
Registered: Dec 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Quote:
Originally Posted by The EzekielProject View Post
Have you seen kde connect?

Highly recommended!
I like this approach better then the Node.js method. Nodejs is a Javascript Runtime environment and we know how much of a security reputation java has.

I am now using Kde Connect and it works like a charm. Thanks to both.
 
  


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
Google adds the Push Notification feature on Chrome Beta 42 dwblas Slackware 4 03-15-2015 06:19 AM
Set up email notification when push something to repositories binladen_vn88 Linux - Software 0 02-25-2014 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 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