my experience with running vs code (or any IDE) from flatpak

Muayyad AlSadi alsadi at gmail.com
Wed Feb 6 16:35:28 UTC 2019


hi,

I've installed vs code from

https://flathub.org/apps/details/com.visualstudio.code.oss

I've noticed that it run inside a container with minimal os
while the host is mounted on /run/host/

1. although the minimal os has bash, it uses sh by default
2. many extensions did not work due to problems with host tools

for example:
Language Support for Java(TM) by Red Hat
https://marketplace.visualstudio.com/items?itemName=redhat.java

PHP IntelliSense
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense

SonarSource SonarQube
https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube


and maybe eslint (not sure)

for example java is not working because in host they are symbolic links

[alsadi at laptop ~]$ ls -lh /etc/alternatives/java
lrwxrwxrwx. 1 root root 72 Feb  5 16:11 /etc/alternatives/java ->
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc28.x86_64/jre/bin/java
[alsadi at laptop ~]$ ls -lh /usr/lib/jvm/
total 76K
lrwxrwxrwx. 1 root root   26 Feb  5 16:08 java -> /etc/alternatives/java_sdk
lrwxrwxrwx. 1 root root   21 Feb  5 16:11 jre -> /etc/alternatives/jre
...

those links would become broken inside the container

sh-4.3$ ls -lh /run/host/usr/bin/java
lrwxrwxrwx 1 nfsnobody nfsnobody 22 Feb  5 16:11 /run/host/usr/bin/java ->
/etc/alternatives/java
sh-4.3$ ls -lh /etc/alternatives/java
ls: cannot access '/etc/alternatives/java': No such file or directory
sh-4.3$ ls -lh /run/host/etc/alternatives/java
lrwxrwxrwx 1 nfsnobody nfsnobody 72 Feb  5 16:11
/run/host/etc/alternatives/java ->
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc28.x86_64/jre/bin/java

and manually setting to did not seem to work

    "java.home":
"/run/host/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc28.x86_64/",
    "sonarlint.ls.javaHome":
"/run/host/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-11.fc28.x86_64/jre/"

so with php

PHP executable not found. Install PHP 7 and add it to your PATH or set the
php.executablePath setting

I guess there is a way to define a read-only overlay/union between the
minimal container and host? can I choose host? do I have to configure all
those pathes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20190206/eaf59f3b/attachment.html>


More information about the Flatpak mailing list