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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-26-2005, 04:06 PM
|
#1
|
|
Member
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32
Rep:
|
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.
|
|
|
|
06-26-2005, 04:12 PM
|
#2
|
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
|
06-27-2005, 07:08 AM
|
#3
|
|
Member
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
|
06-27-2005, 05:42 PM
|
#4
|
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
|
06-27-2005, 09:30 PM
|
#5
|
|
Member
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
|
06-27-2005, 09:32 PM
|
#6
|
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
startx is distributed with X, I wouldn't change that. You can always setup your own shell alias though.
|
|
|
|
06-28-2005, 09:37 AM
|
#7
|
|
Member
Registered: May 2005
Location: Sao Luis, MA, Brazil
Distribution: Slackware, Gentoo
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:59 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|