How to do it...

  1. Create a new file using nano as follows (if there is already some content in the file, you can add the code at the end):
sudo nano -c ~/.bash_profile
  1. To allow basic web browsing through programs such as Midori while using a proxy server, you can use the following script:
function proxyenable { # Define proxy settings PROXY_ADDR="proxy.address.com:port" # Login name (leave blank if not required): LOGIN_USER="login_name" # Login Password (leave blank to prompt): LOGIN_PWD= #If login specified - check for password if [[ -z $LOGIN_USER ]]; then #No login for proxy PROXY_FULL=$PROXY_ADDR else #Login needed for proxy Prompt for password -s option hides input if [[ -z $LOGIN_PWD ]]; then read -s -p "Provide proxy password (then ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.