Sunflower icon indicating copy to clipboard operation
Sunflower copied to clipboard

Sunflower and Gedit

Open vahriin opened this issue 10 years ago • 12 comments

Hello. Sorry for my English. I use Sunflower and Gedit as a text editor. When I open any .txt, .html, and other files that are processed through Gedit by double-clicking, Gedit show the error "Failed to process e ~ / text.txt". But when I use Nemo, all works. OS - Archlinux.

vahriin avatar Feb 08 '15 08:02 vahriin

Hi,

Thanks for reporting this issue. Can you please take a screen show of error message?

On 02/08/2015 09:54 AM, vahriin wrote:

Hello. Sorry for my English. I use Sunflower and Gedit as a text editor. When I open any .txt, .html, and other files that are processed through Gedit by double-clicking, Gedit show the error "Failed to process e ~ / text.txt". But when I use Nemo, all works. OS - Archlinux.

— Reply to this email directly or view it on GitHub https://github.com/MeanEYE/Sunflower/issues/66.

Mladen Mijatov Key ID: 4096R/83EFD5A0 2013-08-18 Tox ID: B82DADBC7614F887F2ACB7A4F29E848D937452113C9EBBA39DCB3E260096945A934361722B51

MeanEYE avatar Feb 08 '15 12:02 MeanEYE

2015-02-08 22 16 42 Sorry, russian localisation. Just in case, translation: "Could not open file /home/safron/bookmarks" "Unable to process this address"

vahriin avatar Feb 08 '15 17:02 vahriin

Did you configure your editor manually trough preferences?

On 02/08/2015 06:30 PM, vahriin wrote:

2015-02-08 22 16 42 https://cloud.githubusercontent.com/assets/10906082/6097473/ac78145a-afe0-11e4-874e-28678a357a06.png Sorry, russian localisation. Just in case, translation: "Could not open file /home/safron/bookmarks" "Unable to process this address"

— Reply to this email directly or view it on GitHub https://github.com/MeanEYE/Sunflower/issues/66#issuecomment-73421096.

Mladen Mijatov Key ID: 4096R/83EFD5A0 2013-08-18 Tox ID: B82DADBC7614F887F2ACB7A4F29E848D937452113C9EBBA39DCB3E260096945A934361722B51

MeanEYE avatar Feb 09 '15 00:02 MeanEYE

yes, of course, but this changed nothing. :(

vahriin avatar Feb 09 '15 12:02 vahriin

So this path that GEdit specified, is it valid?

MeanEYE avatar Feb 09 '15 15:02 MeanEYE

Excuse me for mine long absence Yes, the way that defined Gedit, is right.

vahriin avatar Feb 11 '15 16:02 vahriin

This is really strange. Sunflower uses GIO do detect applications and way to open them. Did you press F4 to edit or right clicked and then selected GEdit from the list?

MeanEYE avatar Feb 12 '15 12:02 MeanEYE

this bug again around schema in local provider. Look on this line https://github.com/MeanEYE/Sunflower/blob/develop/application/associations.py#L212 Sunflower send paths without schema. Some apps can recognize this and run normally. For gedit gio send uris via dbus and gedit cant open it witout schema. So i suggest dont use lauch_uris or append 'file://' for local paths

ArseniyK avatar Mar 11 '15 00:03 ArseniyK

Hm. We can't keep adding and removing schema around the code like this. Perhaps we should create provider method that does this for us. After all each provider knows its own schema and formatting.

MeanEYE avatar Mar 11 '15 16:03 MeanEYE

I experience this issue on Debian Jessie Stable. What is weird that files opened by pressing F4 (Edit) work fine in gedit, but run by double clicking cause the above error.

gronki avatar Jul 03 '15 18:07 gronki

@MeanEYE This issue probably was fixed by migrating to GTK3, as I cannot reproduce it in latest develop version.

joshas avatar Aug 02 '19 11:08 joshas

It's not fixed @joshas just hard to reproduce. It revolves around how applications specify they want file path in. GIO applications usually use %U or similar thing and expect full URI in form of file:///home/.../.../file.txt. While some applications just ask for regular relative of absolute paths without schema. Issue comes from URI which requires URL escaped string, but Sunflower half-supports this. We do handle schemas but not uniformly in all parts of the code.

At first this was to avoid parsing and messing with path and needlessly make slower code but it has cause many issues since. Best approach would be to universally support it everywhere and treat every path as URI. For that, we need to modify providers and few key functions which deal with paths.

MeanEYE avatar Aug 04 '19 11:08 MeanEYE