LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-26-2005, 04:06 PM   #1
npc
Member
 
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32

Rep: Reputation: 15
xdm and .xsession-error


Hi there, guys, it's been a while since i started looking for a way to display x errors output with torsmo on my desktop, finally i head something about .xsession-errors. However it seems that .xsession-errors is only created/updated if i use some session manager such as xdm. Is it possible to have such file or a similar one without any session manager, i mean booting to command line on rc.3 and not directly into x like in rc.4?

Is there any alternative place to get those errors messages. I really need that to manage dependencies on my slackware box.

Thank you.

NPC.
 
Old 06-26-2005, 04:12 PM   #2
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
I believe if you just use startx to get to X, it just prints all of the X errors on stderr. So you could redirect that output to ~/.xsession-errors if you wanted.
 
Old 06-27-2005, 07:08 AM   #3
npc
Member
 
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Noth
I believe if you just use startx to get to X, it just prints all of the X errors on stderr. So you could redirect that output to ~/.xsession-errors if you wanted.
I'm noobie. Could you explain me how to do that? I do start X with startx.

Thank you.
 
Old 06-27-2005, 05:42 PM   #4
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
You use > to redirect output of one command to a file. If you run 'ls > blah' it'll put the directory listing in the file blah. But that's just stdout (standard output) so if the command uses stderr (standard error) it won't be redirected, but luckily you can redirect that as well. Every command starts off with stdin, stdout and stderr opened by the shell, the file handle numbers are 0,1 and 2 respectively and bash lets you redirect by filehandle so you can run 'ls 2>blah' and the file listing will be output to your screen with any errors going into blah.

There's a lot you can do with that, but essentially what you want to run is 'startx 2>.xsession-errors' and that should take care of it.
 
Old 06-27-2005, 09:30 PM   #5
npc
Member
 
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Noth
You use > to redirect output of one command to a file. If you run 'ls > blah' it'll put the directory listing in the file blah. But that's just stdout (standard output) so if the command uses stderr (standard error) it won't be redirected, but luckily you can redirect that as well. Every command starts off with stdin, stdout and stderr opened by the shell, the file handle numbers are 0,1 and 2 respectively and bash lets you redirect by filehandle so you can run 'ls 2>blah' and the file listing will be output to your screen with any errors going into blah.

There's a lot you can do with that, but essentially what you want to run is 'startx 2>.xsession-errors' and that should take care of it.
Thank you so much! That's exactly what i was looking for. I was wondering, though, if there is a way to put "2>.xsession-errors" inside "startx", cuz it's a shell script (i guess). It's pretty annoying to type such a long command line just to launch X.
 
Old 06-27-2005, 09:32 PM   #6
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
startx is distributed with X, I wouldn't change that. You can always setup your own shell alias though.
 
Old 06-28-2005, 09:37 AM   #7
npc
Member
 
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32

Original Poster
Rep: Reputation: 15
I undestand... i've just created my first bash script. It's called "xstart" and it calls that long command line. I guess this we'll do just fine. Thank you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two million error lines in .xsession-error file from FireFox acanton Linux - Software 4 08-28-2005 09:53 AM
xsession-error ktc0ut Suse/Novell 1 05-05-2005 08:07 AM
XDM Error soulkeeper Linux - Software 0 07-13-2004 11:32 AM
why this error message is appear in xsession-error file? eye Red Hat 0 10-21-2003 07:51 AM
2nd Xsession error BigNate Linux - Software 1 05-08-2003 06:47 AM


All times are GMT -5. The time now is 05:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration