Call for testing: notepad-plus-plus

Introduction

This snap uses the wine-i386 with notepad-plus-plus portable

Notepad-plus-plus is free source code editor and Notepad replacement that supports several languages. Its based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.

Install Instructions

sudo snap install notepad-plus-plus

Mandatory Plug

sudo snap connect notepad-plus-plus:process-control

Optional Plugs

sudo snap connect notepad-plus-plus:removable-media
sudo snap connect notepad-plus-plus:hardware-observe
sudo snap connect notepad-plus-plus:cups-control

snap repo

snap wiki

Screenshot

screenshot

Feedback is welcome.

2 Likes

Why are the plugs needed and can they be auto-connected (file requests in #store) if they are absolutely necessary (would make a more user-friendly install)?

This is amazing, I’ve loved the idea of having Wine apps in the snap store, such a user-friendly way of distributing Wine apps. I know it’s duplicating work by PlayOnLinux and Lutris (so some users don’t like the idea of distributing Wine apps via the snap store) but this would just be so awesome if we could do it…can you imagine a working Wine config of Photoshop being available in GNOME Software for example?!? How about League of Legends? Microsoft Office? :heart_eyes::heart_eyes: I can imagine this would help a lot more people switch to GNU/Linux!

2 Likes

Making a JavaScript file and using Run > Launch in Firefox doesn’t seem to work.

Notepad++ 7.5.5 (31) in edge
$ snap info notepad-plus-plus
tracking:    edge
installed:   7.5.5 (31) 48MB -
$ snap version
snap    2.31.2
snapd   2.31.2
series  16
ubuntu  17.10
kernel  4.13.0-37-generic
$ snap info core
tracking:    candidate
installed:   16-2.31.2 (4206) 85MB core # same version as in stable

snap does not have network access so it can not use internet and it does not ship windows version of internet browsers however Launch on IE opens the file on IE.

As for Plugs only process-control is needed to run the wine snap on strict confinement and other plugs are optional.

1 Like

Hmm, we could be really clever and run a patch on the Notepad++ source (on building the snap) to launch Firefox/Chromium from native rather than Wine…not sure how to do that though, or if it would actually work…

Only minutes into testing but I am thrilled to see this. I put a plugin into
:~/snap/notepad-plus-plus/current/notepad-plus-plus/plugins
and it seems to work fine for now. I’m wondering how it will be handled when there is an update. Will I need to copy the plugin manually?

First of all, it works fine in Ubuntu 16.04.

But, it seems that no Chinese fonts packed in this snap, so it displays garbled message for Chinese text.

Is there anyone have a workaround?

1 Like

sorry for late answer, user plugins should be copied over when the snap is updated and if this has issues let me know.

1 Like

snap also links all the ‘TTF’ fonts from root partition to ‘WINEPREFIX’ when it is run for the first time so it should have the extra fonts, you can change font from style configurator on notepad-plus-plus with enable global font.

You can add more fonts here ‘/home/USERNAME/snap/notepad-plus-plus/common/.wine/drive_c/windows/Fonts/’

2 Likes

Thanks a lot for your great help

My problem solved by copying Windows fonts to ~/snap/notepad-plus-plus/common/.wine/drive_c/windows/Fonts/ .

B.t.w.:
i have no idea why the default design not working for me:
“snap also links all the ‘TTF’ fonts from root partition to ‘WINEPREFIX’ when it is run for the first time so it should have the extra fonts”

1 Like

I can confirm Chinese fonts in the system are not available to the application by default, as the following screenshot depicts:

Screenshot_20180613_235042

UPDATE: I filed to Chinese fonts not working ¡ Issue #6 ¡ mmtrt/notepad-plus-plus

There is a pretty serious bug: Changes to keyboard shortcuts and macros are not saved.

This is because “~/snap/notepad-plus-plus/62/notepad-plus-plus/shortcuts.xml” is just a link pointing to the read-only file “/snap/notepad-plus-plus/62/usr/share/notepad-plus-plus/shortcuts.xml”.

This was going to prevent me from using this implementation of N++, but I found a workaround:
1.) Delete the “~/snap/notepad-plus-plus/62/notepad-plus-plus/shortcuts.xml” link file.
2.) Copy the “/snap/notepad-plus-plus/62/usr/share/notepad-plus-plus/shortcuts.xml” file to “~/snap/notepad-plus-plus/62/notepad-plus-plus”.

The problem does not occur for config.xml, since that file is already in “~/snap/notepad-plus-plus/62/notepad-plus-plus” (unlike the link file that exists there for shortcuts.xml).

You should also make the same fix for at least some of the other XML files, such as “contextMenu.xml”

Thanks for reporting the issue.

It should be fixed on snap revision 65 I have just released it to stable channel and also make sure you have cleared the contents of ~/snap/notepad-plus-plus before testing new revision of snap.

Recently, notepad-plus-plus suddently doesn’t work. Anyone can help me out? Thanks a lot!

When i tried to luanch it from bash, it reports:

You need to connect this snap to the wine-platform-i386 snap.

snap connect notepad-plus-plus:wine-platform-plug wine-platform-i386:wine-base-stable

But, when i install wine-platform-i386, it outputs:

2018-09-04T12:06:00+08:00 INFO snap "wine-platform-i386" has bad plugs or slots: wine-base-devel, wine-base-stable, wine-base-staging (read or write path must be set)
wine-platform-i386 1.0 from 'mmtrt' installed

Which eventually failed the below command:

$ sudo snap connect notepad-plus-plus:wine-platform-plug wine-platform-i386:wine-base-stable

error: cannot perform the following tasks:
- Connect notepad-plus-plus:wine-platform-plug to wine-platform-i386:wine-base-stable (snap "wine-platform-i386" has no slot named "wine-base-stable")
1 Like

That seems to be something that can be easily solved, let me check it out.

I spoke too soon, according to https://github.com/mmtrt/wine-platform-i386/blob/8f66ba46c643ce3ebcb90602e528985be5f3ce0c/snap/snapcraft.yaml#L13-L45 the read paths are totally set properly for all the wine-base-* slots.

Maybe try to disconnect plug from npp

snap disconnect notepad-plus-plus:wine-platform-plug

Then connect again wine plug

snap connect notepad-plus-plus:wine-platform-plug wine-platform-i386:wine-base-stable

If above not works then remove both snaps then reinstall them first wine-platform-i386 snap then npp snap see if this helps.

1 Like

Unfortunately, still has problem…

$ sudo snap remove notepad-plus-plus
notepad-plus-plus removed
$ sudo snap remove wine-platform-i386
wine-platform-i386 removed

$ sudo snap install wine-platform-i386
wine-platform-i386 1.0 from 'mmtrt' installed

$ sudo snap install notepad-plus-plus
2018-09-04T14:47:47+08:00 INFO snap "notepad-plus-plus" has bad plugs or slots: desktop, desktop-legacy, wayland (unknown interface)
notepad-plus-plus 7.5.8 from 'mmtrt' installed

$ notepad-plus-plus 
You need to connect this snap to the wine-platform-i386 snap.

snap connect notepad-plus-plus:wine-platform-plug wine-platform-i386:wine-base-stable

$ sudo snap connect notepad-plus-plus:wine-platform-plug wine-platform-i386:wine-base-stable
error: cannot perform the following tasks:
- Connect notepad-plus-plus:wine-platform-plug to wine-platform-i386:wine-base-stable (snap "wine-platform-i386" has no slot named "wine-base-stable")

can you post info of these

snap info core
snap interfaces wine-platform-i386

1 Like