[SOLVED] Two questions regarding defaultserverargs for XServer
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.
Two questions regarding defaultserverargs for XServer
I remember that some time ago it was recommended to explicitly add "-nolisten tcp" parameter for XServer, so that it doesn't listen for incoming connections on port 6000 by default. I checked my Slackware-14.2 system with nmap, and it doesn't listen on TCP port 6000. I never added "-nolisten tcp" myself. Does it mean that the defaults for XServer somehow changed, and that advice is out of date?
The second question is, how do I add parameters for XServer (e.g. DPI settings) in an elegant way? All the articles I could find suggest editing /usr/bin/startx, and adding parameters to the defaultserverargs variable. But wouldn't that modification be overwritten when Xorg package is updated or reinstalled? Is there a way to set defaultserverargs persistently somewhere in /etc/, or in user's $HOME?
I saw some mentions of /etc/X11/xserverrc and ~/.xserverrc files, but these don't exist in my system, and I have no idea how to create them, so I would have to find some information about what their contents should be. Is this the correct path forward anyway?
Additionally, I found that in XFCE the DPI value can be set either from Settings -> Appearance -> Font, or by using Settings Editor. So I probably don't need the .xserverrc after all. But this is still good to know, because not every window manager allows setting DPI from the GUI.
Now I would only like to understand why my XServer doesn't listen on port 6000. Is it because of some Slackware defaults? Or should I set "-nolisten tcp" just in case?
I don't think X11 listens by default anymore, it's something you'd have to enable. First of all, if you're using a login manager to start, it would probably pass -nolisten tcp. I don't, I just use startx, and while it's not using --nolisten-tcp, it's not listening on the port (from netstat -a)
I think you'd have to tell it to "-listen tcp" now if you want that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.