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 09-12-2019, 06:59 AM   #1
arcctgx
Member
 
Registered: Mar 2006
Location: EU
Distribution: Slackware, Gentoo
Posts: 58

Rep: Reputation: 23
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?
 
Old 09-12-2019, 12:19 PM   #2
philanc
Member
 
Registered: Jan 2011
Posts: 308

Rep: Reputation: 273Reputation: 273Reputation: 273
I put a .xserverrc file in my home directory ($HOME) which contains the following:

Code:
#!/bin/sh
exec /usr/bin/X -nolisten tcp -dpi 112 $@
I use it precisely to ensure the "-nolisten tcp" and set the DPI.

Hope this helps,

Phil
 
1 members found this post helpful.
Old 09-12-2019, 01:34 PM   #3
arcctgx
Member
 
Registered: Mar 2006
Location: EU
Distribution: Slackware, Gentoo
Posts: 58

Original Poster
Rep: Reputation: 23
Thanks, that was helpful.

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?
 
Old 09-12-2019, 02:02 PM   #4
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
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.
 
1 members found this post helpful.
Old 09-12-2019, 02:04 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Quote:
Originally Posted by arcctgx View Post
Now I would only like to understand why my XServer doesn't listen on port 6000. Is it because of some Slackware defaults?
no, it's because is the default for X.org since some time.

https://cgit.freedesktop.org/xorg/xs...2994c73ee0b3e9

Last edited by ponce; 09-12-2019 at 02:06 PM.
 
4 members found this post helpful.
Old 09-12-2019, 02:20 PM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
If I remember rightly, the default changed a few years ago.

edit: nm, ponce beat me to it. Oh! 2014, didn't think it was that long ago. Where did the time go?

Last edited by GazL; 09-12-2019 at 02:22 PM.
 
1 members found this post helpful.
Old 09-12-2019, 02:32 PM   #7
arcctgx
Member
 
Registered: Mar 2006
Location: EU
Distribution: Slackware, Gentoo
Posts: 58

Original Poster
Rep: Reputation: 23
Ah, I see. So I was right to suspect this advice is outdated.

Thanks for all your replies. You've been very helpful.
 
  


Reply



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
[SOLVED] Slackware64-current. Two questions regarding Lilo, lba64 and sgdisk gordydawg Slackware 18 06-03-2016 04:57 AM
xserver lost configuration, dpkg-reconfigure xserver-xorg isn't helping bezdomny Linux - Software 5 07-13-2008 12:33 PM
xserver-xfree86: Xserver could not start on my ATI-radeon video card Shankarrajus Debian 2 07-17-2006 07:00 AM
xserver-xorg config warning: migrating xserver-xfree86 templates doctorwebbox Debian 9 07-27-2005 07:24 PM
two, two, two cd players in one blistfix Linux - Newbie 3 07-03-2001 04:18 PM

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

All times are GMT -5. The time now is 02:03 AM.

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