Score:0

How should I open my html files from vs code ubuntu on google chrome?

tn flag

How should I open my html files from vs code ubuntu on google chrome? I have watched a couple of videos and also have installed the related extensions

I have checked on ubuntu whether there is any error in the installation of google_chrome by entering the command "google-chrome --version" it gives "Google Chrome 114.0.5735.198" but still when I want to open my html files from vs code to google-chrome. It gives an error. Following is the list of errors I got when I tried to change the name of the browser to open my html files. I have watched a video "https://youtu.be/N9_XD3Tgl5I" having the same error but the person had used firefox instead of google-chrome. I tried to apply the same procedure by using the word google-chrome in place of firefox by trying different methods of writing it but every time it gave me the following errors: Kindly check the above video so that you can understand my problem in a better way.

When I entered gogle-chrome "[Running] google-chrome $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" [3590:3590:0716/180848.468758:ERROR:browser_dm_token_storage_linux.cc(100)] Error: /etc/machine-id contains 0 characters (32 were expected). [3590:3617:0716/180848.622877:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [3590:3590:0716/180848.698761:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY [3590:3590:0716/180848.698828:ERROR:env.cc(255)] The platform failed to initialize. Exiting.

[Done] exited with code=1 in 1.368 seconds

When I entered Google only[Running] Google $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" /bin/sh: 1: Google: not found

[Done] exited with code=127 in 0.071 seconds

When I entered Chrome only[Running] Chrome $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" /bin/sh: 1: Chrome: not found

[Done] exited with code=127 in 0.071 seconds

When I entered Google Chrome[Running] Google Chrome $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" /bin/sh: 1: Google: not found

[Done] exited with code=127 in 0.068 seconds

When I entered Google-Chrome[Running] Google-Chrome $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" /bin/sh: 1: Google-Chrome: not found

[Done] exited with code=127 in 0.077 seconds

When I entered google_chrome[Running] google_chrome $filename "/home/mamoona/html-practice/hello-html/html-hello-world.html" /bin/sh: 1: google_chrome: not found

[Done] exited with code=127 in 0.066 seconds"

Then, I thought of installing firefox to ubuntu as people do not run html file like this now days. People now use live servers. But I am still unable to install firefox by using sudo snap install firefox command as gives me an error message: "mamoona@DESKTOP-JIVR4K5:~$ sudo apt install firefox Reading package lists... Done Building dependency tree... Done Reading state information... Done firefox is already the newest version (1:1snap1-0ubuntu2). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. mamoona@DESKTOP-JIVR4K5:~$ snap install firefox error: cannot communicate with server: Post "http://localhost/v2/snaps/firefox": dial unix /run/snapd.socket: connect: no such file or directory"

Also the open commands do not work at my ubuntu due to which I am trying to open my html files from vs code in the browser directly from my vs code

Kindly help me so that I will be able to run my html files typed in vs code from ubuntu to any browser either chrome or firefox I am using Ubuntu WSL 2 version

aq flag
are you physically on the computer that you are running this on? Or is this over ssh? `Missing X server or $DISPLAY` seems to indicate there is a disconnect between the terminal and the UI.
Mamoona avatar
tn flag
I am physically on my computer but using Ubuntu as a virtual machine, till now I haven't figured out what the problem is.
mpboden avatar
do flag
Does this help? [Can't symlink to machine ID](https://askubuntu.com/a/1149989/1684306)
Mamoona avatar
tn flag
No it did not...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.