ways to disable/enable a few lines in .bashrc/sudoers? (script)

  • Thread starter Thread starter chrisrlink
  • Start date Start date
  • Views Views 547
  • Replies Replies 1

chrisrlink

Has a PhD in dueling
Member
Joined
Aug 27, 2009
Messages
6,449
Solutions
1
Reaction score
3,566
Trophies
3
Location
duel acadamia
XP
7,501
Country
United States
hi so i need an on the fly script to turn on/off a few lines so pdanet (an android app that uses hotspot and hides tether usage) to make it work on linux

video on how it's done


so in a nutshell I must add 2 lines one to .bashrc and one using visudo for the /etc/sudoers file

for .bashrc

export https_proxy=192.168.49.1:8000

for sudoers

Defaults env_keep += "https_proxy"

and exec source .bashrc command
I just need a bash script to comment out/in those 2 lines just on a double click, or learn how to do it any help would be nice, thanks for whoever helps me
 
hi so i need an on the fly script to turn on/off a few lines so pdanet (an android app that uses hotspot and hides tether usage) to make it work on linux

video on how it's done


so in a nutshell I must add 2 lines one to .bashrc and one using visudo for the /etc/sudoers file

for .bashrc

export https_proxy=192.168.49.1:8000

for sudoers

Defaults env_keep += "https_proxy"

and exec source .bashrc command
I just need a bash script to comment out/in those 2 lines just on a double click, or learn how to do it any help would be nice, thanks for whoever helps me

You can probably keep the /etc/sudoers line there permanently, since it won't have any effect without the other line. As for the .bashrc line, there is no reason you can't put this line directly in a bash script instead of in .bashrc. It's just a normal bash command. Although it might only have an effect in the same terminal window you run the command in. And use "unset https_proxy" to "disable" it.
 

Site & Scene News

Popular threads in this forum