HOWTO: Install Notepad++ on Debian Linux using Wine & Python
Purpose: For those of you who have used open source editor Notepad++ before, they know what I am talking about when you fall in love with this great editor. Unfortunately, only a Windows native installer exits at this point of time and hence Linux users who want to use this editor on a Linux distro has to face some disappointment. But all is not lost. In this post, we will learn how to install Notepad++ on your Linux system using Wine. I know somehow of you may not like Wine (the software) just like me but if you want Notepad++ then it is a necessary evil. So let’s get started…
Step 1: Download Notepad++ Installer
You can download the installer from Google Code here. I downloaded this in my home directory - /home/kushalk.
Step 2: Extract the tarball
# cd;
# tar -xzvf npp-installer-0.2.tar.gz
# ls npp-installer/
LICENCE npp-installer.py npp-installer.py~ README
Step 3: Install Wine and Python
The installer relies on Wine and Python as you will in the next few steps. So go ahead and install it.
# apt-get update
# apt-get install wine python
Step 4: Edit the installer file
Before you can start installing you need to modify the npp-installer.py file, otherwise you are likely to get the following error during install:
# cd npp-installer
# python npp-installer.py
"SyntaxError?: Non-ASCII character '\xa0' in file npp-installer.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details"
In order to resolve the above error, simply edit the file, npp-installer.py, and remove the leading space, the first character, from the line. That’s the reason why we see the above error message.
# nano npp-installer.py
You will see a character like this (depending on the editor you chose to edit the file) at the very beginning of the file:
?
Delete the above character. Save and exit.
Step 5: Install Notepad++
Now you are all set-up to install Notepad++. Simply give the following command:
# python npp-installer.py
and answer some few basic questions.
Once it finishes installing, you can launch the Notepad++ executable (remember this is running through Wine) from the following location:
# cd;
# cd .wine/drive_c/Program\ Files/
# cd Notepad++/
# ../notepad++.exe
I don’t know any better way to access the “executable” other than the above. I don’t use Wine much. If you know any better method (ln -s does not work) please post it in the comments.
That’s it!
Happy Notepad’ing++!


Email Subscription









February 10th, 2010 at 6:00 am
I run Debian Lenny, and N++ had installed, I opened /root/.wine/drive_c/Program\ Files/Notepad++/ (just using browser), dragged the Notepad++.exe while holding ALT and when you release the mouse button select ‘Link Here’. After that it will be owned by a root user, but you can change that by using:
#chown username pathtofile/file.exe. Enjoy. Sorry for double posting, i just made some mistakes. I hope it will help anyone :)
Reply to this comment
September 29th, 2010 at 5:55 pm
hi, after I ran phyton npp-installer.py, notepad++ was automatically displayed on my desktop.
Thanks for this! it helped me a lot! :)
Reply to this comment
November 26th, 2010 at 8:37 pm
hi, all! I’m new to linux, i used debian lenny!
Is it ok to install n run any executable file by using wine( i mean using method you explained above)?
Reply to this comment
January 4th, 2011 at 12:50 am
I downloaded and edited the python installer as described then ran it with python. I had not downloaded wine. It asked me some questions, I answered yes to UBUNTU and it just ran…and downloaded WINE and installed it automagically. I am 152 years old and a grampa and I have no clue about anything. But this is WAAAAAY easier than Windows!!!
I have a desktop icon and everything. notepad++ seems to work fine so far, even the printer! WOW! This is pretty neat stuff.
:^)
And I figured VMWare or VBox was gonna be easier to run notepad++ with. Ha. WINE seems FINE.
Thanks a bunch for all the info on how to install. Great stuff.
Reply to this comment
February 27th, 2011 at 10:23 am
when i try to extract the installer ..at the end the TERMINAL says command not found.
and i have already installed WINE ..and should i follow the next 2 steps after this.
plz help !
Reply to this comment
March 14th, 2011 at 8:07 am
mount to Notepad++ folder by terminal
# cd .wine/drive_c/Program\ Files/Notepad++
and give this command
# wine notepad++
or give this command at any where ^^
# winefile
Reply to this comment
June 21st, 2011 at 3:04 am
Follow the steps below:
1. Install Wine
2. Download the npp installer from the internet.
3. Double click on the installer.
4. VOila, it installed.
Thanks :)
Reply to this comment
July 13th, 2011 at 6:46 pm
If you have access to a Windows machine, you can install the PortableApps version of Notepad++ there, then just copy it to your Linux machine and run it in Wine.
NP++ works in Wine, but with more bugs whenever it tries to interact with the filesystem, eg NppExec won’t work, file status autodetection crashes unless configured to be silent, and Ctrl+Tab requires you to click on the target file. Pity, because on Windows I love it.
Reply to this comment
July 28th, 2011 at 1:03 pm
After executing Python-Scriptfile it tries to connect to easynews.dl.sourceforge.net|69.16.168.245|:80 but it seems to be offline…
Reply to this comment
August 10th, 2011 at 6:45 pm
[...] HOWTO: Install Notepad++ on Debian Linux using Wine & Python [...]
September 19th, 2011 at 8:32 am
HI
I am getting the following message after the command (step 5)
# python npp-installer.py
(try: 6) http://easynews.dl.sourceforge.net/sourceforge/notepad-plus/npp.4.3.Installer.exe
Connecting to easynews.dl.sourceforge.net|69.16.168.245|:80… failed: Connection timed out.
Retrying.
Can u detect the issue here
thank you
raghul
Reply to this comment
September 26th, 2011 at 5:56 am
On Ubuntu 11.04, I just installed wine and them used default windows npp installer.
Reply to this comment
September 30th, 2011 at 7:26 am
Why don’t you try Geany which is a native GNU/Linux application? It uses the same edit component with Notepad++ and is way more stable than npp!
Reply to this comment
November 4th, 2011 at 11:04 pm
I am having issue as Raghul and Whyte where the npp.4.3.Installer.exe are not there.
And I tried to get the latest npp version from sourgeforce.net.
Downloaded from Window and copy to /root/npp-installer
and issue command # wine ./npp.5.9.Installer.exe and get NSIS Error.
Anyone can help?
Reply to this comment
November 5th, 2011 at 1:26 am
I manage to install and run the notepad++ in wine.
What I did is I download the previous release npp.5.8.7.Installer.exe.
So I am not sure if the latest release npp.5.9.Installer.exe download was corrupted.
Thanks to Kushal for this writeup.
Reply to this comment
February 25th, 2012 at 10:15 am
Thanks for this. Really useful. But the script is a little out of date now. For anyone who needs it, edit the installer script as follows:
open npp-installer.py in your second favorite text editor, and replace the lines beginning with:
os.system
as follows:
os.system(“wget http://download.tuxfamily.org/notepadplus/5.9.8/npp.5.9.8.Installer.exe“)
os.system(“wine ./npp.5.9.8.Installer.exe”)
or the newest url and installer version which you can find at the notepad++ homepage.
Thanks again for the howto!
Reply to this comment
April 9th, 2012 at 7:12 pm
It’s really sad, that a great open source editor like this is still not available for Linux.
I use Ubuntu and install it like this,
1. I download the notepad++.exe into my home folder and rename it to – it’s shorter – to npp.exe
2. Installation of wine: sudo apt-get install wine
3. Installation of notepad++: wine “/home/username/npp.exe”
Done.
Reply to this comment
Daniela Reply:
June 3rd, 2012 at 3:17 am
Thanks, works great!
Reply to this comment
gio Reply:
June 3rd, 2012 at 10:11 am
But I found out, that the wine integration of notepad++ has some bug – at least since Ubuntu 12.04. So when I work with notepad++, after some time, all my menus – on all windows – disappear, and I have to log out and log in again.
I don’t know if I’m the only one with this issue, but since that I work wether with the “Webocton Scriptly” (under wine too) or with Aptana Studio 3 (wich has a Linux installer).
Reply to this comment
April 20th, 2013 at 2:40 pm
NPP should have a linux native version. *hint hint*
Reply to this comment