Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, I wrote a script which will run in ubuntu box and will display in tty1, without loading the gdm. The problem is when I plugged in a usb ...
  1. #1
    kal
    kal is offline
    Just Joined!
    Join Date
    Aug 2009
    Posts
    2

    Unhappy How to direct syslog messages to particular tty

    Hi All,

    I wrote a script which will run in ubuntu box and will display in tty1, without loading the gdm. The problem is when I plugged in a usb drive it will cause some messages to be printed into the current tty user logged in.

    Like : [sdb] Assuming drive cache: write through

    This is really disturbing when a user is running the script. Is there anyway that I can direct all the messages to some other tty which I don't use.

    Thanks in adv,

    Kal

  2. #2
    Linux Newbie x1a4's Avatar
    Join Date
    Dec 2006
    Posts
    123
    Hi. Using shell redirection should work. For example, to display the contents of file ~/testfile on tty4 I would do something like this:
    Code:
    cat ~/testfile > /dev/tty4
    Linux user 439038 | Ubuntu user 20892

  3. #3
    kal
    kal is offline
    Just Joined!
    Join Date
    Aug 2009
    Posts
    2
    Quote Originally Posted by kal View Post
    Hi All,

    I wrote a script which will run in ubuntu box and will display in tty1, without loading the gdm. The problem is when I plugged in a usb drive it will cause some messages to be printed into the current tty user logged in.

    Like : [sdb] Assuming drive cache: write through

    This is really disturbing when a user is running the script. Is there anyway that I can direct all the messages to some other tty which I don't use.

    Thanks in adv,

    Kal
    Quote Originally Posted by x1a4 View Post
    Hi. Using shell redirection should work. For example, to display the contents of file ~/testfile on tty4 I would do something like this:
    Code:
    cat ~/testfile > /dev/tty4
    Thanks for ur reply x1a4. But that is not my case. Plug in a usb at a random time and system printing a message abt that in currently opened tty is different. This is something I can't redirect (since I don't know where this happens). If I can disable the system from printing these events to the tty might help. But I don't know how to do that

    Kal.

Posting Permissions

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