Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
2  
I have a question. Why would you want to run notepad++ under wine? Ubuntu has a large selection of excellent text editors. –  Evan Kroske Oct 20 '10 at 0:07
add comment

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
You can just use "wine /home/jon/...". sudo can be skipped as root privileges are normally not required for running wine apps. –  W. Goeman Oct 19 '10 at 22:51
    
It depends. Perhaps the questioner wants to create and/or edit a file in the editor where root permission is needed. –  Gödel Oct 19 '10 at 22:55
    
Thans. I can run it but if I omit sudo! I want to edit files but with sudo it says wine: /home/jon/.wine is not owned by you :( what should I do now? I am in full control of the computer and I have no problems running other stuff. –  Jon Doe Oct 19 '10 at 23:07
    
@Jon Do this: $ sudo -s -H and then install notepad++ with the root account. You only installed notepad++ for user jon but not for root. –  Gödel Oct 19 '10 at 23:10
2  
@Gödel I think that he created .wine dir with root privileges and now he cannot run wine. I would chown the dir to the correct user or delete and recreate it. Running Wine as root is not recommended –  Luca Oct 19 '10 at 23:41
show 3 more comments

The Space in the filename/path may be the main issue..

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

Should be..

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

and i do belive you must tell wine what exe to run.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.