elementary / appcenter

Pay-what-you-can app store for elementary OS
https://elementary.io
GNU General Public License v3.0
542 stars 101 forks source link

Failed to install flatpak app (No such file or directory) #1251

Closed T0ba9 closed 4 years ago

T0ba9 commented 4 years ago

Failed to install flatpak app from Appcenter. The error message: desktop-file-service.vala: Error opening file ..desktop: No such file or directory

Look at this: https://ibb.co/zHBY22s (backup link: https://imgur.com/a/EA6jt33 )

davidmhewitt commented 4 years ago

There's a "Permission denied" error which is why it's failing to install.

If you try and install it in the terminal with the following command, what happens? flatpak install --user flathub com.github.bajoja.indicator-kdeconnect

T0ba9 commented 4 years ago
root@Lenovo-EOS:~# flatpak install --user flathub com.github.bajoja.indicator-kdeconnect

Note that the directory 

'/root/.local/share/flatpak/exports/share'

is not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
error: No remote refs found similar to ‘flathub’
davidmhewitt commented 4 years ago

Why are you running it as root? Run it as your user.

T0ba9 commented 4 years ago
balazs@Lenovo-EOS:~$ flatpak install --user flathub com.github.bajoja.indicator-kdeconnect
Looking for matches…

com.github.bajoja.indicator-kdeconnect permissions:
    ipc      network      pulseaudio      x11      devices     file access [1]     dbus access [2]     bus ownership [3]

    [1] host
    [2] org.freedesktop.DBus.Proprieties, org.freedesktop.IBus, org.freedesktop.Notifications, org.kde.StatusNotifierWatcher, org.kde.kdeconnect, org.kde.kdeconnectd
    [3] com.github.bajoja.indicator-kdeconnect.settings

        ID                                                Branch            Op            Remote            Download
 1.     com.github.bajoja.indicator-kdeconnect            stable            i             flathub           < 1,7 MB

Proceed with these changes to the user installation? [Y/n]: 
davidmhewitt commented 4 years ago

And if you proceed with that installation by saying Y, what happens?

T0ba9 commented 4 years ago

Error: Permission denied error: Failed to install com.github.bajoja.indicator-kdeconnect: Permission denied


Is there any error with my flatpak config?

davidmhewitt commented 4 years ago

So, this is not a problem with AppCenter, there is something wrong with the permissions with the flatpak files/directories in your user folder. Did you change the permissions/owner on any of the files/directories in your home directory?

If you post the output of ls -la $HOME, maybe we can see the problem.

T0ba9 commented 4 years ago

The flatpak related directories (include ~/.var/app/ directory and the /var/lib/flatpak) were copied from the previous Debian installation. I think this causes the problem. How I can fix it?

davidmhewitt commented 4 years ago

I would start by making sure the ~/.var directory is owned by your user with the command: chown -R $USER:$USER ~/.var

This may be enough to fix it. The /var/lib/flatpak directory is probably OK already assuming all of the permissions copied correctly.

I'm going to close this issue now as it is not an issue with AppCenter or elementary. If you are still having further issues, I suggest you ask a question on StackExchange as this is the place for support questions.