Find the answer to your Linux question:
Results 1 to 9 of 9
I use the emacs-style cursor navigation in my terminals (ie Ctrl + (p,n,b,f,etc.)). Sometimes I must accidentally hit a wrong shortcut because i get absolutely random print jobs sent to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80

    Accidentally printing from STDIN in terminal???


    I use the emacs-style cursor navigation in my terminals (ie Ctrl + (p,n,b,f,etc.)). Sometimes I must accidentally hit a wrong shortcut because i get absolutely random print jobs sent to my printer when im using the terminal. According to cups, these Name of these jobs are all "stdin". It really sucks because when this happens i get like 100+ jobs sent to my printer. This happens frequently enough that it's a pain in the ass, but infrequently enough that i never know what keys i hit when it happens. Anyone know what I'm doing? I use mainly xterm and Eterm. Any help would be greatly appretiated.

  2. #2
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Does this problem occur when you are in a specific directory or everywhere?
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  3. #3
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80
    hmmm... I seem to remember alot of prompts from my home directory being on the printed pages:

    Code:
    me@localhost$~
     (output of progs) 
    So I'm going to go with it happens in my home dir.
    Any elaboration on why it would matter would be cool...

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    What I was thinking was that may be you have a symlink to /dev/printer (the printing device) in your executing dir and that some char (or char combination) from your terminal would be mapped to it. So a command like
    Code:
    > p (p being the symlink)
    would dump stuff from STDIN to your line printer. An ls -al in your dir would make this sure.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  6. #5
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80
    Kinda makes sense. But I would like to think i could recognize this problem as i'm pretty familiar with the dotfiles and links in my home dir. And i don't have write permissions to /dev/ files (though i will have to double check if i have write perm for printer). Regardless, it wouldn't send 100+ jobs at a time. No matter how much text gets redirected it would just be one job if im not mistaken. So I don't think its due to a sym link i don't know about.
    But thanks alot for the suggestion. This is really driving me crazy.

    A few things i should have made clear:
    -This problem never happens when i leave the box on and unattended overnight or during the day. Only when im typing stuff in an x terminal.
    -The 100+ jobs get sent to my printer all at once. Not incrementally.
    -My prompt is included randomnly on the actual paper when these jobs print.
    -A process shows up when this happens (and hogs 99&#37; cpu). The 'ps aux' owner is user 'lp' and i can't kill it unless i am root, but i can use cups to cancel the job as a normal user. The execution looks somethng like "usb ://<my printer name><lots of crap>" when shown by 'ps aux'

    Any other thoughts?

  7. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Any other thoughts?
    Yeah, use vi-style navigation!

  8. #7
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80
    Yeah, use vi-style navigation!
    ...Any other thoughts?

  9. #8
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Not really - I don't like emacs so never bothered to learn the unintuitive myriad key combinations it uses. Would your shortcut be submitting all the files in your current directory to be printed, or is it really as absolutely random as your first post suggests?

  10. #9
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80
    it was unintuitive at first, but now it's branded into my subconscious.

    To answer your question the printed pages are not of the files in my home dir, its like the warning and info messages, like
    Code:
    gtkWidget blah blah blah
    when im running, say, firefox in the background and putzing around my terminal with many (Ctrl,alt + whatever)'s going on.

Posting Permissions

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