Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome not showing up in vscode. Manjaro Linux

i'm on Manjaro. i've install google-chrome from AUR and it shows up in flutter doctor , flutter devices when executed from terminal. the problem is when i run flutter doctor from vscode it says

[✗] Chrome - develop for the web (Cannot find chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

like image 556
T-X Avatar asked Nov 25 '19 10:11

T-X


4 Answers

run flutter pub global activate webdev

like image 190
Shoeb S Shaikh Avatar answered Sep 22 '22 04:09

Shoeb S Shaikh


First you need to switch master channel

flutter channel master

Then run

flutter upgrade

Enable Web support by running

flutter config --enable-web

Find installation path of chrome by running

which chrome

set an Environment variable to chrome's installation path. If your installed using AUR it will in /opt/google/chrome/chrome

export CHROME_EXECUTABLE=/opt/google/chrome/chrome

Finally run

flutter devices

You can see chrome as a connected device.

like image 20
z3r0c00l_2k Avatar answered Oct 08 '22 17:10

z3r0c00l_2k


To use chrome or chromium on Linux(Manjaro), first you have to find their location.

Run the following command:

which chromium

My chromium is located at:

/usr/bin/chromium

If you wish to add this browser to Flutter, then you should add it to the CHROME_EXECUTABLE environment variable.

the following command needs to be placed in the .bashrc:

/usr/bin/chromium is my chromium location; add yours.

You can use nano:

nano .bashrc 

Add the following command and press Ctrl+x and then Y to make sure it has been saved.

export CHROME_EXECUTABLE=/usr/bin/chromium 

And finally run:

source .bashrc 

Now restart the previous open IDE and it should work. If you run:

flutter doctor

You should find it in the connected device.

like image 14
NoobN3rd Avatar answered Oct 08 '22 18:10

NoobN3rd


check $PATH

try to chrome- and tab

ln -s /usr/bin/google-chrome-stable /usr/local/bin/google-chrome
like image 4
puz_zle Avatar answered Oct 08 '22 18:10

puz_zle