Looking to automate my tethered internet connection.

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Silganator
Level 1
Level 1
Posts: 2
Joined: Mon Aug 05, 2019 3:57 am

Looking to automate my tethered internet connection.

Post by Silganator »

Hello, I'm new to Linux, but I love it.

I was wondering if I could get some help automating my tethered internet connection. I use an app called Easytether Pro on my phone. I have installed the PC side app on my PC, but every time I want to connect I have to type the following commands into the terminal in order for my connection to work...

sudo systemctl restart systemd-networkd

sudo /usr/bin/easytether-usb

otherwise my connection doesn't work. It's not a big deal, but I remember it worked seamlessly, and without human intervention when I was using Linux mint 18. Surely there's something I can set up that will automatically do this on startup, or whenever I plug in my phone. Any help would be appreciated.

User avatar
absque fenestris
Level 7
Level 7
Posts: 1930
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Looking to automate my tethered internet connection.

Post by absque fenestris »

I'm surprised that you ever need an additional app (Easytether...) on your phone and on your PC.
With macOS, an Android tablet, as well as with Linux Mint 17/18 - and, on a trial basis, Mint 19 - I never needed an additional program, neither on the phone, nor on the different computers.
Linux Mint 18.3 Sylvia (Mate) 32-bit - Acer D250 Netbook (Intel Atom N270, 2 GB RAM, 120 GB SSD)
Linux Mint 17.3 Rosa (Mate) 64-bit - MacBook Pro 15" (Intel Core2 Duo, 8 GB RAM, 240 GB SSD) - with some separation difficulties...

decrepit
Level 4
Level 4
Posts: 275
Joined: Mon Dec 03, 2018 4:07 am
Location: Mandurah Western Australia

Re: Looking to automate my tethered internet connection.

Post by decrepit »

Same here, I tried a couple of days ago with my Lenovo thinkpad running 19.1 just connect the two via USB, turn on tethering on the phone, (ancient android) and voila there's a connection on the thinkpad.

MontyMan
Level 1
Level 1
Posts: 9
Joined: Mon Aug 05, 2019 8:22 am

Re: Looking to automate my tethered internet connection.

Post by MontyMan »

Dear Silganator,

You can create a batch script file using a text editor, and put the two commands in there. You can make a short cut to the script, so all you have to do is click it, and the two commands will be executed at that time. I'm sure there's a way to make this happen at each login or each restart. But the fact that you must start the process by restarting an already-running process, indicates you may need to wait until a certain point in the startup/login processs, before the two commands get run. HTH ...Monty.

User avatar
absque fenestris
Level 7
Level 7
Posts: 1930
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Looking to automate my tethered internet connection.

Post by absque fenestris »

Only by the way - with a telephone set with Android as well as with iOS, tethering works out of the box. For years. And it' s automatic...

Sometime I was told that KISS is good, it seems that Make It As Complicated As Possible is announced.

:?:
Linux Mint 18.3 Sylvia (Mate) 32-bit - Acer D250 Netbook (Intel Atom N270, 2 GB RAM, 120 GB SSD)
Linux Mint 17.3 Rosa (Mate) 64-bit - MacBook Pro 15" (Intel Core2 Duo, 8 GB RAM, 240 GB SSD) - with some separation difficulties...

Pippin
Level 4
Level 4
Posts: 327
Joined: Wed Dec 13, 2017 11:14 am
Location: NL/DE/TH

Re: Looking to automate my tethered internet connection.

Post by Pippin »

You could try, if on Android, the App Automate.
It can switch on USB tethering automatically according to the description.

Another option seems to be Android Tasker.

Keywords:
android <automate> <tasker> switch on usb tether
"Today's scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality."
Nikola Tesla

Silganator
Level 1
Level 1
Posts: 2
Joined: Mon Aug 05, 2019 3:57 am

Re: Looking to automate my tethered internet connection.

Post by Silganator »

Thanks everyone for your replies.

I went ahead and did as MontyMan suggested and created a batch script file with a text editor. I noticed when i right clicked on the text file that I created and looked into properties, that you could make it executable. This worked well for me, Thanks MontyMan.

Post Reply

Return to “Newbie Questions”