This question deals with Kali Linux.

I need to open a Chrome browser for a specific user such that for this user, the traffic from Chrome will go through a local HTTP(S) proxy.

Currently, I open the browser from a Python code that runs the command:

gksu -wu USERNAME google-chrome

I googled a lot, did not find how to do that, and tried without success many solutions for similar questions.

I consider to do one of the following two things, and will be glad to get help in how to do them:

  1. Change something in the configurations of the system (e.g., making all the HTTP(S) traffic go through the proxy), such that running the abovementioned command will just work fine.

  2. Running additional commands everytime I run the the command.

  3. Doing something else.

Please don't offer me to use another browser; I know that in Firefox it is much more simple.


closed as unclear what you're asking by G-Man, roaima, thrig, Stephen Rauch, GAD3R Oct 27 '17 at 17:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Wouldn't you just switch to that user, configure Chrome to use a proxy using the regular method, and then when you execute that command as that user, it'll retain the proxy settings? – EightBitTony Oct 27 '17 at 8:30
  • @EightBitTony Chrome takes its proxy configuration from the OS (unlike Firefox for example). – Gari BN Oct 27 '17 at 9:05
  • Then set http_proxy and https_proxy in the user's profile (which I assume is what Chrome on Linux checks?) – EightBitTony Oct 27 '17 at 9:09
  • However, this is Kali, so keep this answer in mind - unix.stackexchange.com/questions/399626/… – EightBitTony Oct 27 '17 at 9:10
  • @EightBitTony Of course I tried to set environment variables. I tried to change conf files. It just did not work . (I'm not noob) – Gari BN Oct 27 '17 at 9:18

I finally found a solution. I'm writing it here to help other people who might encounter the same problem.

Although this is not a pure terminal solution, I configured the proxy for the specific user by opening the network window with the same user:

gksu -wu USERNAME gnome-control-center network

Then I configured the proxy as I wanted. It is an acceptable solution for me, because I need to do the non-terminal process only once.

Not the answer you're looking for? Browse other questions tagged or ask your own question.