View Full Version : [xubuntu] SSH issues

June 27th, 2008, 08:36 AM

I am very new to ssh, and after googling for a while, I don't seem to have found a solution to my problem.

My main computer is running Xubuntu 8.04, and I have an old computer, also running Xubuntu 8.04 headless (using NFS for a simple 1 folder share between the computers for transferring files).

After installing openssh, I am able to connect to the old computer and even forward X11 apps from the old to the new computer. All seems fine there.

Now the issue comes when I start a second x-session from tty1 as follows:

1. I press CTRL + ALT + F1 to get to tty1 and log in.

2. I enter the following command to start the second x-session:

xinit -e ssh -XCT user@server.local xfce4-session -- :1

3. The session asks for my password to log in.

All this works and I get the second x-session, switching between them with CTRL + ALT + F7 (local) and CTRL + ALT + F9 (remote)

Now here is the issue. The first time I log into the remote session (after the remote computer has been rebooted for whatever reason) the graphics are all garbled. I have the functionality, it's just the desktop wallpaper and icons etc are all garbled. Luckily, I am able to read text and thus access menus and panels etc.

If I now exit the remote session, and log back in again, the graphics are all perfect.

The other issue (more of an annoyance really, but unsure if it is related) is upon connection, I get the following output in the ssh window displayed on the remote session:

Warning: No xauth data; using fake authentication data for X11 forwarding.
** Message: Querying XINPUT extension
** Message: XINPUT extension found
** Message: Querying Xkb extension
** Message: Xkb extension found
** Message: Querying XF86Misc extension
** Message: XF86Misc extension found
** Message: Querying Xkb extension
** Message: Xkb extension found
Connection failure: Connection refused

Now this doesn't seem to affect the connection in any way. I have the remote desktop running.

I just would like to figure out why the graphics are garbled on the first login.

Following is my /etc/ssh_config and /etc/X11/xorg.conf files on the old computer:


# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
ServerAliveInterval 120
ForwardX11 yes
UseLocalHostX11 yes


# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Emulate3Buttons" "true"

Section "Device"
Identifier "Configured Video Device"

Section "Monitor"
Identifier "Configured Monitor"

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"

Hoping someone can help work this out!


June 27th, 2008, 10:03 PM
Well, I've since figure out that xfdesktop and xfce4-panel seem to have an issue starting headless.

When I remote into my headless box, if I run the following, all the graphics are restored:

xfdesktop --quit &
xfdesktop &
xfce4_panel -r

now I just need to figure out how the automatically launch a script on the remote machine when I connect so it will automatically restore the graphics.

Does anyone know how to do that?