mmtrt / notepad-plus-plus-snap

Unofficial snap repo for notepad-plus-plus snap
https://snapcraft.io/notepad-plus-plus
MIT License
63 stars 7 forks source link

I can't accent chars [pt-BR] depending on the way npp runs #15

Open gwarah opened 5 years ago

gwarah commented 5 years ago

If running from the command line, ok

àêõú

If running from an Ubuntu desktop file, not ok

`a^e~o´u

This is the desktop file to run npp:


#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=Notepad++
GenericName=Text Editor
Comment=Simple and free source code editor.
Version=7.6.0
Type=Application
Terminal=false
Icon=/snap/notepad-plus-plus/current/usr/share/pixmaps/notepad-plus-plus.png
Exec=notepad-plus-plus %U
StartupWMClass=notepad-plus-plus.exe
Categories=Utility;TextEditor
MimeType=text/plain;text/css;text/html;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-java;text/x-makefile;text/x-python;text/x-sh;application/x-wine-extension-ini;application/x-wine-extension-inf;

My ubuntu:

Linux 4.15.0-38-generic #41~16.04.1-Ubuntu SMP Wed Oct 10 20:16:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

mmtrt commented 5 years ago

can you try same on system wine without using snap see if that happens there.

gwarah commented 5 years ago

I don't have wine installed but I've done the same test on other foobar2000 (so snapped) and the results were the same errors.

npp and foobar2000 called by ubuntu start menu work ok.

mmtrt commented 5 years ago

ah ok so you are creating desktop file then running the snap app from there is problematic.

gwarah commented 5 years ago

ah ok so you are creating desktop file then running the snap app from there is problematic.

Yes, indeed. I've checked it right now with these last tests. For any reason calling these snapped apps from this desktop file configuration causes this bug.

mmtrt commented 5 years ago

ah maybe try removing this line from desktop file if that still not works for you then check the actual desktop files used by snaps from here /var/lib/snapd/desktop/applications/ see if they solve your issue.

#!/usr/bin/env xdg-open
gwarah commented 5 years ago
  1. Removing #!/usr/bin/env xdg-open doesn't work

  2. I've seen the actual desktop files. I'm copying here two of them. One loads the app ok; npp files does not:

2.1. Tusk desktop file

[Desktop Entry]
Name=Tusk
Comment=Tusk is an unofficial, featureful, open source, community-driven, free Evernote app used by people in more than 130 countries.
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/tusk_tusk.desktop /snap/bin/tusk
Terminal=false
Type=Application
Icon=/snap/tusk/19/meta/gui/icon.png
StartupWMClass=Tusk
Categories=Office;

2.2. Npp desktop file

[Desktop Entry]
Name=Notepad++
GenericName=Text Editor
Comment=Simple and free source code editor.
Version=7.6.1
Type=Application
Terminal=false
Icon=/snap/notepad-plus-plus/171/usr/share/pixmaps/notepad-plus-plus.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/notepad-plus-plus_notepad-plus-plus.desktop /snap/bin/notepad-plus-plus %U
StartupWMClass=notepad-plus-plus.exe
Categories=Utility;TextEditor
MimeType=text/plain;text/css;text/html;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-java;text/x-makefile;text/x-python;text/x-sh;application/x-wine-extension-ini;application/x-wine-extension-inf;

The difference between them is the directive MimeType. But I've commented it in the last file and nothing.