CLion won't open a browser for upsource verification (Ubuntu)

已完成

I need Upsource integration in CLion and have the plugin.  In Settings > Tools > Upsource > Connection I enter my server URL.  If I click Test Connection it spins forever.  If instead I skip this and just apply/ok I get an Upsource Authorization pop up that says "Waiting for authorization.  Please accept the request in your browser", yet no browser window has been opened.  That is my primary issue.

If I highlight some code, rclick and go to Search with Google, I also get no browser window.  So between these two issues I went over to Settings > Tools > Web Browsers and dithered in here for a long time.  I have both Brave and Firefox installed, added Brave to the list, unchecked all but Brave and Firefox.  First listed, System Default, custom path to /usr/bin/firefox, custom path to /usr/bin/brave-browser-stable, none of this works.  I tried setting firefox custom profile to /home/<user>/.mozilla/firefox/profiles.ini.  No difference.  How do I get CLion to open a browser?

Notes:
I am running CLion 2019.2.2 as root.
System is Windows 10 running Virtual Box with an Ubuntu 18.04.3 instance.  CLion is on Ubuntu.

0

Nevermind, I figured it out.  In case someone else runs across this same problem it's because running CLion as root means it tries to open a browser as root which is highly discouraged and so unsupported without some finagling (try sudo firefox in terminal, it won't work).  I did finagle it to see if I was right by going into CLion and setting my browser to brave, then clicking the edit pencil to add a flag --no-sandbox.  This lowers security even further, so I only did it as a test.  I'm not sure what I'm going to do for a long term solution.  Unfortunately the development I'm doing requires I have superuser privileges when running CLion.

0

Again, in case someone else is having this problem here is what I did, seems to work fine.  Upsource and Google Search are now working in CLion as root, but through a Browser as rando (which is what I'm calling my ubuntu username). 

  1. Open a terminal and log in as root: sudo -i
  2. Make a file with a command to run firefox as another user: echo 'sudo -u rando -H firefox "$@"' > RunFirefoxAsRando
  3. Make it executable: chmod +x RunFirefoxAsRando
  4. Open CLion and go to File > Settings > Tools > Web Browsers
  5. Click the + to add a new browser called FirefoxAsRando with a path /root/RunFirefoxAsRando
  6. Set the Default Browser at the bottom of this page to "First listed" and move FirefoxAsRando to the top.
  7. Apply

Once I connected to Upsource I had to restart CLion before the right click functions would work for me. 

 

0


I need help. I started clion, I have an active student license, but as you can see in the picture, clion doesn't recognize my libraries. can you help me

0

请先登录再写评论。