Why is there filename "socket" in lsof output when I use nedit command?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Because it opened a UNIX socket. Since nedit is a GUI program, this is not surprising. The socket could be used to communicate with the graphics server.
Sockets are not files, but inter-process communication channels. The offset 731194794 is probably the number of bytes that have been written to the socket so far. It's a large number, but again, if this is communication with the graphics server, not too surprising.
Last edited by berndbausch; 03-03-2020 at 12:26 AM.
Reason: typo
Because it opened a UNIX socket. Since nedit is a GUI program, this is not surprising. The socket could be used to communicate with the graphics server.
Sockets are not files, but inter-process communication channels. The offset 731194794 is probably the number of bytes that have been written to the socket so far. It's a large number, but again, if this is communication with the graphics server, not too surprising.
Thanks! About the node numbers.. I have experimented it. Tried to open a file with a 116-byte size using nedit. I grep the socket opened and it was 1451898. Then I close the nedit. Tried to open again the same file using nedit. But, this time, the node number was 1452642. It incremented!
I just want to know why there is a file "socket" open when I use nedit command..
NEdit can be a server and probably has this socket available (too?) for the
Quote:
nc - Client program for NEdit text editor
(from its man page)
Another quote from that man page
Quote:
If no server is running, nc will start one unless configured otherwise.
Client/server mode is useful for integrating NEdit with software development environments, mailers, and other programs; or just as a quick way to open files from the shell command line without starting a new NEdit session.
So yes, a socket is used for inter-program communication.
Because of a name conflict (with nc=netcat) I have renamed this "nc" to "nclient"
Thanks! About the node numbers.. I have experimented it. Tried to open a file with a 116-byte size using nedit. I grep the socket opened and it was 1451898. Then I close the nedit. Tried to open again the same file using nedit. But, this time, the node number was 1452642. It incremented!
The numbers are not node numbers. They (look like they) are under the column "SIZE". Perhaps this would be clearer if you formatted the output as code.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.