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

chrisrlink

Has a PhD in dueling
OP
Member
Joined
Aug 27, 2009
Messages
5,576
Trophies
2
Location
duel acadamia
XP
5,827
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
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,347
Trophies
4
Location
Space
XP
13,934
Country
Norway
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

General chit-chat
Help Users
  • OmDRetro @ OmDRetro:
    @Xdqwerty HM...

    If the cat girl leaves, my kokoro dies a little.

    If I piss off the cat grill friend, I get no food and he's likely to grill me.

    There's just no winning here 😂
    +1
  • Xdqwerty @ Xdqwerty:
    @OmDRetro, good point
  • RedColoredStars @ RedColoredStars:
    Anyone play Little Kitty, Big City?
  • RedColoredStars @ RedColoredStars:
    My kitty was watching me play. <3 <3 <3
  • RedColoredStars @ RedColoredStars:
    its a game that came out a few days ago. Its on Game Pass too.
  • Xdqwerty @ Xdqwerty:
    @RedColoredStars, but what is the game about?
  • SylverReZ @ SylverReZ:
    @RedColoredStars, Never heard of it. Any good?
  • RedColoredStars @ RedColoredStars:
    You control a kitten. You fall out the window and have to make your way back home. Solve some light puzzles, do cat things like knock stuff over and steal things, trip people up when theyre walking, pounce on birds, complete goals/tasks etc. in the process of getting back to your home.
    +1
  • RedColoredStars @ RedColoredStars:
    I think ones enjoyment would depend on how much a person loves cats. :)
    +1
  • RedColoredStars @ RedColoredStars:
    Theres my kitty watching me play.
  • SylverReZ @ SylverReZ:
    @RedColoredStars, I'm a cat person so this game must be for me. :D
  • Xdqwerty @ Xdqwerty:
    @RedColoredStars, sounds kinda neat
  • RedColoredStars @ RedColoredStars:
    @SylverReZ It's short but adorable imo. Im a HUGE cat lover.Can be completed in a couple of hours if just going for the main goals. But can be stretched out a good deal by exploring and doing everything there is to do and see.
    +2
  • Xdqwerty @ Xdqwerty:
    @RedColoredStars, like a cat gta?
  • SylverReZ @ SylverReZ:
    @RedColoredStars, Reminds me of a similar game called "Neko Atsume", similar to Nintendogs but you look after cats.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, wasnt there an official nintendogs game with cats for the 3ds?
    +1
  • Xdqwerty @ Xdqwerty:
    ill have no wifi for a bit so see ya later
    +2
  • RedColoredStars @ RedColoredStars:
    Gross. lol
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Ok seeya.
  • SylverReZ @ SylverReZ:
    @RedColoredStars, I've got a fairly dark sense of humor lol.
  • BigOnYa @ BigOnYa:
    So a man goes to the doctor because his boner wont go down. As he is laying in the hospital bed, with his thing propped up in the air, a fly is flying around and landing on the tip and bothering him, so he calls in the nurse. The nurse comes in, swats at the fly but can't quite reach it, so she climbs his boner to get better aim. After a few tries of swatting and sliding back down, she says sorry I cant get it. He says keep going, a few more tries, and I can shoot it down.
    BigOnYa @ BigOnYa: So a man goes to the doctor because his boner wont go down. As he is laying in the hospital bed...