Discussion:
gdm + xdmcp
Daniel Iliev
2008-02-29 23:10:06 UTC
Permalink
Hi, people


I installed FreeBSD using the "7.0-RELEASE-i386-bootonly.iso" CD image.
After I installed Gnome (pkg_add -r gnome2), I was able to start it on
the FreeBSD and show it on my GNU/Linux workstation like this:

1) (Xnest :1 &) ; terminal --display=:1
2) in the "Xnested" terminal:
ssh -Y bsd.example.org gnome-session &
(Ctrl+D)

Next I started gdmsetup on the FreeBSD system and enabled "Remote
Login" (XDMCP). It was followed by a "gdm-restart". No error messages,
everything seems fine, but I can not connect to the FreeBSD box issuing
"Xnest -query bsd.example.org :2" from the workstation.

The above steps are usually enough to get XDMCP working between
GNU/Linux hosts. Actually the reverse scenario works just fine - I
was able to get my GNU/Linux Gnome showing on the FreeBSD system via
XDMCP. The two hosts are on the same HUB and in the same /24 private
network.


What am I missing in the FreeBSD setup?



P.S.

/* off-topic
I'm new to the *BSD world and it's my first message to this list.
So, I'd like to ask if there are any special rules here that I should
know about? Would "no html, no thread-hijacking, no top-posting" be
enough to avoid offending the more sensitive folks on the list when it
comes to correct e-mail formatting?
*/
--
Best regards,
Daniel
Girish Venkatachalam
2008-03-01 01:01:39 UTC
Permalink
Post by Daniel Iliev
Hi, people
I installed FreeBSD using the "7.0-RELEASE-i386-bootonly.iso" CD image.
After I installed Gnome (pkg_add -r gnome2), I was able to start it on
1) (Xnest :1 &) ; terminal --display=:1
ssh -Y bsd.example.org gnome-session &
(Ctrl+D)
Next I started gdmsetup on the FreeBSD system and enabled "Remote
Login" (XDMCP). It was followed by a "gdm-restart". No error messages,
everything seems fine, but I can not connect to the FreeBSD box issuing
"Xnest -query bsd.example.org :2" from the workstation.
The above steps are usually enough to get XDMCP working between
GNU/Linux hosts. Actually the reverse scenario works just fine - I
was able to get my GNU/Linux Gnome showing on the FreeBSD system via
XDMCP. The two hosts are on the same HUB and in the same /24 private
network.
What am I missing in the FreeBSD setup?
I am confused why you need Xnest.

If you want the XDMCP of the remote host there are other means. Xnest is
meant for running multiple X sessions in the same server.

If you want to access a remote machine's gdm, then you don't need Xnest
for that.

You can test for UDP port 177 along with the TCP ports 6000 and above
with the nmap command.

# nmap -sT -p 6000-6005 bsd.example.org # For X
# nmap -sU -p 177 bsd.example.org # For XDMCP

Most likely you have to enable "TCP listening" in gdm.conf. Just
uncomment the relevant line and you should be all set.

Best of luck!

-Girish
Post by Daniel Iliev
P.S.
/* off-topic
I'm new to the *BSD world and it's my first message to this list.
So, I'd like to ask if there are any special rules here that I should
know about? Would "no html, no thread-hijacking, no top-posting" be
enough to avoid offending the more sensitive folks on the list when it
comes to correct e-mail formatting?
*/
You seem to know everything already. ;)

This list is specifically meant for newbies and is very very friendly.
--
"unix soi qui mal y pense"

UNIX to him who evil thinks
Daniel Iliev
2008-03-01 02:37:58 UTC
Permalink
On Sat, 1 Mar 2008 06:31:39 +0530
== snip ==
Post by Girish Venkatachalam
Post by Daniel Iliev
I started gdmsetup on the FreeBSD system and enabled "Remote
Login" (XDMCP). It was followed by a "gdm-restart". No error
messages, everything seems fine, but I can not connect to the
FreeBSD box issuing "Xnest -query bsd.example.org :2" from the
workstation.
== snip ==
Post by Girish Venkatachalam
Post by Daniel Iliev
The two hosts are on the same HUB and in the same /24 private
network.
What am I missing in the FreeBSD setup?
I am confused why you need Xnest.
If you want the XDMCP of the remote host there are other means. Xnest
is meant for running multiple X sessions in the same server.
If you want to access a remote machine's gdm, then you don't need
Xnest for that.
Indeed. It is not my intention to use XDMCP like that (although it has
some advantages in some cases), but since the remote host wasn't on the
local XDMCP list I tried a more direct approach.
Post by Girish Venkatachalam
You can test for UDP port 177 along with the TCP ports 6000 and above
with the nmap command.
# nmap -sT -p 6000-6005 bsd.example.org # For X
# nmap -sU -p 177 bsd.example.org # For XDMCP
Sorry, I forgot to mention that. nmap gives:

PORT STATE SERVICE
177/udp closed xdmcp
6000/tcp open X11

Actually I think the latter is not required, but I'll let everything be
open and allowing until I get it working, then I'll disable the
unnecessary options afterwards.
Post by Girish Venkatachalam
Most likely you have to enable "TCP listening" in gdm.conf. Just
uncomment the relevant line and you should be all set.
Now, this is where I get confused. In the gdm(1) man page it is stated
the configuration file should be gdm.conf. Well, the man page is from
2003 and "pkg_info -L" doesn't show such a file. Instead there is
"custom.conf{,.default}" and gdmsetup seems to be writing to this one.
Its content seems OK (meaning policy="allow all") to me:

sed -e '/^$/d;/#/d' /usr/local/etc/gdm/custom.conf
[daemon]
[security]
AllowRemoteRoot=true
DisallowTCP=false
[xdmcp]
Enable=true
[gui]
[greeter]
Use24Clock=yes
[chooser]
[debug]
[servers]


So, I believe there's something about gdm that I'm still missing or
it's just not working on FreeBSD. (bug?)
Post by Girish Venkatachalam
Best of luck!
-Girish
Thanks and the same to you!

(Although I'd appreciate more help than luck in this case.)

:)
--
Best regards,
Daniel
Girish Venkatachalam
2008-03-01 04:52:29 UTC
Permalink
Post by Daniel Iliev
Indeed. It is not my intention to use XDMCP like that (although it has
some advantages in some cases), but since the remote host wasn't on the
local XDMCP list I tried a more direct approach.
Okay.
Post by Daniel Iliev
PORT STATE SERVICE
177/udp closed xdmcp
6000/tcp open X11
Actually I think the latter is not required, but I'll let everything be
open and allowing until I get it working, then I'll disable the
unnecessary options afterwards.
Then your problem is right here.

The XDMCP port is closed.
Post by Daniel Iliev
Now, this is where I get confused. In the gdm(1) man page it is stated
the configuration file should be gdm.conf. Well, the man page is from
2003 and "pkg_info -L" doesn't show such a file. Instead there is
"custom.conf{,.default}" and gdmsetup seems to be writing to this one.
sed -e '/^$/d;/#/d' /usr/local/etc/gdm/custom.conf
[daemon]
[security]
AllowRemoteRoot=true
DisallowTCP=false
The above line seems fine to me.
Post by Daniel Iliev
[xdmcp]
Enable=true
[gui]
[greeter]
Use24Clock=yes
[chooser]
[debug]
[servers]
So, I believe there's something about gdm that I'm still missing or
it's just not working on FreeBSD. (bug?)
Don't think so.
Post by Daniel Iliev
Thanks and the same to you!
(Although I'd appreciate more help than luck in this case.)
:)
Open the XDMCP port and you are done.

-Girish
Daniel Iliev
2008-03-01 05:56:29 UTC
Permalink
On Sat, 1 Mar 2008 10:22:29 +0530
Post by Girish Venkatachalam
Post by Daniel Iliev
PORT STATE SERVICE
177/udp closed xdmcp
6000/tcp open X11
Actually I think the latter is not required, but I'll let
everything be open and allowing until I get it working, then I'll
disable the unnecessary options afterwards.
Then your problem is right here.
The XDMCP port is closed.
Agreed.
Post by Girish Venkatachalam
Open the XDMCP port and you are done.
How am I supposed to do that? I believe it's up to gdm to open the port
it should be listening on. Just like Xorg did. If you mean I should
allow access to this port in the firewall, I must say I've not
(explicitly) enabled one on this system because it's connected to a
private (in the sense of RFC1918) LAN with no offenders other than me
and my family. :)


[***@bsd ~]# /etc/rc.d/ipfw rcvar
# ipfw
firewall_enable=NO
[***@bsd ~]# /etc/rc.d/ipfilter rcvar
# ipfilter
ipfilter_enable=NO
[***@bsd ~]# /etc/rc.d/pf rcvar
# pf
pf_enable=NO
[***@bsd ~]#
--
Best regards,
Daniel
Girish Venkatachalam
2008-03-01 06:50:40 UTC
Permalink
Post by Daniel Iliev
How am I supposed to do that? I believe it's up to gdm to open the port
it should be listening on. Just like Xorg did. If you mean I should
allow access to this port in the firewall, I must say I've not
(explicitly) enabled one on this system because it's connected to a
private (in the sense of RFC1918) LAN with no offenders other than me
and my family. :)
# ipfw
firewall_enable=NO
# ipfilter
ipfilter_enable=NO
# pf
pf_enable=NO
To rule out a firewall issue try running nmap on the localhost and
check. Or you could use the RFC1918 address of bsd.example.org from the
same machine.

In case that shows the port open then you can go the firewall route.

I personally do not run gdm or kdm. So I would not know how to get this
working but I *think* you already picked the right file. The one you
quoted in your last mail. I think the key lies there. You have to modify
it and restart gdm and see if it listens for XDMCP requests locally.

Hope this helps. And sorry if it doesn't. ;)

Thanks.

-Girish
--
"unix soi qui mal y pense"

UNIX to him who evil thinks
clemens fischer
2008-03-01 15:53:03 UTC
Permalink
Post by Girish Venkatachalam
I personally do not run gdm or kdm. So I would not know how to get
this working but I *think* you already picked the right file. The one
you quoted in your last mail. I think the key lies there. You have to
modify it and restart gdm and see if it listens for XDMCP requests
locally.
sockstat -4
Daniel Iliev
2008-03-03 02:51:26 UTC
Permalink
On Sat, 1 Mar 2008 06:31:39 +0530
Post by Daniel Iliev
Hi, people
I installed FreeBSD using the "7.0-RELEASE-i386-bootonly.iso" CD
image. After I installed Gnome (pkg_add -r gnome2), I was able to
start it on the FreeBSD and show it on my GNU/Linux workstation
1) (Xnest :1 &) ; terminal --display=:1
ssh -Y bsd.example.org gnome-session &
(Ctrl+D)
Next I started gdmsetup on the FreeBSD system and enabled "Remote
Login" (XDMCP). It was followed by a "gdm-restart". No error
messages, everything seems fine, but I can not connect to the
FreeBSD box issuing "Xnest -query bsd.example.org :2" from the
workstation.
The above steps are usually enough to get XDMCP working between
GNU/Linux hosts. Actually the reverse scenario works just fine - I
was able to get my GNU/Linux Gnome showing on the FreeBSD system via
XDMCP. The two hosts are on the same HUB and in the same /24 private
network.
What am I missing in the FreeBSD setup?
I'm posting this one just for future reference if someone else hits the
same problem.

I rebuilt the kernel w/o IPv6 support (and a bunch of other things I
don't need but they seem irrelevant). After rebooting into the kernel
the gdm started crashing.

"cd /usr/ports/*/gdm ; make deinstall ; make install clean".

The last command brings a configuration menu where I disabled the IPv6
support. After building and installing gdm this way the new instance
speaks XDMCP as expected.
--
Best regards,
Daniel
Loading...