X11 tcp listen on localhost?

Everything about X, Gnome, KDE, ... and everything running on it

X11 tcp listen on localhost?

Postby dieselnutjob » 2020-07-27 17:09

Hi I want to be able to have a client app (like xterm) in a chroot be able to talk to the X11 server on localhost.
I know that this is normally considered a security risk but this is a single use laptop so I don't need to worry about other users sending me unwanted X sessions.

If I search /etc for any file with "listen" in it
Code: Select all
/etc# grep -r listen *
cups/cupsd.conf:# Only listen for connections from the local machine.
default/exim4:# 'combined' -     one daemon running queue and listening on SMTP port
default/exim4:# 'queueonly' - only a queue running daemon is started, no SMTP listener.
default/exim4:# options common to quez-runner and listening daemon
default/exim4:# Options for the SMTP listener daemon. By default, it is listening on
default/exim4:# port 25 only. To listen on more ports, it is recommended to use
exim4/conf.d/main/01_exim4-config_listmacrosdefs:# listen on all all interfaces?
exim4/exim4.conf.template:# listen on all all interfaces?
ffserver.conf:# Port on which the server is listening. You must select a different
init.d/exim4:      log_progress_msg "exim4_listener"
init.d/exim4:      log_progress_msg "exim4_listener"
init.d/exim4:# we try to kill eximqr and exim SMTP listener, no matter what
init.d/exim4:    log_progress_msg "exim4_listener"
init.d/exim4:      log_progress_msg "exim4_listener"
init.d/exim4:  SMTPNAME="SMTP listener daemon"
init.d/exim4:      SMTPNAME="combined SMTP listener and queue runner daemon"
network/if-up.d/openssh-server:# listening on new addresses.
X11/xinit/xserverrc:exec /usr/bin/X -listen tcp "$@"


you can see that I already edited /etc/X11/xinit/xserverrc and changed -nolisten tcp to -listen tcp

But I look at my processes
Code: Select all
root@R9M0DXA:/home/philip# ps -aux |grep listen
root       678  2.9  0.7 315980 59572 tty7     Ssl+ 14:54   0:01 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{445060af-6846-4725-8061-013d3fe23fcb} -background none -noreset -displayfd 18 vt7
root      6211  0.0  0.0  12780   936 pts/0    S+   14:54   0:00 grep listen


where did this /usr/lib/xorg/Xorg --nolisten tcp come from?

how do I change it?

thanks
dieselnutjob
 
Posts: 103
Joined: 2011-04-12 10:25

Re: X11 tcp listen on localhost?

Postby Head_on_a_Stick » 2020-07-27 17:13

I presume you're using LightDM to start the desktop so it must be that.

Use a console login and startx instead, that will run X under your normal user rather than root and /etc/X11/xinit/xserverrc will be applied.

It would probably be best to revert your edit and use
Code: Select all
startx -- -listen tcp
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12316
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X11 tcp listen on localhost?

Postby dieselnutjob » 2020-07-27 17:25

thanks, I'm using sddm
dieselnutjob
 
Posts: 103
Joined: 2011-04-12 10:25

Re: X11 tcp listen on localhost?

Postby dieselnutjob » 2020-07-27 17:43

creating this one new file seems to work

Code: Select all
~$ cat /etc/sddm.conf
[X11]
ServerArguments=-listen tcp
dieselnutjob
 
Posts: 103
Joined: 2011-04-12 10:25


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable