Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How do I use Notepad2?

  1. #1
    Join Date
    Sep 2006
    Location
    Broussard, La
    Beans
    1,141
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    How do I use Notepad2?

    There is a little known windows program named Notepad2. I used this to open simple text files in 8.04, but can not get it to work in 9.04.

    Any ideas?
    Laptop - Acer 5560-7414,AMD A6-3420M 2.4 GHTz, 8GB DDR, 500GB WD Scorpio, AMD Radeon HD 6520, 16.04 64bit
    Work - Asus M4A785TD-V EVO, AMD Phenom(tm) II X4 955, 16GB DDR3, WD1500HLFS 14.04 64bit

  2. #2
    Join Date
    May 2006
    Location
    Lake Placid, Florida, USA
    Beans
    2,019
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How do I use Notepad2?

    Why not use gedit , it's in your accessories menu.

  3. #3
    Join Date
    Aug 2009
    Location
    deep dark forest
    Beans
    183
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How do I use Notepad2?

    Idea: you go read about a proper way to post questions to forums. This would help, sure.
    Nobody would answer this way.
    First gooooooooooogle, then ask.

  4. #4
    Join Date
    Sep 2006
    Location
    Broussard, La
    Beans
    1,141
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Re: How do I use Notepad2?

    I currently do, but it shows all of the printer control codes, which is aggravating. Is there a way to disable that feature?
    Laptop - Acer 5560-7414,AMD A6-3420M 2.4 GHTz, 8GB DDR, 500GB WD Scorpio, AMD Radeon HD 6520, 16.04 64bit
    Work - Asus M4A785TD-V EVO, AMD Phenom(tm) II X4 955, 16GB DDR3, WD1500HLFS 14.04 64bit

  5. #5
    Join Date
    Sep 2006
    Location
    Broussard, La
    Beans
    1,141
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Re: How do I use Notepad2?

    Quote Originally Posted by Barafu Albino Cheetah View Post
    Idea: you go read about a proper way to post questions to forums. This would help, sure.
    Nobody would answer this way.
    People like you make these forums worse. I asked a simple question for those who are familiar with my problem.I do not expect an answer, just input from others. Ideas are what makes this world go round. If you do not have an answer or a constructive alternative to the question, please, oh please, just be quiet.
    Laptop - Acer 5560-7414,AMD A6-3420M 2.4 GHTz, 8GB DDR, 500GB WD Scorpio, AMD Radeon HD 6520, 16.04 64bit
    Work - Asus M4A785TD-V EVO, AMD Phenom(tm) II X4 955, 16GB DDR3, WD1500HLFS 14.04 64bit

  6. #6

    Re: How do I use Notepad2?

    Should be pretty straightfoward, I use hardy but just happened to have a 9.04 live cd running and it ran no problem.
    It was a 64 bit live cd but that shouldn't matter,wine is 32 bit anyway.

    Open winecfg and make sure the windows version is set to xp. (that's all I did and it ran.
    Are you using the standard notepad2 or one of the mods?

    If you get it going there is something simple you can do to make it easier to run, ect.

    for the standard Notepad2.exe
    This will make Notepad2 open with the simple command of notepad2, this way you can easily make a desktop launcher to open it with (or drag launcher to top or bottom panel ) plus have multiple ones if you want the modded versions

    Code:
    sudo cp /usr/bin/notepad /usr/local/bin/notepad2
    Now take your Notepad2.exe, rename it notepad2.exe and place in inside your windows folder in wine's drive_c (with all the other .exe's like regedit, notepad, ect.

    To test open a terminal and run
    Code:
    notepad2
    For a launcher command again just use notepad2

    If you want other Notepad2 mods just do the same thing but up the number
    notepad3.exe (command of notepad3), ect.

    Note that I'm making the .exe lowercase so as to match the wrapper script
    (notepad2.exe - notepad2

  7. #7
    Join Date
    Sep 2006
    Location
    Broussard, La
    Beans
    1,141
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Re: How do I use Notepad2?

    Thanx mc4man! That got it to open from CLI. What I am trying to do is have the file open by double clicking. I have tried setting the 'Open With' property to notepad2 and notepad2 %, but both of those only open a blank notepad.

    Any ideas?
    Laptop - Acer 5560-7414,AMD A6-3420M 2.4 GHTz, 8GB DDR, 500GB WD Scorpio, AMD Radeon HD 6520, 16.04 64bit
    Work - Asus M4A785TD-V EVO, AMD Phenom(tm) II X4 955, 16GB DDR3, WD1500HLFS 14.04 64bit

  8. #8

    Re: How do I use Notepad2?

    I think you'll find it very hard or impossible to use a d. left click or r. click to get a file to open in notepad2.

    Maybe search out some photoshop threads, I remember something similar, clicking on a image and having it open in photoshop (vs. just photoshop opening.

    Any l. or r. click option would use a userapp.desktop which sets up with a EXEC=<command> %f

    That works with linux apps but wine will path it wrong, at best here can produce an error popup generally like H:\ /home/doug/test.txt can't be found
    The H could also be a Z depending on drive detection in winecfg.

    From the command line to open a file in notepad2 it would look like this (My Documents = home folder
    Code:
     notepad2 C:\\windows\\profiles\\doug\\My Documents\\test.txt
    So you can see the pathing issue
    ( but if you fool around who knows

    If you set it up like previous post then drop the Notepad2.ini in the windows folder also, will save settings changes

  9. #9
    Join Date
    Mar 2005
    Location
    Texas
    Beans
    1,675
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How do I use Notepad2?

    Here is a script you might be able to use. I use this all the time to open stuff in word. With a little editing (The PROGRAM variable, really) it should work for you. Then you can save it as an executable, and stick it somewhere (I use ~/.bin, and then add ~/.bin to my PATH variable, but I suppose you could put it in /usr/local/bin ). Then you can call it from the command line.


    Code:
    #!/bin/sh
    # Launch Microsoft Word either by itself or with the provided file name to open.
    # Fully qualifies pathname of the Windows Application to launch
    PROGRAM="C:\\Program Files\\Microsoft Office\\OFFICE11\\WINWORD.EXE"
    
    # If launched with no parameters, just run the application and exit.
    if [ $# = 0 ]; then
        wine "$PROGRAM"
        exit 0
    fi
    
    # Get the file to open and the directory where it resides.
    FILE_NAME=`basename "$1"`
    DIR_NAME=`dirname "$1"`
    
    # Convert directory from relative to fully qualified path.
    if [ `echo $DIR_NAME | cut -c 1` != "/" ]; then
        DIR_NAME=`pwd`/$DIR_NAME
    fi
    
    # Change to the directory, run winepath to see if the directory maps to a fake
    # windows drive.  WINEPATH_ERRS is 1 if not and 0 if yes.
    cd "$DIR_NAME"
    winepath "$DIR_NAME" > /tmp/winepath.chk 2>&1
    WINEPATH_ERRS=`cat /tmp/winepath.chk | grep "Warning" | wc -l`
    
    # If we cannot edit the file, show error box and terminate.
    if [ $WINEPATH_ERRS -gt 0 ]; then
        kdialog --title "WINE/Microsoft Office Error!" --error \
      "ERROR:
      Attempting to open a file using a Windows Application where the file is not in a location accessible by your current WINE configuration.  To open this file you must either:
      - Move the file ($1) to a valid location.
      - Ensure that ($DIR_NAME) is accessible to WINE.
      Fake Windows drives are configured as softlinks (ln -s) in the directory (~/.wine/dosdevices).  The current configuration of this directory is:
        $(ls -l ~/.wine/dosdevices | tr -s " " | cut -d " " -f 9-) "
        exit 1
    fi
    
    # Finally run the application.
    wine "$PROGRAM" "$FILE_NAME"
    100 buckets of bits on the bus,
    100 buckets of bits,
    Take one down, short it to ground,
    FF buckets of bits on the bus.

  10. #10
    Join Date
    Nov 2008
    Location
    Germany
    Beans
    217
    Distro
    Ubuntu Development Release

    Re: How do I use Notepad2?

    Quote Originally Posted by lsutiger View Post
    There is a little known windows program named Notepad2. I used this to open simple text files in 8.04, but can not get it to work in 9.04.

    Any ideas?
    Sorry if I may sound a bit harsh but... why the heck do you use a windows program to open text files? If you want some simple editor you may try leafpad...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •