Results 1 to 8 of 8

Thread: leafpad 13.04

  1. #1
    Join Date
    Oct 2007
    Beans
    Hidden!

    leafpad 13.04

    why is it thought that a text editor is the better way to edit some terminal code???
    why is it better than just typing in the terminal box and saving..???
    does Leafpad have a edit feature that I am unaware of that makes it better to edit with it???

  2. #2
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: leafpad 13.04

    The terminal is just a shell for running commands. There are commands that will print or echo the contents of a file to the terminal. But to edit that file we need to run a command that loads an editor. Once upon a time all programs were loaded by commands in a terminal but it was only possible to run one program at a time. Linux had an advantage over Microsofts DOS. It had multiple terminals called consols or tty. So, a different program could be run by loading them into different consols.

    So, in answer to your first two questions - because it is easier to do it that way with less of a risk of typing errors that would wreck the OS.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  3. #3
    Join Date
    Dec 2007
    Beans
    12,521

    Re: leafpad 13.04

    Quote Originally Posted by ub9876 View Post
    why is it thought that a text editor is the better way to edit some terminal code???
    why is it better than just typing in the terminal box and saving..???
    does Leafpad have a edit feature that I am unaware of that makes it better to edit with it???
    What is your real question?

    Leafpad is just like Notepad in Windows.

    Lubuntu (if that is what you're using) also has nano by default if you prefer.

  4. #4
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: leafpad 13.04

    it sounds like you need an editor to change code. But I dont use it and have had no problems . And I dont see any dropdown selection that says use this to edit code. So I am asking why is it safer to type into an editor and then paste it in the code....as opposed to just typing it into the code in the terminal box..???

  5. #5
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: leafpad 13.04

    Quote Originally Posted by ub9876 View Post
    it sounds like you need an editor to change code. But I dont use it and have had no problems . And I dont see any dropdown selection that says use this to edit code. So I am asking why is it safer to type into an editor and then paste it in the code....as opposed to just typing it into the code in the terminal box..???
    Yes you need a text editor to edit a file. That editor does not need to be graphical. The editors: ed, emacs, vim and nano are terminal based. The editors: gedit, leafpad and even Libre Office Writer are graphical editors. Are you using a terminal based editor? What command do you use to do what you are doing?

  6. #6
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: leafpad 13.04

    Quote Originally Posted by ub9876 View Post
    it sounds like you need an editor to change code. But I dont use it and have had no problems . And I dont see any dropdown selection that says use this to edit code. So I am asking why is it safer to type into an editor and then paste it in the code....as opposed to just typing it into the code in the terminal box..???
    If you are simply entering commands in the terminal, the only reason for doing it this way is to give you a chance to make sure that you have not made a typing error that could destroy your system by wiping the disk clean of all data. We could give examples of such an error -- but forum rules prohibit it because a few folk would try it and then complain about losing all their data.

    However you can get the same advantage by simply taking the time to examine your typed command very carefully, before hitting the ENTER key. The machine will not do anything at all until you hit ENTER, so it's just as safe to do it this way.

    The editor is needed only if you want to change an existing script.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  7. #7
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,280
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: leafpad 13.04

    Quote Originally Posted by ub9876 View Post
    why is it thought that a text editor is the better way to edit some terminal code???
    why is it better than just typing in the terminal box and saving..???
    does Leafpad have a edit feature that I am unaware of that makes it better to edit with it???
    first, what do you consider "terminal code"?
    first we maybe need to clarify your terminology. what do you consider the terminal box? how would you "save" in a terminal box and what would you "save" it as?

    leafpad is a GUI text editor for linux (there's also Gedit (gnome) and Kate (KDE), just like notepad is a text editor for windows.

  8. #8
    Join Date
    May 2009
    Location
    Indiana
    Beans
    1,971
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: leafpad 13.04

    Indeed. A text editor is needed for editing text files (to be as profound as possible). If you're changing configuration files, you need a text editor, whether it's graphical, curses, or simply command-line. If you're entering terminal commands, you can simply type them in the terminal. You could type them in a text editor, a word processor, or many other applications that allow typing and then copy and paste them to the terminal. But I can see little benefit to that.
    Jane, stop this crazy thing!

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
  •