Darac Marjal wrote: > jamie@jatos.co.uk wrote: > > Firstly need to know the name of the feature that allows me to > > access /dev/tty0, /dev/tty1 etc and switch between them by press > > alt+F1, alt+F2 and so on. > > These are "Virtual Terminals" or "Virtual Consoles". They are "Virtual" > in the sense that a serial console is a "real console" and the virtual > consoles just provide a convenient local version. Yes. > > Secondly, how would I configure this feature, in particular I'd > > like to configure it to allow me to press probably alt+F7 and > > access a serial console at /dev/ttyS0, would need a baud rate of > > 9600 with common settings for everything else. vt7 is usually running your desktop session. (Or vt8 if you have restarted it and it has the vt session bug that doesn't free vt7.) So you do not want to use it. > /etc/inittab. There should be some example serial console lines > commented out for you to play with... > > Ah, no. What am I talking about. If you enable a serial console in > /etc/inittab, that will start a terminal SERVER on /dev/ttyS0 (so you > can connect a terminal to it and control your PC from the terminal). Right. That is for starting a serial console getty login to the local machine. Not for starting a serial terminal out to other machine. > I believe you're wanting to use your PC as a terminal, and use it to log > into another device. In that case, I think you're still going to need a > program such as minicom. Yes. Will need to use a serial terminal emulator program. Such as minicom, ckermit, cu, screen or emacs. (Those are all MS-Hyperterm equivalents. Since MS-Hyperterm is a serial terminal emulator.) > But with some work you MIGHT be able to get it to start as a getty > (a 'getty' is the program that init starts on the virtual console > and which accepts your username/password before starting a shell). Scary! I am sure it is possible. But I think it would be ugly to do it that way. > > Essentially this is so I can get to the CLI on a Cisco router when > > its console port is connected via serial port referenced by the > > device name /dev/ttyS0 just by pressing alt+F7, instead having to > > install a terminal program. I believe this can be done. I am sure that it is possible. Never phrase something in the form of a challenge or people will work the puzzle to completion. But that doesn't make it the best way to do it. Cowboy up and install a serial terminal emulator program. It isn't difficult. On Debian it is trivial. Don't say that you don't want to do it. That is the wrong answer. Just do it. # apt-get install minicom Then select the vt that you wish to use, log into the console, start the program. Alt-F4 Login: username Password: ****** user@localhost:~$ minicom Then just leave it running forever. It will always be there when you come back to that vt with Alt-F4. You can set up minicom by using the -s option to configure and save it the settings you wish. I think minicom is the easiest to use of the traditional set of serial terminal emulators. If you are really into screen or emacs or whatever then you can use the built in serial emulators there instead. Whatever you choose simply leave it running on vt4 (or whatever vt you choose) and it will be there when you switch to it. Bob
Attachment:
signature.asc
Description: Digital signature