Linked Questions

1
vote
0answers
91 views

Find who is connected to a Unix domain socket (Linux) [duplicate]

I have a Unix domain socket (for example /var/run/mysqld/mysqld.sock). I know there is open connection(s) to this socket thanks to lsof -U or ss -xa but I cannot find which process is connected to it. ...
75
votes
5answers
23k views

What process created this X11 window?

Given an X11 window ID, is there a way to find the ID of the process that created it? Of course this isn't always possible, for example if the window came over a TCP connection. For that case I'd ...
29
votes
1answer
42k views

How do I find out more about socket files in /proc/fd?

Looking in /proc/$mypid/fd/, I see these files lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 0 -> /dev/pts/36 (deleted) lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 3 -> socket:[1424055856] lrwx-...
26
votes
2answers
2k views

Security implications of running perl -ne '…' *

Apparently, running: perl -n -e 'some perl code' * Or find . ... -exec perl -n -e '...' {} + (same with -p instead of -n) Or perl -e 'some code using <>' * often found in one-liners ...
25
votes
3answers
5k views

How can we know who's at the other end of a pseudo-terminal device?

If I do a: echo foo > /dev/pts/12 Some process will read that foo\n from its file descriptor to the master side. Is there a way to find out what that(those) process(es) is(are)? Or in other ...
7
votes
4answers
2k views

list graphical processes from terminal

Do no confuse the question here with how to list processes graphically, that is not what I am asking. In the Terminal, how can i see which processes have a GUI? as in things like firefox, vlc, geany,...
1
vote
2answers
466 views

How can we find out the pseudoterminal master and slave from each other? [duplicate]

A pseudoterminal has a pair of master and slave. How can we find out the master device file from a slave device file (e.g. /etc/pts/3)? I only find /dev/ptmx and /dev/pts/ptmx, but they can't be ...
5
votes
0answers
1k views

Debuggging `Maximum number of clients reached … unable to open display “:0”'

I am running an openSUSE Tumbleweed installation with KDE Plasma 5.4.3 . I tend to use a fair number of programs ( Eclipse, Firefox, Slack, Evolution, Konsole, various java applications ) and after ...
0
votes
1answer
966 views

Who opened a file descriptor? (socket)

I am using strace to track a program. In this line: recvfrom(7, "\0\260R\0\0\1\364\6\215\r\257\330\210\341\0\270\240\0\260R\0\0\0\0\0\0\0\0\0\0\0\0"..., 3000, 0, {sa_family=AF_PACKET, proto=0x88e1, ...
1
vote
1answer
259 views

Can we find out server/daemon and client processes from each other on the same machine?

On Ubuntu, I often run some server/daemon and some clients both locally. The server/daemon and clients can be arbitrary programs (emacs daemon and clients, Screen daemon and clients, server and ...
1
vote
1answer
216 views

how do applications communicate via sockets

On my computer audio works sometimes and sometimes not. I want to troubleshoot this. First I verified I am using pulseaudio. I did this by strace'ing the pulseaudio process: [pid 2289] send(28, "\0\...
2
votes
1answer
146 views

Replacing /dev/(u)random inside a container

The /dev/(u)random devices can be linked from the host into a container. Can (u)random be replaced with a named pipe instead? (assuming some other application (not (u)random) provides input to the ...