Results 1 to 10 of 11

Thread: HOWTO: tunnel GNOME/KDE/etc. through SSH

Threaded View

  1. #1
    Join Date
    Apr 2007
    Location
    USA
    Beans
    1,043

    HOWTO: tunnel GNOME/KDE/etc. through SSH

    Besides offering the user a remote shell, SSH can also run X11 applications on a remote computer. This extends even to desktop environments such as GNOME and KDE, as they consist of a collection of separate applications.
    I have used this method with two computers running Kubuntu 7.04. However, the computers do not necessarily need to run the same environment or even the same distribution.
    WARNING: I offer NO support for this guide; i.e. if your computer a splode, it's not my fault.

    1. On the server, install a desktop environment and OpenSSH server, if they are not already present. An X server is not required.
    Code:
    sudo aptitude install openssh-server
    2. On the client, install an X server, the xterm terminal emulator, and the OpenSSH client. These should already be present on most distributions.
    3. On the client, press Ctrl+Alt+F2 to show a terminal. Log in and type
    Code:
    xinit /usr/bin/xterm -- :1
    to open a new X session (on "display 1") with only a terminal on the screen.
    Note: In distributions besides Ubuntu and Debian, the xterm executable may be in a different place. Use the command
    Code:
    whereis xterm
    to find it.
    4. The screen should switch to a graphical screen with a terminal in the upper-left corner. If it does not, try pressing Ctrl+Alt+F8 or Ctrl+Alt+F9.
    In the new terminal, open an SSH connection to the server. Type:
    Code:
    ssh -Y username@hostname
    replacing "username" with your login name on the server and "hostname" with the server's host name (or IP address.)
    5. The SSH client will ask you for your server password. Enter it.
    6. Now that you have a shell prompt, all you need to do is launch the desktop enviroment.
    For GNOME:
    Code:
    gnome-session
    For KDE:
    Code:
    startkde
    For XFCE:
    Code:
    startxfce4
    7. Now enjoy! Don't close the xterm window until you are done, and if the server doesn't close after you log out of GNOME/KDE, press Ctrl+Alt+Backspace to kill it.

    EDIT: roger56 mentioned Ubuntu 7.04 switches to TTY9 rather than TTY8. It turns out TTY8 is used for startup messages.
    Last edited by maybeway36; August 13th, 2007 at 11:20 PM. Reason: update

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •