View previous topic :: View next topic |
Author |
Message |
nandrews n00b
Joined: 25 Jun 2004 Posts: 29
|
Posted: Fri Apr 22, 2005 1:06 am Post subject: seeing why programs dont run: tailing stdout |
|
|
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 |
|
|
jdgill0 Veteran
Joined: 25 Mar 2003 Posts: 1366 Location: Lexington, Ky -- USA
|
Posted: Fri Apr 22, 2005 1:43 am Post subject: |
|
|
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 |
|
|
nandrews n00b
Joined: 25 Jun 2004 Posts: 29
|
Posted: Fri Apr 22, 2005 1:51 am Post subject: |
|
|
right, but how about ones i don't launch from the terminal?
i.e. from fluxbox's menu |
|
Back to top |
|
|
jdgill0 Veteran
Joined: 25 Mar 2003 Posts: 1366 Location: Lexington, Ky -- USA
|
Posted: Fri Apr 22, 2005 1:55 am Post subject: |
|
|
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 |
|
|
nandrews n00b
Joined: 25 Jun 2004 Posts: 29
|
Posted: Fri Apr 22, 2005 1:58 am Post subject: |
|
|
say i really really want to launch them from the menu |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Fri Apr 22, 2005 3:30 am Post subject: |
|
|
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 |
|
|
nandrews n00b
Joined: 25 Jun 2004 Posts: 29
|
Posted: Fri Apr 22, 2005 4:03 am Post subject: |
|
|
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 |
|
|
dbrug n00b
Joined: 02 Dec 2005 Posts: 3 Location: Germany / Ulm
|
Posted: Sat Dec 10, 2005 4:50 pm Post subject: |
|
|
run your window manager within xterm, like putting ``xterm -T "Log" -e ion3'' into your .xinitrc instead of ion3. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sat Dec 10, 2005 9:15 pm Post subject: |
|
|
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 |
|
|
|