# Is there a way to see the text of tty7 without shutting down Xorg?

Is there a way to see the text of tty7 without shutting down Xorg, just like switching to another tty?

-

I presume you want to see the X server logs for your GUI under VT7 (Ctrl+Alt+F7). In other words, the text that gets printed if you were to do a text boot, login and type "startx" (before the script hands over to your DE).

If this is the case, you can simply open your Xserver logs:

less /var/log/Xorg.0.log


For boot logs that would appear prior to the console login & X greeter, check:

less /var/log/boot.log


The greeter creates its own logs. If you're using lightdm (the default greeter), then you'll find them all under:

/var/log/lightdm/

-
Actually I'm looking for the text before startx, the text before the greeter and possibly also what the greeter creates. When the desktop crashes - which it has done a lot, there is some text, like postgres starting and other things, that happens before startx –  Fsando Mar 21 '13 at 7:53

If you start X manually (startx or xinit) you'll see the text in whatever VT you issued the command in - unless you redirect it to a file or /dev/null (remember there are two streams here, stdout and stderr).

Usually however X is started automatically at boot by some display-manager (e.g. gdm, kdm or xdm), so you'll find the information in the Xorg-, *dm-, boot- and upstart-logs under /var/log. Other logs - like /var/log/messages and /var/log/syslog - may also hold some information.

-

Check /etc/init/ to see if you actually have tty7 configured. It isn't by default, meaning that there isn't one to view, AFAIK.

-
Ok, apparently I don't have tty7 but "where" does the text live that is visible when the graphical interface disappears? When it happens, I see the last lines from the boot process before the greeter. My thinking was that it would be possible to see this without a crashed system. –  Fsando Feb 24 '13 at 11:55
Are you looking for the output of dmesg? –  qbi Feb 25 '13 at 20:12
Maybe, but I don't think so. The text I see is something from the boot process but it doesn't look the same, there are no time and I don't think it's the same. The last entry is always the something about the greeter handing off to something else, the gui I suppose. –  Fsando Feb 26 '13 at 19:18

You can also quit X windows using Ctrl-Alt-F12. That sends you to a text terminal, in general tty7. You can use the Alt-F1 to Alt-F7 to switch between terminals, however, when you come back to tty7, it switches back to X11, so you cannot go back and forth...

If like me you start X11 from a console, the X11 output will be in that console. Say you do so in tty1, then you'd use Alt-F1 to go back there.

Now, this is all nice, but it only gives you the last 25 or so lines of output. Checking out the logs is definitively better since that way you can find everything since you started your session.

-