LinuxQuestions.org
Help answer threads with 0 replies.
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, 06:34 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,130
Blog Entries: 1

Rep: Reputation: Disabled
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, 07:37 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,585

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 12:23 PM. Reason: s,/etc/fstab,/etc/inittab
 
Old 11-04-2018, 09:46 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,130
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
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, 12:23 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,585

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:50 AM
cat /dev/tty issue m1organb Linux - Newbie 1 10-03-2011 09:20 PM
/dev/tty vs /dev/pts anshexp Linux - Kernel 1 09-21-2009 10:13 AM
LXer: Neuros open set-top box puts Linux in living rooms LXer Syndicated Linux News 0 07-31-2008 11:30 AM
cat /dev/tty? yoshiznit123 Linux - Security 3 12-14-2005 01:44 PM

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

All times are GMT -5. The time now is 05:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration