hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.88k stars 579 forks source link

Can't get the flatpak version to run in kubuntu 18.04 #1839

Closed syco closed 5 years ago

syco commented 6 years ago

Hi, I installed sparkleshare with the following command:

flatpak --user remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub org.sparkleshare.SparkleShare

but when I start it from the command line it terminates with the following message:

$ flatpak run --branch=stable --arch=x86_64 --command=sparkleshare org.sparkleshare.SparkleShare
12:34:45 Environment | SparkleShare 2.0.1 (Flatpak)
12:34:45 Environment | Git LFS 2.3.0
12:34:45 Environment | Git 2.14.1
12:34:45 Environment | Ubuntu (Unix 4.15.0.20)
12:34:45 Cmd |  | gvfs-set-attribute "/home/syco/SparkleShare" metadata::custom-icon-name org.sparkleshare.SparkleShare

log file tells the same story:

$ cat .config/org.sparkleshare.SparkleShare/logs/log_2018-04-28.3.txt 
12:34:45 Environment | SparkleShare 2.0.1 (Flatpak)
12:34:45 Environment | Git LFS 2.3.0
12:34:45 Environment | Git 2.14.1
12:34:45 Environment | Ubuntu (Unix 4.15.0.20)
12:34:45 Cmd |  | gvfs-set-attribute "/home/syco/SparkleShare" metadata::custom-icon-name org.sparkleshare.SparkleShare

journal:

Apr 28 12:34:45 nama systemd[1929]: flatpak-org.sparkleshare.SparkleShare-11323.scope: Failed to add PIDs to scope's control group: Permission denied
Apr 28 12:34:45 nama systemd[1929]: flatpak-org.sparkleshare.SparkleShare-11323.scope: Failed with result 'resources'.
Apr 28 12:34:45 nama systemd[1929]: Failed to start flatpak-org.sparkleshare.SparkleShare-11323.scope.

Any help? Thanks

rob-hills commented 6 years ago

This looks to me like a duplicate of issue #1790, even though it's a different flavour and version of Ubuntu. What happens if you run: gvfs-set-attribute "/home/syco/SparkleShare" metadata::custom-icon-name org.sparkleshare.SparkleShare in a terminal?

syco commented 6 years ago

Hi, here's the output

$ gvfs-set-attribute "/home/syco/SparkleShare" metadata::custom-icon-name org.sparkleshare.SparkleShare
This tool has been deprecated, use 'gio set' instead.
See 'gio help set' for more info.

$ echo $?
0
hbons commented 6 years ago

Sounds like we should use "gio set" to set the right folder icon in the future. But this probably isn't the issue as the commands exit normally.

olegstepura commented 6 years ago

Hi, gyus! Could you please point us to where the gvfs-set-attribute could be replaced with gio so that we can workaround this issue. Is that is in some bash script it could be easily replaced on a working system.

rob-hills commented 6 years ago

@olegstepura you may not need to do that. On my Ubuntu 18.04 LTS system, SparkleShare is actually running despite always throwing the gvfs-set-attribute error. Bug #1845 may mean you're just not seeing the SS Icon on your task bar at the top. If you try clicking your mouse cursor over the bar to the left of the first of your icons at the right end of your taskbar, you may see the SS menu drop down.

olegstepura commented 6 years ago

I'm asking because it does not run for me on ubuntu 18.04. I was thinking gvfs-set-attribute was the exact reason.

olegstepura commented 6 years ago

Ok, I found that it's inside compiled code, not easily editable in runtime https://github.com/hbons/SparkleShare/blob/036e5369f30a44de0d6577ab54160a031a0ec2c8/SparkleShare/Linux/Controller.cs#L50

olegstepura commented 6 years ago

I commented out the whole body of SetFolderIcon() and compiled all the stuff on linux according to https://github.com/hbons/SparkleShare/blob/master/SparkleShare/Linux/README.md (will propose some readme changes since it was not so straightforward). Now it works for me. Shows version 3.28

The only issue is missing tray icon (just empty space where you can click and see SparkleShare tray menu)

olegstepura commented 6 years ago

Ok, commenting out seem to be useless. I reverted my change and compiled again and SparkleShare still runs. So flatpak version might be broken in some other place.

But I'm still missing icon in tray, @hbons what could that be? I'm running Ubuntu 18.04/gnome image

hbons commented 6 years ago

Can you try the latest flatpak version? See my comments here: https://github.com/hbons/SparkleShare/issues/1778#issuecomment-405030652

olegstepura commented 6 years ago

I tried compiling it from latest master and icon appeared

hbons commented 6 years ago

Wonderful! Closing this now, but feel free to reopen if it still doesn't appear in the next version.

olegstepura commented 6 years ago

Well, actually this issue was about flatpak version so I would wait for someone to confirm if it works. (I'm currently not going to check it since manually compiled version works)

hbons commented 5 years ago

Try the latest version on Flathub: https://flathub.org/apps/details/org.sparkleshare.SparkleShare

olegstepura commented 5 years ago

@hbons which version does it have? Upd: Ah, I checked on flathub, it's 3.28.0