LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-29-2024, 02:10 AM   #1
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208
Blog Entries: 1

Rep: Reputation: Disabled
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?
 
Old 04-29-2024, 02:23 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,633
Blog Entries: 19

Rep: Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469
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.
 
1 members found this post helpful.
Old 04-29-2024, 02:39 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,962

Rep: Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332
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.
 
Old 04-29-2024, 11:16 AM   #4
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
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 View Post
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 View Post
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.
 
Old 04-29-2024, 11:54 AM   #5
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
...
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").
 
Old 04-29-2024, 12:33 PM   #6
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 987

Rep: Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673
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
regards Henrik
 
Old 04-30-2024, 09:43 PM   #7
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by henca View Post
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.
 
Old 05-01-2024, 04:36 AM   #8
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 987

Rep: Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673
Quote:
Originally Posted by usr345 View Post
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.

regards Henrik
 
Old 05-01-2024, 08:30 AM   #9
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 776

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
Quote:
Originally Posted by usr345 View Post
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.
 
1 members found this post helpful.
  


Reply

Tags
terminal



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
Identify non-local messages in exim Kbm Linux - Newbie 0 05-06-2019 10:45 PM
LXer: Identify PCI and USB Wired and Wireless Driver in Linux – Identify PCI Driver. Ubuntu, Debian, LXer Syndicated Linux News 0 08-20-2014 07:21 AM
logging messages from my program doesn't reach /var/log/messages rajas Programming 4 09-18-2011 12:38 AM
How do I stop services printing messages to my terminal? William (Dthdealer) Linux - Software 2 01-07-2011 08:55 PM
How to read "identify" button press event, or state of "identify" blue led with IPMI? iav Linux - Server 0 01-27-2009 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration