Ubuntu – Run notepad++.exe from terminal


How can I run notepad++.exe from terminal?

It's located under /home/jon/.wine/drive_c/Program Files/Notepad++/notepad++.exe but when I execute

sudo /home/jon/.wine/drive_c/Program Files/Notepad++/notepad++.exe

it returns

sudo: /home/jon/.wine/drive_c/Program: command not found

Best Answer

If the file you are trying to create or edit does not require root privilege, run this:

wine /home/jon/.wine/drive_c/Program\ Files/Notepad++/notepad++.exe

If it does require root permission at all, install the notepad++ with your root account after having been logged in as root (e.g. by executing sudo -s -H), log out, and run:

sudo wine /home/root/.wine/drive_c/Program\ Files/Notepad++/notepad++.exe

But usually, as has been pointed out, running wine applications as root is not recommended since wine apps rely on wine and the source code of wine apps may or may not be reviewed, meaning there is an increased amount of risk involved in doing so.

Related Question