Bug 1255743 - Lightdm runs without -nolisten but X not listening to port 6000
Summary: Lightdm runs without -nolisten but X not listening to port 6000
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lightdm
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-21 12:35 UTC by Samo Dadela
Modified: 2015-09-09 23:19 UTC (History)
2 users (show)

Fixed In Version: 1.10.5-2.fc22
Clone Of:
Environment:
Last Closed: 2015-09-04 19:46:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Samo Dadela 2015-08-21 12:35:09 UTC
Description of problem:
Can't make X to listen to port 6000 on Fedora 22. 

I have set in lightdm.conf:
[SeatDefaults]
xserver-allow-tcp=true

# ps -ef | grep -i Xorg
root      1272  1268  0 11:05 tty1     00:01:08 /usr/libexec/Xorg -background none :0 -seat seat0 -auth /var/run/lightdm/root/:0 vt1 -novtswitch

# ps -ef | grep lightdm
root      1268     1  0 11:05 ?        00:00:00 /usr/sbin/lightdm
root      1272  1268  0 11:05 tty1     00:01:11 /usr/libexec/Xorg -background none :0 -seat seat0 -auth /var/run/lightdm/root/:0 vt1 -novtswitch
lightdm   1339     1  0 11:05 ?        00:00:00 /usr/lib/systemd/systemd --user
lightdm   1345  1339  0 11:05 ?        00:00:00 (sd-pam)
lightdm   1470     1  0 11:05 ?        00:00:00 dbus-launch --autolaunch=c70c689da595441da7a18e9dad2ab83c --binary-syntax --close-stderr
lightdm   1480     1  0 11:05 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
root      1579  1268  0 11:05 ?        00:00:00 lightdm --session-child 14 21
root      5825  4221  0 14:32 pts/2    00:00:00 grep --color=auto -i light



# netstat -nap | grep 6000
(shows nothing)

Any hints where to look? Any documentation for this for FC 22?



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Samo Dadela 2015-08-21 12:37:11 UTC
BTW: I have a XFCE FC (20 upgrade to 21, then 22)

Comment 2 Samo Dadela 2015-08-21 12:40:33 UTC
... lightdm.conf also contains:

[XDMCPServer]
enabled=true
port=177

Comment 3 Samo Dadela 2015-08-27 11:45:11 UTC
I'm unable to export DISPLAY to my FC host because of this.
BTW: Can someone change the severity to high?

Comment 4 Samo Dadela 2015-08-28 14:16:37 UTC
I found a workaround:
vi /usr/bin/Xorg and add -listen, as below

if [ -x "$basedir"/Xorg.wrap ]; then
    exec "$basedir"/Xorg.wrap "$@" -listen
#   exec "$basedir"/Xorg.wrap "$@" 
else
    exec "$basedir"/Xorg "$@"
fi

It seems that without -listen X won't listen to port 6000 (though man Xorg says nothing about either -listen or -nolisten). lightdm also does not add -listen is allow-tcp is specified.

Another strange thing was that the mouse pointer became unusual unresponsive. I then changed the settings (sensitivity/acceleration) and it started working... What's even more weird is that after I reset the mouse settings to default, the mouse started to work as before the change. It persist reboots.

Comment 5 Rex Dieter 2015-08-28 14:25:20 UTC
Thanks for the excellent detective-work.

Looks like lightdm assumes -listen of -nolisten is not specified,

in src/x-server-local.c,

    else if (!server->priv->allow_tcp)
        g_string_append (command, " -nolisten tcp");

should be relatively easy to fix to not rely on default behavior, and add too:

    else if (server->priv->allow_tcp)
        g_string_append (command, " -listen tcp");

Comment 6 Samo Dadela 2015-08-28 14:30:05 UTC
Thanks... 

Also regarding the workaround... just found that it should read:
exec "$basedir"/Xorg.wrap "$@" -listen tcp 

(without tcp it doesn't work)

Comment 7 Samo Dadela 2015-08-28 14:32:16 UTC
Rex: Regarding Xorg -listen / -nolisten - the man pages don't document those options (or I'm looking at the wrong manpage; man Xorg). Can this bug be 'forwarded' to the xorg 'team'?

Comment 8 Rex Dieter 2015-08-28 14:36:47 UTC
It is documented, albeit indirectly.

'man Xorg' includes text:

       TCPIP
           Xorg listens on port 6000+n, where n is the display number.  This connection type can be disabled with the -nolisten option (see the Xserver(1) man page for details).

and 'man Xserver' includes:

       -nolisten trans-type
               disables a transport type.  For example, TCP/IP connections can be disabled with -nolisten tcp.  This option may be issued multiple times to disable listening to different transportv types.

       -listen trans-type
               enables  a  transport  type.   For  example, TCP/IP connections can be enabled with -listen tcp.  This option may be issued multiple times to enable listening to different transport types.

Comment 9 Fedora Update System 2015-08-29 22:00:47 UTC
lightdm-1.10.5-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14566

Comment 10 Fedora Update System 2015-08-29 22:02:19 UTC
lightdm-1.10.5-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14567

Comment 11 Samo Dadela 2015-08-31 13:43:09 UTC
Rex: Thanks again. I Didn't check man Xserver.

Comment 12 Fedora Update System 2015-09-01 09:58:43 UTC
lightdm-1.10.5-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lightdm'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14567

Comment 13 Fedora Update System 2015-09-01 10:05:06 UTC
lightdm-1.10.5-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lightdm'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14566

Comment 14 Fedora Update System 2015-09-04 19:46:35 UTC
lightdm-1.10.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2015-09-09 23:19:58 UTC
lightdm-1.10.5-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.