Getting Cygin/x-win32 To Work With Gentoox, I get an "c

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
viper1024768
Linux User
Posts: 15
Joined: Sat Feb 14, 2004 7:13 am

Getting Cygin/x-win32 To Work With Gentoox, I get an "c

Post by viper1024768 » Sun Feb 29, 2004 11:27 am

Hi All,

Has anyone been able to create a remote X session with Gentoox? I've followed the tutorial written here : http://forums.xbox-scene.com/index.php? ... l=slainand however, I get an error saying that the display cannot be open.

I can log in via SSH, but I just can't get anything to transfer over to the X-Win32 or CyGen window.

Typed startkde ....and this is the response I get:

xset : unable to open display ""
xsetroot: unable to open display ' '
startkde: Starting up...
ksplash: cannot connect to X server etc etc

This is how my sshd_config looks like:

# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/lib/misc/sftp-server


Any help is greatly appreciated.

thanks in advance

User avatar
Zombie13
Linux User
Posts: 19
Joined: Tue Nov 04, 2003 8:35 pm
Location: United Kingdom

Post by Zombie13 » Tue Aug 16, 2005 8:16 pm

I think you need to add your Xserver to the allowed list (where "XSERVERHOST" is the IP/hostname of your X client)...

# DISPLAY=XSERVERHOST:0.0
# export DISPLAY
# xhost XSERVERHOST
# xterm

You should get an xterm appear on your client Xserver. Works for me, anyway.

:)

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Wed Aug 17, 2005 3:15 pm

Those settings will allow him to directly connect to his box, but that won't use SSH tunneling, like he's asking. When you use X11 tunneling with SSH (make sure you tell your ssh client to tunnel x11 connections), it should tunnel display connection made to an offset shown in the config file (or default, if it's not used). As below, this is from your config file:

X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

X11 Forwarding is enabled and it's defaulted to offset 10 and localhost. When you log into your box, type "export DISPLAY=localhost:10". That should tell xwindows to forward display connections to offset 10 which SSH will forward through to your connected machine. Also make sure that there's X-Win32 or something similar running on your windows machine. You may also need to add "127.0.0.1" to the "xhost list" in the security tab of xconfig for X-Win32 to allow the connection.

I have xwindows running on my xbox and when I ssh in and set the display variable I can run things like "xeyes" and they pop up fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests