Reputation:
I am trying to configure Visual Studio Code (in Ubuntu 22.04) and Live Server extension (Ritwick Dey). When I run Live Server, it opens a new window of my web browser (Firefox) that it attaches with VSCode as a new window. I want the Live server to open a Firefox BUT non attached with VSCode. And, if Firefox is already open, it opens the page in a new tab. Is it possible ? Is there any workaround ? Thank you.
Upvotes: 1
Views: 1102
Reputation:
Voila, I found a solution.
I started by uninstalling Firefox, and I installed the Developer Edition (optional).
To create the icon, I created a file .local/share/applications/firefox_dev.desktop
, in which I added:
[Desktop Entry]
Name=Firefox Developer Edition
GenericName=Firefox Developer Edition
Exec=/opt/firefox/firefox %u --class firefox
terminal=false
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition
StartupWMClass=firefox
Then I added the launch to the dock.
Then I set Firefox as my default browser.
Then I launched VSCode and Liver Server... This added a new .local/share/applications/userapp-Firefox Developer Edition-***.desktop
file. I stopped the server and closed VSCode.
In this file I replaced the code by:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/opt/firefox/firefox-bin %u --class firefox
Name=Firefox Developer Edition
Comment=Firefox Developer Edition
Now :
++
Upvotes: 1