Results 1 to 10 of 10

Thread: Konsole

  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Konsole

    Like many others, I am not too confident with the CLI, and sometimes need to look up on the internet to find the right command. To avoid typo's I prefer to copy/paste commands. BUT>>>>>!
    If I middle click paste into konsole, it pastes AND EXECUTES...
    Now if I have stupidly copied some dd or cp or rm command, and the example on the net refers to say sdb1 I could quite easily bork/wipe my HDD.
    How do I stop konsole from executing when something is pasted in, so I can check and edit the commands if needed?

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  2. #2
    Join Date
    Sep 2009
    Location
    Pakistan
    Posts
    201

    Default Re: Konsole

    Quote Originally Posted by wakou View Post
    Like many others, I am not too confident with the CLI, and sometimes need to look up on the internet to find the right command. To avoid typo's I prefer to copy/paste commands. BUT>>>>>!
    If I middle click paste into konsole, it pastes AND EXECUTES...
    Now if I have stupidly copied some dd or cp or rm command, and the example on the net refers to say sdb1 I could quite easily bork/wipe my HDD.
    How do I stop konsole from executing when something is pasted in, so I can check and edit the commands if needed?
    I think that the terminal only executes the pasted commands automatically if they are spread over more than one line. Is this true, from what you have experienced?
    "Darkness called But I was on the phone, so I missed him. I tried to *69 Darkness, but his machine picked up. I yelled "Pick up the phone, Darkness!," but he ignored me. Darkness must have been screening his calls."

  3. #3

    Default Re: Konsole

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Are you copying a newline at the end of the command you are copying? To
    test paste into something like 'kate' or 'gedit' or something and if you
    have the cursor on the line AFTER the command then there is a newline and
    that is why it is executing (because you are pasting an [Enter] in there).

    Good luck.





    wakou wrote:
    > Like many others, I am not too confident with the CLI, and sometimes
    > need to look up on the internet to find the right command. To avoid
    > typo's I prefer to copy/paste commands. BUT>>>>>!
    > If I middle click paste into konsole, it pastes AND EXECUTES...
    > Now if I have stupidly copied some dd or cp or rm command, and the
    > example on the net refers to say sdb1 I could quite easily bork/wipe my
    > HDD.
    > How do I stop konsole from executing when something is pasted in, so I
    > can check and edit the commands if needed?
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJLBBqwAAoJEF+XTK08PnB57HcQAMjKoTa9fAzza8EyoGkxk236
    F+lVOy/muREBECNzcJCHbhYsLvUDm7sFkg3rFhvVE4GH9qE81s7wd6UniDCLpK0G
    keS8pAw2yXvNOaB095KcEnD95hoxwhMwuetO+tfenQcqsXby1o/rePg2SEn7hIP1
    WXKOdgBSi4jl5YY2YyLG0POKPWT05XF7aRVN198bw3U8oWsNp+qQQIzPjF/Olpft
    K4xEvPhy2kaC9O9slvxDRJC+onnfIdanyCyQBfRazrJiDVd2EZi4S3/T+rdzqaMa
    CduH2il/fDUAjOMfPqKql4w6si4VlYORQTY6wPqts1Gi5/D2fBvk5GtQ+R1b1c0j
    gWzDBXSdp9/JouODq8YB25O7K8N5ZmIi2AiWcfMfMh823mTy94ev/+2Ddat0cSDf
    v3axM7FF+ltQhEi2HSovEQpneyD7hORGPxUOfEE1gmWq7nSYumSmHaOEDsLbMmck
    64hIhubyEsE+jtA3s1H8KxBWZaJgX+w5ZyVO+0tdiMRAlru5UEiB6m/082SfFOOe
    mYgNQSiWS0RsKTg5l7CJS3BCriCkpNY6OXdltA86ORbXwtbnWaSJKcuuM72BModl
    jSvn/Y5kqC4NLcy+iyyZk6wi1FS2vtVkazYqzMhz8SfI+BzbXG5C8VJx+nXOqH8c
    FIo7wt3yrBG4rsGE/bly
    =w1GX
    -----END PGP SIGNATURE-----

  4. #4

    Default Re: Konsole

    Are you sure(I don't have Konsole to test with) afaik this is related to copying the end of line, at least I've encountered this in other terminals.

    i.e
    Code:
    echo "this long line with a new line"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    If you start either from the left and highlight over the end you'll get a new line, similar if you do it from far right beyond the last char ("). But actually starting on the right " and highlighting to the beginning avoids this.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Smile Re: Konsole

    What clever penguins you all are! I think that all three of you are right, I must somehow be copying and pasting a <CR>.

    Quote Originally Posted by ab@novell.com
    Are you copying a newline at the end of the command you are copying? To
    test paste into something like 'kate' or 'gedit' or something and if you
    have the cursor on the line AFTER the command then there is a newline and
    that is why it is executing (because you are pasting an [Enter] in there).
    I just tried this in nano, and you are correct.

    Now is there some way to add something in bashrc to stop this?

    I am starting a new thread, because this very nearly caused a HDD wipe out (lucky I was not SU in the konsole), and the instruction was from?


    Live USB stick - openSUSE


    V bad, 2/10 must try harder!

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: Konsole


    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  7. #7
    JosephKK NNTP User

    Default Re: Konsole

    On Thu, 19 Nov 2009 12:56:02 GMT, wakou
    <wakou@no-mx.forums.opensuse.org> wrote:

    >
    >What clever penguins you all are! I think that all three of you are
    >right, I must somehow be copying and pasting a <CR>.
    >
    >ab@novell.com Wrote:
    >> Are you copying a newline at the end of the command you are copying?
    >> To
    >> test paste into something like 'kate' or 'gedit' or something and if
    >> you
    >> have the cursor on the line AFTER the command then there is a newline
    >> and
    >> that is why it is executing (because you are pasting an [Enter] in
    >> there).

    >
    >I just tried this in nano, and you are correct.
    >
    >Now is there some way to add something in bashrc to stop this?
    >
    >I am starting a new thread, because this very nearly caused a HDD wipe
    >out (lucky I was not SU in the konsole), and the instruction was from?
    >
    >
    >'Live USB stick - openSUSE' (http://en.opensuse.org/Live_USB_stick)
    >
    >
    >V bad, 2/10 must try harder!


    How about just copying the commands into Kate and saving the file
    after finishing the edits to make it appropriate to your machine /
    situation? Then execute the resulting script.

  8. #8
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: Konsole

    TY JosephKK, I'm am trying to "train" myself to do just that now, after my near disaster.

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  9. #9
    JosephKK NNTP User

    Default Re: Konsole

    On Sun, 22 Nov 2009 10:26:01 GMT, wakou
    <wakou@no-mx.forums.opensuse.org> wrote:

    >
    >TY JosephKK, I'm am trying to "train" myself to do just that now, after
    >my near disaster.


    Sounds like i might have helped. Cool.

  10. #10
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: Konsole

    Wakou, if you copy and execute scripts from websites, it might be a good idea to be a little paranoid. People make mistakes, their system might be different from yours, and there can be malicious stuff out there. At least check the man pages, and be sure you know what it will do before running it as root.

Posting Permissions

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