You are not logged in.

#1 2009-07-10 12:25:52

whoops
Member
Registered: 2009-03-19
Posts: 891

[SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

Hi!


I'm trying to access the output shown in vc / tty in X. Just "cat /dev/tty1" in an xterminal seems to be way off track, so is "cat /dev/vt/1"... any hint on how to do it right?


Thx!

Last edited by whoops (2009-07-10 19:26:13)

Offline

#2 2009-07-10 19:07:17

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

it doesn't work like that.

There are program for this, but screen is the simplest maybe.

Offline

#3 2009-07-10 19:25:48

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

Oh, thanks - I was stubbornly searching in the wrong place then, thinking I just couldn't find it!

Last edited by whoops (2009-07-10 19:26:49)

Offline

#4 2009-07-10 19:39:05

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

Using the current scheme:
cat /dev/vcsN (without text attributes)
cat /dev/vcsaN (with text attributes)

But using the old devfs scheme (Arch Uses this scheme now [#1] pendin issue)
cat /dev/vcc/N (without text attributes)
cat /dev/vcc/aN (with text attributes)

http://bugs.archlinux.org/task/11352 FS#11352 - [udev] Use /dev/tty* standard instead of old /dev/vc*

Offline

#5 2009-07-10 20:00:06

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

Oh, so it works after all, thx. Still a little confused, but for now "sudo cat /dev/vcc/#" working is enough for me. Didn't find it, because for some reasons it requires root privileges while...
- /dev/tty# are all readable (but not working)
- /dev/vc/# have the right permissions - can access all the user is logged into, none else (still, wrong folder, but that "right permissions"-thing did catch me).

Offline

#6 2009-07-10 21:19:30

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED] output VC/tty => xterminal ? (cat /dev/?? or something?)

whoops wrote:

Oh, so it works after all, thx. Still a little confused, but for now "sudo cat /dev/vcc/#" working is enough for me. Didn't find it, because for some reasons it requires root privileges while...
- /dev/tty# are all readable (but not working)
- /dev/vc/# have the right permissions - can access all the user is logged into, none else (still, wrong folder, but that "right permissions"-thing did catch me).

In this scheme

- /dev/tty# are symlinks to /dev/vc/#, and always shows as "lrwxrwxrwx", don't care.

But tty devices not are for the "capture" purpose

a better "cat" is to use "fold" or better setterm


fold -w80 /dev/vcs12 (current scheme)
fold -w80 /dev/vcc/12  (devfs scheme [Arch Linux])
setterm -dump 12 -file /proc/self/fd/1

PS: Because a bug, there no anymore vcs1 and vcsa1 in 2.6.30. http://lkml.org/lkml/2009/7/10/369

Offline

Board footer

Powered by FluxBB