You are not logged in.

#1 2010-04-20 15:30:14

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

how to redirect tty1 output

Hi!

When a graphical application echoes something, that something is written on the ctrl+alt+F1 screen (which I think is tty1, correct me if I'm wrong).

I would like to see what is written in tty1 in urxvt in my window manager (so, without having to do ctrl+alt+F1 everytime).

I launch X with startx, I don't use a login manager (I don't know if it's important).

I think I could do "startx > file" and then cat that file from urxvt but that solution isn't very elegant.
I heard that I could do this with screen but I've never used this application and I'm not sure it's the right tool for the job.

Any help is appreciated.
Thanks.

Offline

#2 2010-04-20 15:34:02

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: how to redirect tty1 output

As I said on irc, screen/tmux is the sanest way to do it.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2010-04-20 15:37:38

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: how to redirect tty1 output

Reading Mr.Elendig's comment I understand I might not be fully aware of the issues here. Nevertheless, some ideas:

- You can start a graphical application from a terminal and read its output there.
- You can edit the launcher to use nohup.
- You can edit the launcher to redirect the apps output to a file.
etc.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#4 2010-04-20 15:44:58

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

Re: how to redirect tty1 output

Mr.Elendig wrote:

As I said on irc, screen/tmux is the sanest way to do it.

Excuse me if you thought I ignored your answer, I actually started reading things about screen (I never used it yet).
But what is weird to me is that X applications are usually not started with a terminal (but using your window manager), so all the error messages they print go in tty1, so the only way to read these error messages is to use a tool like screen?
Actually I just want to put some print statements in the rc.lua of awesome (to output client windows attributes for example), so I can understand better what's going on.
Instead of making awesome print message to stdout I could of course make it print messages to a file, maybe I will do it this way if I don't find any other solution.

fsckd wrote:

- You can start a graphical application from a terminal and read its output there.
- You can edit the launcher to use nohup.
- You can edit the launcher to redirect the apps output to a file.
etc.

Yes but what if I want to see X's own error messages?
I can't start X in a terminal emulator in X (or even if I could, I think that would be a bit too dirty).

Last edited by pokraka (2010-05-09 16:46:03)

Offline

#5 2010-04-20 15:52:26

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: how to redirect tty1 output

Heh, well if it's X or the wm you are probably stuck with doing what you said above with startx, then read the output file. I.e. nohup startx or startx > outfile. Then read it in a terminal with cat file.

(Was Mr.Elendig suggesting running startx from screen/tmux? That would be elegant if it works.)

Last edited by fsckd (2010-04-20 15:53:26)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#6 2010-04-20 16:21:07

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

Re: how to redirect tty1 output

I finally managed to do what I wanted using screen.
I launched startx from screen and then I used screen -x to see what's on tty1.
Thanks.

Offline

Board footer

Powered by FluxBB