Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, if I run a program through the menus in gnome-shell, is there a way to view stdout and stderr? Or is there some kind of hack to achieve this functionality?

Or is everything just sent to /dev/null?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Usually, gdm/session start-up scripts redirect stderr & stdout to either:

~/.xsession-errors

or

~/.cache/gdm/session.log

With systemd and recent gdm versions, everything is redirected to systemd journal, so one way to get that output is:

journalctl -b _PID=$(pgrep gnome-session)
share|improve this answer
    
I think gnome-session doesn't necessarily run anymore (I'm on gnome 3.14, because pgrep doesn't find it, though I'm definitely in gnome ;) –  ufotds Feb 9 at 5:09
    
@ufotds - it all depends on your particular setup, but on a normal gnome setup it definitely runs (I'm on a vanilla gnome 3.14.2 install and pgrep gnome-session works fine). –  don_crissti Feb 9 at 10:20

The command suggested by don_crissti didn't show anything for me, but I just do:

journalctl -f

in a terminal tab that I always leave open (and opens automatically on boot) so I have realtime feedback of all logging from systemd on my computer.

If desired, you can use the match filters from journalctl to limit the noise, but for now I like to have everything at hand.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.