LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2018, 05:34 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
How to set /dev/tty as living log?


Hi,
I found this in very old book abou UNIX administration
Code:
$ write  foo > /dev/tty
I came to idea to redirect output of commands in similar way, eg.
Code:
$ mirror-slackware-current.sh > /dev/tty5
It works now. But still I have to login using /dev/tty5. I want this device to work without shell. I don't know I am clear enough. Commonly switching to /dev/tty5 ones is being welcomed and prompted to provide name and password. I want that switching to /dev/tty5 just opens plain screen - no system welcome. no prompt, no possibility to use /dev/tty5 as login device. It just should show eg. output of command as above.
 
Old 11-04-2018, 06:37 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
That would need several modifications:
  • In /etc/inittab, comment out this line:
    Code:
    c4:12345:respawn:/sbin/agetty 38400 tty5 linux
  • Create the device if need be. As done in the Slackware installer:
    Code:
      if [ ! -r /dev/tty5 ]; then
        mknod /dev/tty5 c 4 5
        chown root:tty /dev/tty5
        chmod 620 /dev/tty5
      fi
Good luck.

PS Caveat: you probably won't be able to scroll up or down in /dev/tty5

Last edited by Didier Spaier; 11-04-2018 at 11:23 AM. Reason: s,/etc/fstab,/etc/inittab
 
1 members found this post helpful.
Old 11-04-2018, 08:46 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Quote:
Originally Posted by Didier Spaier View Post
[*]In /etc/fstab , comment out this line:
Code:
c4:12345:respawn:/sbin/agetty 38400 tty5 linux
I suppose it is about /etc/inittab, /etc/fstab contains partition to auto mount.

No matter
Code:
$ echo foo > /dev/tty8
is enough. I suppose kernel just open this device. The only restriction is the user has to belong to tty group.
 
Old 11-04-2018, 11:23 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Quote:
Originally Posted by igadoter View Post
I suppose it is about /etc/inittab, /etc/fstab contains partition to auto moun.
Yes, fixed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/tty stdin Xris718 Linux - Hardware 6 07-13-2012 09:50 AM
cat /dev/tty issue m1organb Linux - Newbie 1 10-03-2011 08:20 PM
/dev/tty vs /dev/pts anshexp Linux - Kernel 1 09-21-2009 09:13 AM
LXer: Neuros open set-top box puts Linux in living rooms LXer Syndicated Linux News 0 07-31-2008 10:30 AM
cat /dev/tty? yoshiznit123 Linux - Security 3 12-14-2005 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration