Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
seeing why programs dont run: tailing stdout
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
nandrews
n00b
n00b


Joined: 25 Jun 2004
Posts: 29

PostPosted: Fri Apr 22, 2005 1:06 am    Post subject: seeing why programs dont run: tailing stdout Reply with quote

Hi,

I've been annoyed by programs not launching/crashing in X and not seeing their error messages if they're not run from a terminal. I assume their stdout is sent to the terminal from which X was launched, but I'm not sure how to tail that, or even if its possible. Is there a file I can tail using root-tail or is more complicated than that?

Thanks
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Fri Apr 22, 2005 1:43 am    Post subject: Reply with quote

If you start the app from a terminal it will dump stdout/stderr messages to the terminal automatically.
_________________
Vim has excellent syntax highlighting for configuration files: emerge gentoo-syntax
Learn how to use Vim: vimtutor
Back to top
View user's profile Send private message
nandrews
n00b
n00b


Joined: 25 Jun 2004
Posts: 29

PostPosted: Fri Apr 22, 2005 1:51 am    Post subject: Reply with quote

right, but how about ones i don't launch from the terminal?

i.e. from fluxbox's menu
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Fri Apr 22, 2005 1:55 am    Post subject: Reply with quote

nandrews wrote:
right, but how about ones i don't launch from the terminal?

i.e. from fluxbox's menu


Don't launch them from fluxbox's menu, launch them from the terminal instead.
_________________
Vim has excellent syntax highlighting for configuration files: emerge gentoo-syntax
Learn how to use Vim: vimtutor
Back to top
View user's profile Send private message
nandrews
n00b
n00b


Joined: 25 Jun 2004
Posts: 29

PostPosted: Fri Apr 22, 2005 1:58 am    Post subject: Reply with quote

say i really really want to launch them from the menu
Back to top
View user's profile Send private message
wuzzerd
Guru
Guru


Joined: 05 Jan 2005
Posts: 467
Location: New Mexico

PostPosted: Fri Apr 22, 2005 3:30 am    Post subject: Reply with quote

nandrews:

Try this in an terminal window
Code:
# tail -f ~/.xsession-errors

Then launch your program any way you want.

Hope this is what you're looking for.
Back to top
View user's profile Send private message
nandrews
n00b
n00b


Joined: 25 Jun 2004
Posts: 29

PostPosted: Fri Apr 22, 2005 4:03 am    Post subject: Reply with quote

wuzzard,

yes and no. that'll give me some of the errors im looking for, but not all. to give a specific example, after upgrading firefox it wouldn't launch for a while when selected from fluxbox's menu, and i had to go find the executable and launch it from a terminal to find out what was wrong. doing that i saw that there were some permissions not set right and it was an easy fix.

i'd like a way to see status info (whatever would be printed to the terminal if launched from there) without opening a terminal and launching from there so i can quickly troubleshoot applications that don't start normally.
Back to top
View user's profile Send private message
dbrug
n00b
n00b


Joined: 02 Dec 2005
Posts: 3
Location: Germany / Ulm

PostPosted: Sat Dec 10, 2005 4:50 pm    Post subject: Reply with quote

run your window manager within xterm, like putting ``xterm -T "Log" -e ion3'' into your .xinitrc instead of ion3.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Sat Dec 10, 2005 9:15 pm    Post subject: Reply with quote

nandrews wrote:
wuzzard,

yes and no. that'll give me some of the errors im looking for, but not all. to give a specific example, after upgrading firefox it wouldn't launch for a while when selected from fluxbox's menu, and i had to go find the executable and launch it from a terminal to find out what was wrong. doing that i saw that there were some permissions not set right and it was an easy fix.

i'd like a way to see status info (whatever would be printed to the terminal if launched from there) without opening a terminal and launching from there so i can quickly troubleshoot applications that don't start normally.
I use the following script which is called by my login manager. The part which redirects errors to ~/.xsession-errors is taken from some (gentoo?) script present in /etc (I don't remember which one).
Code:
#!/bin/bash

### Start enlightenment-0.17

# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
   if ( cp /dev/null "$errfile" 2> /dev/null )
   then
      chmod 600 "$errfile"
      exec > "$errfile" 2>&1
      break
   fi
done

# enable the multimedia keys
/usr/bin/xmodmap /usr/local/Xmodmap
# start e17
/usr/bin/enlightenment-0.17
You can modify it so that it starts the window manager of your choice.

EDIT: Didn't notice,- this thread is several months old.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum