How to identify program printing messages into terminal
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to identify program printing messages into terminal
Slackware 14.2.
After I log out from KDE to terminal, I start getting messages: "Unable to connect to X server", which makes working in terminal very uncomfortable. How can I identify what program is sending these messages and kill it?
In this particular case, it's probably xinit, as that's what sets Xorg going. But as a general principle, the first thing you should always do in this kind of situation is google the exact error message. Nine times out of ten, that will answer your question.
Why did you log out? You don't need to stop X to get to a terminal. Just press ctrl+alt+F2 or ctrl+alt+F3. Just don't use F1 because that's where all the error messages go.
probably you started something from that terminal(?). You may try ps -t <terminal> to see which process is connected to it, but you can write into a terminal without that too.
In this particular case, it's probably xinit, as that's what sets Xorg going. But as a general principle, the first thing you should always do in this kind of situation is google the exact error message. Nine times out of ten, that will answer your question.
I googled the error message in quotes, but found no clues.
Quote:
Originally Posted by hazel
Why did you log out?
I have a small Internet addiction and try to avoid the temptation of a GUI browser.
Quote:
Originally Posted by hazel
You don't need to stop X to get to a terminal. Just press ctrl+alt+F2 or ctrl+alt+F3. Just don't use F1 because that's where all the error messages go.
I know about Ctrl+Alt+F2, I use it to get the second terminal because of these constant messages appearing on the screen - vim becomes unusable.
In this music sheet https://hrussman.neocities.org/jesus_is_born.pdf why did you put a natural sign for E: 2-nd line, first tact? It's natural by the clef signature and was not changed in the previous tact (sorry, using the Russian term "tact").
If you exited X and are in a single session in a console as a normal user you should not have many processes running. The offending process is probably easy to identify among the few processes in the output from:
If you exited X and are in a single session in a console as a normal user you should not have many processes running. The offending process is probably easy to identify among the few processes in the output from:
Code:
ps -aux | grep $USER
I ran
Code:
ps -aux | grep $USER
after quitting from X: only bash, ps and grep were running. So, it must be a system process. Checked the process list, found no GUI applications.
after quitting from X: only bash, ps and grep were running. So, it must be a system process.
If those error messages keeps coming on the console on a rather idle system, maybe you can find the offending process with top? The offending process is probably consuming some CPU in its attempt to connect to the X server.
Slackware 14.2.
After I log out from KDE to terminal, I start getting messages: "Unable to connect to X server", which makes working in terminal very uncomfortable. How can I identify what program is sending these messages and kill it?
Most of the time logging out of an X session and returning to console you see this message:
Code:
xinit: connection to X server lost
waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
Exiting a kde plasma session shows something like this:
Code:
xinit: connection to X server lost
waiting for X server to shut down The X11 connection broke (error 1). Did the X11 server die?
The X11 connection broke (error 1). Did the X11 server die?
The X11 connection broke (error 1). Did the X11 server die?
OK
(II) Server terminated successfully (0). Closing log file.
If these are the messages you are wondering about, they come from xinit and/or the X server as its shutting down. I'm not sure why it shuts down like that for plasma and searching for the answer has been difficult due to getting hits on other people's issues around the internet where similar messages are reported for different issues.
Maybe someone here is more familiar with plasma's workings and can shed some light on why this happens. All I know is I've seen that for a while and have not had other issues so it seems pretty harmless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.