Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] How to you run xterm on a (debian) slug?

Expand Messages
  • David Given
    ... Hash: SHA1 Rob Lockhart wrote: (Rob, your mailer is configured for HTML and is producing a mangled plain text version with, apart from anything else, no
    Message 1 of 12 , Aug 25, 2007
    View Source
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Rob Lockhart wrote:

      (Rob, your mailer is configured for HTML and is producing a mangled plain text
      version with, apart from anything else, no quoting. You may want to look at
      the setup...)

      [...]
      > export DISPLAY=localhost:0.0
      > xterm &

      This probably won't work.

      ssh -X doesn't listen on display 0 --- it usually starts at 10 and works up.
      It also sets the DISPLAY variable itself, and if it doesn't get set, that
      probably means X forwarding isn't turned on and setting it manually wouldn't
      work anyway.

      Just to clarify: to make X forwarding work, you need:

      - - an X server on your local machine
      - - access to the X server from your ssh client (running it in an xterm works)
      - - you need to connect to the NSLU2 with ssh -X (you must specify -X or it
      won't work; you may be able to get round this by changing one of ssh's many
      obscure scary configuration files)
      - - you need xauth installed on the NSLU2 (it's in the xbase-clients Debian
      package)
      - - then it just works.

      e.g:

      dg@pyanfar:~$ xauth
      xauth: creating new authority file /home/dg/.Xauthority
      Using authority file /home/dg/.Xauthority
      xauth> dg@pyanfar:~$ logout
      Connection to pyanfar closed.
      dg@hilfy:~$ ssh -X pyanfar
      dg@pyanfar's password:
      /usr/X11R6/bin/xauth: creating new authority file /home/dg/.Xauthority
      dg@pyanfar:~$ xterm &
      dg@pyanfar:~$

      ...and the window pops up.

      It's not even particularly slow. xterm consumes 2780kB of real memory on my
      system; rxvt might be a better better bet, at 1620kB. Admittedly, there's not
      a lot of benefit over using a simple ssh shell, but it's perfectly usable.
      (Don't forget that a mere ten years ago, most desktops were about the same
      spec as the NSLU2! *And* they had to run the X server at the same time!)

      - --
      ┌── dg@cowlark.com ─── http://www.cowlark.com ───────────────────

      │ "There does not now, nor will there ever, exist a programming language in
      │ which it is the least bit hard to write bad programs." --- Flon's Axiom
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.6 (GNU/Linux)
      Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

      iD8DBQFG0KEAf9E0noFvlzgRArAyAJ9zSw/myaxn3NvAWWUeaLPV8HITFgCfcUdz
      szfznJd8ts11Dol3SvVOwqo=
      =10I+
      -----END PGP SIGNATURE-----
    • Rob Lockhart
      ... Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug? Date: Sat, August 25, 2007 17:37 From: David Given ... Switched to
      Message 2 of 12 , Aug 26, 2007
      View Source
      • 0 Attachment
        ----- Original Message -----
        Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
        Date: Sat, August 25, 2007 17:37
        From: "David Given" <dg@...>

        > Rob Lockhart wrote:
        >
        > (Rob, your mailer is configured for HTML and is producing a
        > mangled plain text version with, apart from anything else,
        > no quoting. You may want to look at the setup...)

        Switched to plaintext. It didn't show being mangled on my web
        email client, but this is a big list and surely on some client
        it would have been mangled.

        > [...]
        > > export DISPLAY=localhost:0.0
        > > xterm &amp;
        >
        > This probably won't work.
        >
        > ssh -X doesn't listen on display 0 --- it usually starts at 10
        > and works up. It also sets the DISPLAY variable itself, and if
        > it doesn't get set, that probably means X forwarding isn't
        > turned on and setting it manually wouldn't work anyway.

        Yes, this is clear. My instructions were meant for starting
        at the client (NOT the NSLU2), getting it working locally then
        moving to NSLU2. I couldn't get it working on NSLU2 so I
        couldn't complete my instructions. The
        "usually starts at 10 and works up"
        is the config setting in /etc/ssh/sshd_config :

        X11Forwarding yes
        X11DisplayOffset 10

        My point was to
        1) get X working locally, and
        2) *then* try to get it working with the NSLU2.

        > Just to clarify: to make X forwarding work, you need:
        >
        > 1) an X server on your local machine
        > 2) access to the X server from your ssh client (running it
        > in an xterm works)
        > 3) you need to connect to the NSLU2 with ssh -X
        > (you must specify -X or it won't work; you may be able to
        > get around this by changing one of ssh's many obscure
        > scary configuration files)
        > 4) you need xauth installed on the NSLU2 (it's in the
        > xbase-clients Debian package)
        > 5) then it just works.
        >
        > e.g:
        >
        > dg@pyanfar:~$ xauth
        > xauth: creating new authority file /home/dg/.Xauthority
        > Using authority file /home/dg/.Xauthority
        > xauth> dg@pyanfar:~$ logout
        > Connection to pyanfar closed.
        > dg@hilfy:~$ ssh -X pyanfar
        > dg@pyanfar's password:
        > /usr/X11R6/bin/xauth: creating new authority file /home/dg/.Xauthority
        > dg@pyanfar:~$ xterm &
        > dg@pyanfar:~$

        Note that what my email was saying is that in my setup, even with

        ssh -X user@NSLU2_IP_ADDRESS

        I would login, and yet the NSLU2 DISPLAY env variable was not
        being set (in fact, with "-v" for verbosity, it said it couldn't
        set up the port forwarding). I've used ssh over X for years
        but certainly not with the NSLU2. It appears that in my
        case, even using -X doesn't forward the X11 display from
        NSLU2 back to the host. I even tried
        "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
        that it couldn't forward that port (this was within VNC).
        I originally tried this with a VNC window onto my
        Fedora 7 box (display is :1) and just tried it with the
        primary X display (:0 login). Same thing! So the -X seems
        to not be working over ssh in my setup.

        Performing "apt-get install xbase-clients" and now it works!
        I.e., the DISPLAY env variable is being set when doing:
        ssh -X user@NSLU2

        I didn't have xterm but previously installed xemacs and that
        came up. Not too shabby! Thanks for the missing step!
        I assumed that since xemacs depends on x, that at least the
        auth agent would have been installed as a dependency, but
        clearly xemacs can be run as "xemacs -nw" in which case
        it runs in purely VT100-type style w/o any Xwindows features.

        ... time to modify some Wiki's...

        > ...and the window pops up.
        >
        > It's not even particularly slow. xterm consumes 2780kB of
        > real memory on my system; rxvt might be a better better bet,
        > at 1620kB. Admittedly, there's not a lot of benefit over
        > using a simple ssh shell, but it's perfectly usable.
        > (Don't forget that a mere ten years ago, most desktops
        > were about the same spec as the NSLU2! *And* they had to
        > run the X server at the same time!)

        This is true! That's generally why I would run fvwm or icewm,
        because such a small memory footprint. Over a slow link,
        X might not be too usable. In that case, you could try -C
        for SSH compression. That might not be as good at compression
        as something like running a TightVNC server/client with
        tight compression.

        Regards,
        -Rob
      • dhbrandtjr
        David, Thank you for your feedback. I am really confused by what I have been reading! I will attempt to follow your directions, but if you could add
        Message 3 of 12 , Aug 26, 2007
        View Source
        • 0 Attachment
          David,

          Thank you for your feedback. I am really confused by what I have been
          reading! I will attempt to follow your directions, but if you could add
          additional explanation/comment it would be greatly appreciated.

          I really don't understand why X (or equivalent) needs to be running on my
          workstation. I assume that if I have X installed on the slug, then all I
          need on the workstation is something that will emulate a locally attached
          monitor/keyboard to the slug (which isn't there).

          Additionally, thank you for your observation about installing xauth. I will
          install that package and see what happens.

          Thank you.

          Don

          ------------------------------------------------------------------------------------------



          David Given wrote:
          >
          > -----BEGIN PGP SIGNED MESSAGE-----
          > Hash: SHA1
          >
          > Rob Lockhart wrote:
          >
          > (Rob, your mailer is configured for HTML and is producing a mangled plain
          > text
          > version with, apart from anything else, no quoting. You may want to look
          > at
          > the setup...)
          >
          > [...]
          >> export DISPLAY=localhost:0.0
          >> xterm &
          >
          > This probably won't work.
          >
          > ssh -X doesn't listen on display 0 --- it usually starts at 10 and works
          > up.
          > It also sets the DISPLAY variable itself, and if it doesn't get set, that
          > probably means X forwarding isn't turned on and setting it manually
          > wouldn't
          > work anyway.
          >
          > Just to clarify: to make X forwarding work, you need:
          >
          > - - an X server on your local machine
          > - - access to the X server from your ssh client (running it in an xterm
          > works)
          > - - you need to connect to the NSLU2 with ssh -X (you must specify -X or
          > it
          > won't work; you may be able to get round this by changing one of ssh's
          > many
          > obscure scary configuration files)
          > - - you need xauth installed on the NSLU2 (it's in the xbase-clients
          > Debian
          > package)
          > - - then it just works.
          >
          > e.g:
          >
          > dg@pyanfar:~$ xauth
          > xauth: creating new authority file /home/dg/.Xauthority
          > Using authority file /home/dg/.Xauthority
          > xauth> dg@pyanfar:~$ logout
          > Connection to pyanfar closed.
          > dg@hilfy:~$ ssh -X pyanfar
          > dg@pyanfar's password:
          > /usr/X11R6/bin/xauth: creating new authority file /home/dg/.Xauthority
          > dg@pyanfar:~$ xterm &
          > dg@pyanfar:~$
          >
          > ...and the window pops up.
          >
          > It's not even particularly slow. xterm consumes 2780kB of real memory on
          > my
          > system; rxvt might be a better better bet, at 1620kB. Admittedly, there's
          > not
          > a lot of benefit over using a simple ssh shell, but it's perfectly usable.
          > (Don't forget that a mere ten years ago, most desktops were about the same
          > spec as the NSLU2! *And* they had to run the X server at the same time!)
          >
          > - --
          > ┌── dg@cowlark.com ─── http://www.cowlark.com ───────────────────
          > │
          > │ "There does not now, nor will there ever, exist a programming language
          > in
          > │ which it is the least bit hard to write bad programs." --- Flon's Axiom
          > -----BEGIN PGP SIGNATURE-----
          > Version: GnuPG v1.4.6 (GNU/Linux)
          > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
          >
          > iD8DBQFG0KEAf9E0noFvlzgRArAyAJ9zSw/myaxn3NvAWWUeaLPV8HITFgCfcUdz
          > szfznJd8ts11Dol3SvVOwqo=
          > =10I+
          > -----END PGP SIGNATURE-----
          >
          >
          >

          --
          View this message in context: http://www.nabble.com/How-to-you-run-xterm-on-a-%28debian%29-slug--tf4328854.html#a12336269
          Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
        • Mike (mwester)
          ... Exactly right. The part that runs on your desktop machine and emulates the monitor/keyboard, as you say, is called the X server. The part that runs on the
          Message 4 of 12 , Aug 26, 2007
          View Source
          • 0 Attachment
            > I really don't understand why X (or equivalent) needs to be running on my
            > workstation. I assume that if I have X installed on the slug, then all I
            > need on the workstation is something that will emulate a locally attached
            > monitor/keyboard to the slug (which isn't there).

            Exactly right. The part that runs on your desktop machine and emulates the
            monitor/keyboard, as you say, is called the X server.

            The part that runs on the NSLU2 is the X client.

            You need X utilities on the client as well as the server (note that in X
            terminology, the client is the remote machine, and the server is the one in
            front of you -- often confusing since most folks associate "server" with the
            remote system). There is setup involved on both systems, as (for example)
            the server needs to know to listen for incoming connections on a certain
            port, and it needs to be instructed as to which incoming connections are
            authorized and which should be ignored. Likewise, the client needs to know
            where to find it's server, and what ports to contact. Just to toss more
            stuff into the mix, there's something called the X window manager -- it's
            job is to handle everything outside of the actual panes -- window borders,
            resize, move, etc. The window manager can run on one of the two (client or
            server) systems, or it can run on a third. Which window manager you choose
            can dramatically affect performance as well; some are better suited to the
            "no-frills" type of system.

            As for using X with the NSLU2, there's much more involved than just the CPU
            clock speed. It's an easy measurement -- "My clock is 266MHz!" - but about
            as meaningful as measuring your automobile's towing performance by the RPMs
            of the engine. That said, there's little doubt that X clients will run on
            the device. I suspect that with the proper drivers one could even get an X
            server running on one of those USB->VGA adaptors. But in the end, it's not
            what it was designed for. And like a Porsche at a tracter-pull, it's good
            for entertainment, but not very practical in real life.

            Mike (mwester)
          • dhbrandtjr
            Mike, Thank you for your explanation. Can you recommend a source for setting up X on both the client (slug) and remote (windows machine) that has examples and
            Message 5 of 12 , Aug 26, 2007
            View Source
            • 0 Attachment
              Mike,

              Thank you for your explanation. Can you recommend a source for setting up X
              on both the client (slug) and remote (windows machine) that has examples and
              detail verbiage that a newbe can follow?

              Again, thank you for your feedback.

              Don

              --------------------------------------------------------------------------------------------

              mwester wrote:
              >
              >> I really don't understand why X (or equivalent) needs to be running on my
              >> workstation. I assume that if I have X installed on the slug, then all I
              >> need on the workstation is something that will emulate a locally attached
              >> monitor/keyboard to the slug (which isn't there).
              >
              > Exactly right. The part that runs on your desktop machine and emulates
              > the
              > monitor/keyboard, as you say, is called the X server.
              >
              > The part that runs on the NSLU2 is the X client.
              >
              > You need X utilities on the client as well as the server (note that in X
              > terminology, the client is the remote machine, and the server is the one
              > in
              > front of you -- often confusing since most folks associate "server" with
              > the
              > remote system). There is setup involved on both systems, as (for example)
              > the server needs to know to listen for incoming connections on a certain
              > port, and it needs to be instructed as to which incoming connections are
              > authorized and which should be ignored. Likewise, the client needs to
              > know
              > where to find it's server, and what ports to contact. Just to toss more
              > stuff into the mix, there's something called the X window manager -- it's
              > job is to handle everything outside of the actual panes -- window borders,
              > resize, move, etc. The window manager can run on one of the two (client
              > or
              > server) systems, or it can run on a third. Which window manager you
              > choose
              > can dramatically affect performance as well; some are better suited to the
              > "no-frills" type of system.
              >
              > As for using X with the NSLU2, there's much more involved than just the
              > CPU
              > clock speed. It's an easy measurement -- "My clock is 266MHz!" - but
              > about
              > as meaningful as measuring your automobile's towing performance by the
              > RPMs
              > of the engine. That said, there's little doubt that X clients will run on
              > the device. I suspect that with the proper drivers one could even get an
              > X
              > server running on one of those USB->VGA adaptors. But in the end, it's
              > not
              > what it was designed for. And like a Porsche at a tracter-pull, it's good
              > for entertainment, but not very practical in real life.
              >
              > Mike (mwester)
              >
              >
              >

              --
              View this message in context: http://www.nabble.com/How-to-you-run-xterm-on-a-%28debian%29-slug--tf4328854.html#a12337412
              Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
            • dhbrandtjr
              Rob, When I apt-get install xbase-clients on my slug, I received the following message: xbase-clients is already the newest version From that I assume that
              Message 6 of 12 , Aug 26, 2007
              View Source
              • 0 Attachment
                Rob,

                When I "apt-get install xbase-clients" on my slug, I received the following
                message:

                xbase-clients is already the newest version

                From that I assume that xbase-clients is already installed.

                Have you any other suggestions?

                Thanks,

                Don

                ----------------------------------------------------------------------------------------------------

                Rob Lockhart wrote:
                >
                > ----- Original Message -----
                > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                > Date: Sat, August 25, 2007 17:37
                > From: "David Given" <dg@...>
                >
                >> Rob Lockhart wrote:
                >>
                >> (Rob, your mailer is configured for HTML and is producing a
                >> mangled plain text version with, apart from anything else,
                >> no quoting. You may want to look at the setup...)
                >
                > Switched to plaintext. It didn't show being mangled on my web
                > email client, but this is a big list and surely on some client
                > it would have been mangled.
                >
                >> [...]
                >> > export DISPLAY=localhost:0.0
                >> > xterm &amp;
                >>
                >> This probably won't work.
                >>
                >> ssh -X doesn't listen on display 0 --- it usually starts at 10
                >> and works up. It also sets the DISPLAY variable itself, and if
                >> it doesn't get set, that probably means X forwarding isn't
                >> turned on and setting it manually wouldn't work anyway.
                >
                > Yes, this is clear. My instructions were meant for starting
                > at the client (NOT the NSLU2), getting it working locally then
                > moving to NSLU2. I couldn't get it working on NSLU2 so I
                > couldn't complete my instructions. The
                > "usually starts at 10 and works up"
                > is the config setting in /etc/ssh/sshd_config :
                >
                > X11Forwarding yes
                > X11DisplayOffset 10
                >
                > My point was to
                > 1) get X working locally, and
                > 2) *then* try to get it working with the NSLU2.
                >
                >> Just to clarify: to make X forwarding work, you need:
                >>
                >> 1) an X server on your local machine
                >> 2) access to the X server from your ssh client (running it
                >> in an xterm works)
                >> 3) you need to connect to the NSLU2 with ssh -X
                >> (you must specify -X or it won't work; you may be able to
                >> get around this by changing one of ssh's many obscure
                >> scary configuration files)
                >> 4) you need xauth installed on the NSLU2 (it's in the
                >> xbase-clients Debian package)
                >> 5) then it just works.
                >>
                >> e.g:
                >>
                >> dg@pyanfar:~$ xauth
                >> xauth: creating new authority file /home/dg/.Xauthority
                >> Using authority file /home/dg/.Xauthority
                >> xauth> dg@pyanfar:~$ logout
                >> Connection to pyanfar closed.
                >> dg@hilfy:~$ ssh -X pyanfar
                >> dg@pyanfar's password:
                >> /usr/X11R6/bin/xauth: creating new authority file /home/dg/.Xauthority
                >> dg@pyanfar:~$ xterm &
                >> dg@pyanfar:~$
                >
                > Note that what my email was saying is that in my setup, even with
                >
                > ssh -X user@NSLU2_IP_ADDRESS
                >
                > I would login, and yet the NSLU2 DISPLAY env variable was not
                > being set (in fact, with "-v" for verbosity, it said it couldn't
                > set up the port forwarding). I've used ssh over X for years
                > but certainly not with the NSLU2. It appears that in my
                > case, even using -X doesn't forward the X11 display from
                > NSLU2 back to the host. I even tried
                > "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
                > that it couldn't forward that port (this was within VNC).
                > I originally tried this with a VNC window onto my
                > Fedora 7 box (display is :1) and just tried it with the
                > primary X display (:0 login). Same thing! So the -X seems
                > to not be working over ssh in my setup.
                >
                > Performing "apt-get install xbase-clients" and now it works!
                > I.e., the DISPLAY env variable is being set when doing:
                > ssh -X user@NSLU2
                >
                > I didn't have xterm but previously installed xemacs and that
                > came up. Not too shabby! Thanks for the missing step!
                > I assumed that since xemacs depends on x, that at least the
                > auth agent would have been installed as a dependency, but
                > clearly xemacs can be run as "xemacs -nw" in which case
                > it runs in purely VT100-type style w/o any Xwindows features.
                >
                > ... time to modify some Wiki's...
                >
                >> ...and the window pops up.
                >>
                >> It's not even particularly slow. xterm consumes 2780kB of
                >> real memory on my system; rxvt might be a better better bet,
                >> at 1620kB. Admittedly, there's not a lot of benefit over
                >> using a simple ssh shell, but it's perfectly usable.
                >> (Don't forget that a mere ten years ago, most desktops
                >> were about the same spec as the NSLU2! *And* they had to
                >> run the X server at the same time!)
                >
                > This is true! That's generally why I would run fvwm or icewm,
                > because such a small memory footprint. Over a slow link,
                > X might not be too usable. In that case, you could try -C
                > for SSH compression. That might not be as good at compression
                > as something like running a TightVNC server/client with
                > tight compression.
                >
                > Regards,
                > -Rob
                >
                >

                --
                View this message in context: http://www.nabble.com/How-to-you-run-xterm-on-a-%28debian%29-slug--tf4328854.html#a12337477
                Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
              • Rob Lockhart
                Don, it seems you already have xauth installed. You could delete .Xauthority and it ll get re-created: [rob@NSLU2:] rm ~/.Xauthority (disconnect) SSH into
                Message 7 of 12 , Aug 26, 2007
                View Source
                • 0 Attachment
                  Don, it seems you already have xauth installed. You could
                  delete .Xauthority and it'll get re-created:

                  [rob@NSLU2:] rm ~/.Xauthority

                  (disconnect)

                  SSH into NSLU2:

                  [user@linux ~]$ slogin -X NSLU2
                  Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                  /usr/bin/X11/xauth: creating new authority file /home/user/.Xauthority

                  If you wanted to be real cheap (and smart!) you could just install Cygwin
                  http://www.cygwin.com and install everything. Now, you'll have an icon
                  called "Singular CAS" with some note about Starting X server. Run that.
                  Now there should be a big "X" in your lower right taskbar for WinXP.

                  Now, open up a Cygwin shell, and make sure DISPLAY variable is set.
                  I had to set mine manually:
                  export DISPLAY=localhost:0.0
                  I also noticed an xauth data error:
                  "Warning: No xauth data; using fake authentication data for X11 forwarding."
                  so I ran "xauth" from cygwin shell:

                  $ xauth.exe
                  xauth: creating new authority file /home/Rob/.Xauthority
                  Using authority file /home/Rob/.Xauthority
                  xauth> quit

                  $ ssh -X user@NSLU2
                  user@nslu2's password:
                  Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel

                  user@NSLU2:~$ printenv DISPLAY
                  localhost:10.0
                  user@NSLU2:~$ xeyes

                  and then I see eyes following my mouse cursor.

                  If this is not working, could it be some kind of firewall issue?
                  I got a bunch of warnings about accepting connections from xauth.exe
                  ssh, bash.exe, etc.

                  HTH,
                  -Rob

                  ----- Original Message -----
                  Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                  Date: Sun, August 26, 2007 15:08
                  From: "dhbrandtjr" <dhbrandtjr@...>

                  > Rob,
                  >
                  > When I "apt-get install xbase-clients" on my slug, I received the following
                  > message:
                  >
                  > xbase-clients is already the newest version
                  >
                  > From that I assume that xbase-clients is already installed.
                  >
                  > Have you any other suggestions?
                  >
                  > Thanks,
                  >
                  > Don
                  >
                  > ----------------------------------------------------------------------------------------------------
                  >
                  > Rob Lockhart wrote:
                  > >
                  > > ----- Original Message -----
                  > > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                  > > Date: Sat, August 25, 2007 17:37
                  > > From: "David Given" <dg@...>
                  > >
                  > >> Rob Lockhart wrote:
                  > >>
                  > >> (Rob, your mailer is configured for HTML and is producing a
                  > >> mangled plain text version with, apart from anything else,
                  > >> no quoting. You may want to look at the setup...)
                  > >
                  > > Switched to plaintext. It didn't show being mangled on my web
                  > > email client, but this is a big list and surely on some client
                  > > it would have been mangled.
                  > >
                  > >> [...]
                  > >> > export DISPLAY=localhost:0.0
                  > >> > xterm &amp;amp;
                  > >>
                  > >> This probably won't work.
                  > >>
                  > >> ssh -X doesn't listen on display 0 --- it usually starts at 10
                  > >> and works up. It also sets the DISPLAY variable itself, and if
                  > >> it doesn't get set, that probably means X forwarding isn't
                  > >> turned on and setting it manually wouldn't work anyway.
                  > >
                  > > Yes, this is clear. My instructions were meant for starting
                  > > at the client (NOT the NSLU2), getting it working locally then
                  > > moving to NSLU2. I couldn't get it working on NSLU2 so I
                  > > couldn't complete my instructions. The
                  > > "usually starts at 10 and works up"
                  > > is the config setting in /etc/ssh/sshd_config :
                  > >
                  > > X11Forwarding yes
                  > > X11DisplayOffset 10
                  > >
                  > > My point was to
                  > > 1) get X working locally, and
                  > > 2) *then* try to get it working with the NSLU2.
                  > >
                  > >> Just to clarify: to make X forwarding work, you need:
                  > >>
                  > >> 1) an X server on your local machine
                  > >> 2) access to the X server from your ssh client (running it
                  > >> in an xterm works)
                  > >> 3) you need to connect to the NSLU2 with ssh -X
                  > >> (you must specify -X or it won't work; you may be able to
                  > >> get around this by changing one of ssh's many obscure
                  > >> scary configuration files)
                  > >> 4) you need xauth installed on the NSLU2 (it's in the
                  > >> xbase-clients Debian package)
                  > >> 5) then it just works.
                  > >>
                  > >> e.g:
                  > >>
                  > >> dg@pyanfar:~$ xauth
                  > >> xauth: creating new authority file /home/dg/.Xauthority
                  > >> Using authority file /home/dg/.Xauthority
                  > >> xauth> dg@pyanfar:~$ logout
                  > >> Connection to pyanfar closed.
                  > >> dg@hilfy:~$ ssh -X pyanfar
                  > >> dg@pyanfar's password:
                  > >> /usr/X11R6/bin/xauth: creating new authority file /home/dg/.Xauthority
                  > >> dg@pyanfar:~$ xterm &
                  > >> dg@pyanfar:~$
                  > >
                  > > Note that what my email was saying is that in my setup, even with
                  > >
                  > > ssh -X user@NSLU2_IP_ADDRESS
                  > >
                  > > I would login, and yet the NSLU2 DISPLAY env variable was not
                  > > being set (in fact, with "-v" for verbosity, it said it couldn't
                  > > set up the port forwarding). I've used ssh over X for years
                  > > but certainly not with the NSLU2. It appears that in my
                  > > case, even using -X doesn't forward the X11 display from
                  > > NSLU2 back to the host. I even tried
                  > > "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
                  > > that it couldn't forward that port (this was within VNC).
                  > > I originally tried this with a VNC window onto my
                  > > Fedora 7 box (display is :1) and just tried it with the
                  > > primary X display (:0 login). Same thing! So the -X seems
                  > > to not be working over ssh in my setup.
                  > >
                  > > Performing "apt-get install xbase-clients" and now it works!
                  > > I.e., the DISPLAY env variable is being set when doing:
                  > > ssh -X user@NSLU2
                  > >
                  > > I didn't have xterm but previously installed xemacs and that
                  > > came up. Not too shabby! Thanks for the missing step!
                  > > I assumed that since xemacs depends on x, that at least the
                  > > auth agent would have been installed as a dependency, but
                  > > clearly xemacs can be run as "xemacs -nw" in which case
                  > > it runs in purely VT100-type style w/o any Xwindows features.
                  > >
                  > > ... time to modify some Wiki's...
                  > >
                  > >> ...and the window pops up.
                  > >>
                  > >> It's not even particularly slow. xterm consumes 2780kB of
                  > >> real memory on my system; rxvt might be a better better bet,
                  > >> at 1620kB. Admittedly, there's not a lot of benefit over
                  > >> using a simple ssh shell, but it's perfectly usable.
                  > >> (Don't forget that a mere ten years ago, most desktops
                  > >> were about the same spec as the NSLU2! *And* they had to
                  > >> run the X server at the same time!)
                  > >
                  > > This is true! That's generally why I would run fvwm or icewm,
                  > > because such a small memory footprint. Over a slow link,
                  > > X might not be too usable. In that case, you could try -C
                  > > for SSH compression. That might not be as good at compression
                  > > as something like running a TightVNC server/client with
                  > > tight compression.
                  > >
                  > > Regards,
                  > > -Rob
                  > >
                • dhbrandtjr
                  Rob, Thank you for your detailed instructions. I will give attempt to follow your directions to get my system to work. From your comments, it appears that
                  Message 8 of 12 , Aug 26, 2007
                  View Source
                  • 0 Attachment
                    Rob,

                    Thank you for your detailed instructions. I will give attempt to follow
                    your directions to get my system to work. From your comments, it appears
                    that you were able to accomplish what I am attempting to do. Assuming that
                    is correct, how was performance? Could you running X applications on the
                    slug and display the corresponding results within a windows window?

                    Don

                    --------------------------------------------------------------------------------------------


                    Rob Lockhart wrote:
                    >
                    > Don, it seems you already have xauth installed. You could
                    > delete .Xauthority and it'll get re-created:
                    >
                    > [rob@NSLU2:] rm ~/.Xauthority
                    >
                    > (disconnect)
                    >
                    > SSH into NSLU2:
                    >
                    > [user@linux ~]$ slogin -X NSLU2
                    > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                    > /usr/bin/X11/xauth: creating new authority file /home/user/.Xauthority
                    >
                    > If you wanted to be real cheap (and smart!) you could just install Cygwin
                    > http://www.cygwin.com and install everything. Now, you'll have an icon
                    > called "Singular CAS" with some note about Starting X server. Run that.
                    > Now there should be a big "X" in your lower right taskbar for WinXP.
                    >
                    > Now, open up a Cygwin shell, and make sure DISPLAY variable is set.
                    > I had to set mine manually:
                    > export DISPLAY=localhost:0.0
                    > I also noticed an xauth data error:
                    > "Warning: No xauth data; using fake authentication data for X11
                    > forwarding."
                    > so I ran "xauth" from cygwin shell:
                    >
                    > $ xauth.exe
                    > xauth: creating new authority file /home/Rob/.Xauthority
                    > Using authority file /home/Rob/.Xauthority
                    > xauth> quit
                    >
                    > $ ssh -X user@NSLU2
                    > user@nslu2's password:
                    > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                    >
                    > user@NSLU2:~$ printenv DISPLAY
                    > localhost:10.0
                    > user@NSLU2:~$ xeyes
                    >
                    > and then I see eyes following my mouse cursor.
                    >
                    > If this is not working, could it be some kind of firewall issue?
                    > I got a bunch of warnings about accepting connections from xauth.exe
                    > ssh, bash.exe, etc.
                    >
                    > HTH,
                    > -Rob
                    >
                    > ----- Original Message -----
                    > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                    > Date: Sun, August 26, 2007 15:08
                    > From: "dhbrandtjr" <dhbrandtjr@...>
                    >
                    >> Rob,
                    >>
                    >> When I "apt-get install xbase-clients" on my slug, I received the
                    >> following
                    >> message:
                    >>
                    >> xbase-clients is already the newest version
                    >>
                    >> From that I assume that xbase-clients is already installed.
                    >>
                    >> Have you any other suggestions?
                    >>
                    >> Thanks,
                    >>
                    >> Don
                    >>
                    >> ----------------------------------------------------------------------------------------------------
                    >>
                    >> Rob Lockhart wrote:
                    >> >
                    >> > ----- Original Message -----
                    >> > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                    >> > Date: Sat, August 25, 2007 17:37
                    >> > From: "David Given" <dg@...>
                    >> >
                    >> >> Rob Lockhart wrote:
                    >> >>
                    >> >> (Rob, your mailer is configured for HTML and is producing a
                    >> >> mangled plain text version with, apart from anything else,
                    >> >> no quoting. You may want to look at the setup...)
                    >> >
                    >> > Switched to plaintext. It didn't show being mangled on my web
                    >> > email client, but this is a big list and surely on some client
                    >> > it would have been mangled.
                    >> >
                    >> >> [...]
                    >> >> > export DISPLAY=localhost:0.0
                    >> >> > xterm &amp;amp;
                    >> >>
                    >> >> This probably won't work.
                    >> >>
                    >> >> ssh -X doesn't listen on display 0 --- it usually starts at 10
                    >> >> and works up. It also sets the DISPLAY variable itself, and if
                    >> >> it doesn't get set, that probably means X forwarding isn't
                    >> >> turned on and setting it manually wouldn't work anyway.
                    >> >
                    >> > Yes, this is clear. My instructions were meant for starting
                    >> > at the client (NOT the NSLU2), getting it working locally then
                    >> > moving to NSLU2. I couldn't get it working on NSLU2 so I
                    >> > couldn't complete my instructions. The
                    >> > "usually starts at 10 and works up"
                    >> > is the config setting in /etc/ssh/sshd_config :
                    >> >
                    >> > X11Forwarding yes
                    >> > X11DisplayOffset 10
                    >> >
                    >> > My point was to
                    >> > 1) get X working locally, and
                    >> > 2) *then* try to get it working with the NSLU2.
                    >> >
                    >> >> Just to clarify: to make X forwarding work, you need:
                    >> >>
                    >> >> 1) an X server on your local machine
                    >> >> 2) access to the X server from your ssh client (running it
                    >> >> in an xterm works)
                    >> >> 3) you need to connect to the NSLU2 with ssh -X
                    >> >> (you must specify -X or it won't work; you may be able to
                    >> >> get around this by changing one of ssh's many obscure
                    >> >> scary configuration files)
                    >> >> 4) you need xauth installed on the NSLU2 (it's in the
                    >> >> xbase-clients Debian package)
                    >> >> 5) then it just works.
                    >> >>
                    >> >> e.g:
                    >> >>
                    >> >> dg@pyanfar:~$ xauth
                    >> >> xauth: creating new authority file /home/dg/.Xauthority
                    >> >> Using authority file /home/dg/.Xauthority
                    >> >> xauth> dg@pyanfar:~$ logout
                    >> >> Connection to pyanfar closed.
                    >> >> dg@hilfy:~$ ssh -X pyanfar
                    >> >> dg@pyanfar's password:
                    >> >> /usr/X11R6/bin/xauth: creating new authority file
                    >> /home/dg/.Xauthority
                    >> >> dg@pyanfar:~$ xterm &
                    >> >> dg@pyanfar:~$
                    >> >
                    >> > Note that what my email was saying is that in my setup, even with
                    >> >
                    >> > ssh -X user@NSLU2_IP_ADDRESS
                    >> >
                    >> > I would login, and yet the NSLU2 DISPLAY env variable was not
                    >> > being set (in fact, with "-v" for verbosity, it said it couldn't
                    >> > set up the port forwarding). I've used ssh over X for years
                    >> > but certainly not with the NSLU2. It appears that in my
                    >> > case, even using -X doesn't forward the X11 display from
                    >> > NSLU2 back to the host. I even tried
                    >> > "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
                    >> > that it couldn't forward that port (this was within VNC).
                    >> > I originally tried this with a VNC window onto my
                    >> > Fedora 7 box (display is :1) and just tried it with the
                    >> > primary X display (:0 login). Same thing! So the -X seems
                    >> > to not be working over ssh in my setup.
                    >> >
                    >> > Performing "apt-get install xbase-clients" and now it works!
                    >> > I.e., the DISPLAY env variable is being set when doing:
                    >> > ssh -X user@NSLU2
                    >> >
                    >> > I didn't have xterm but previously installed xemacs and that
                    >> > came up. Not too shabby! Thanks for the missing step!
                    >> > I assumed that since xemacs depends on x, that at least the
                    >> > auth agent would have been installed as a dependency, but
                    >> > clearly xemacs can be run as "xemacs -nw" in which case
                    >> > it runs in purely VT100-type style w/o any Xwindows features.
                    >> >
                    >> > ... time to modify some Wiki's...
                    >> >
                    >> >> ...and the window pops up.
                    >> >>
                    >> >> It's not even particularly slow. xterm consumes 2780kB of
                    >> >> real memory on my system; rxvt might be a better better bet,
                    >> >> at 1620kB. Admittedly, there's not a lot of benefit over
                    >> >> using a simple ssh shell, but it's perfectly usable.
                    >> >> (Don't forget that a mere ten years ago, most desktops
                    >> >> were about the same spec as the NSLU2! *And* they had to
                    >> >> run the X server at the same time!)
                    >> >
                    >> > This is true! That's generally why I would run fvwm or icewm,
                    >> > because such a small memory footprint. Over a slow link,
                    >> > X might not be too usable. In that case, you could try -C
                    >> > for SSH compression. That might not be as good at compression
                    >> > as something like running a TightVNC server/client with
                    >> > tight compression.
                    >> >
                    >> > Regards,
                    >> > -Rob
                    >> >
                    >
                    >
                    >

                    --
                    View this message in context: http://www.nabble.com/How-to-you-run-xterm-on-a-%28debian%29-slug--tf4328854.html#a12340243
                    Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
                  • Rob Lockhart
                    In regards to your question, yes, it is possible to run some stuff in Xwindows, but I attempted to answer your initial question... could you run an Xserver
                    Message 9 of 12 , Aug 26, 2007
                    View Source
                    • 0 Attachment
                      In regards to your question, yes, it is possible to run
                      some stuff in Xwindows, but I attempted to answer your
                      initial question... could you run an Xserver from NSLU2.
                      The answer is yes, and I got that working in NSLU2.
                      This is not what I would call easy by any means.

                      So, assuming a little knowledge of linux and Debian, I'll explain
                      in a bit of detail how to set up a VNC server on the NSLU2. Note
                      that I did not install KDE, you have to be really insane to expect
                      that to run out of RAM, and KDE is known for being a real memory
                      hog. And VNC is known to be a CPU/network hog (we all know of the
                      limits of the NSLU2 networking impementations). So, I installed
                      icewm instead. I also installed fvwm but didn't actually run it.
                      Root prefixed by "#", mortal user by "$".

                      # apt-get install icewm
                      # apt-get install xfonts-*
                      (I did the above because I was just too lazy to go through hundreds
                      of fonts to determine what I needed - and I have a fast connection
                      and a couple GB free of HD space on / partition).
                      # apt-get install vncserver
                      # vi /etc/vnc.conf

                      modify it as follows
                      (below "I don't know what the default is, though." text and other
                      appropriate places in the file below the commented-out parts)

                      $fontPath .= "/usr/share/fonts/X11/100dpi,";
                      $fontPath .= "/usr/share/fonts/X11/misc/,";
                      $fontPath .= "/usr/share/fonts/X11/75dpi/,";
                      $fontPath .= "/usr/share/fonts/X11/Type1/,";
                      $fontPath .= "/usr/share/fonts/X11/util/";

                      $geometry = "1280x1024";

                      $depth = "16";

                      $getDefaultFrom = "-display localhost:1"

                      save the file, and continue below

                      $ vncpasswd
                      (choose something - blank passwords not recommended)

                      $ vi ~/.vnc/xstartup
                      and add the contents below (left in RedHat for credit):

                      #!/bin/sh
                      # Red Hat Linux VNC session startup script
                      #exec /etc/X11/xinit/xinitrc
                      #exec /usr/X11R6/bin/twm
                      #exec /usr/X11R6/bin/fvwm2
                      exec /usr/X11R6/bin/icewm
                      #exec /usr/bin/icewm-session

                      Save it, and then type:
                      $ vncserver

                      It will take about a minute, but it finally comes up and,
                      according to running "top", cycling every 10sec, the CPU load
                      settles down to 10-20%. I then connected to it with UltraVNC
                      (since it supports RealVNC, TightVNC and UltraVNC protocols).
                      If it works, you'll be prompted for the password you chose
                      above. Connect to "your_NSLU2_IPaddress:1". It should
                      connect, and then the NSLU2 will take a bit of time to
                      implement the desktop manager.

                      Just moving the mouse around, you'll see how much loading on
                      the CPU there is. But it does work!

                      Since I've already "mucked" my system up, maybe someone could
                      verify my steps above and then yet another Wiki addition.
                      But with disclaimers - do not try this unless you're prepared
                      for the slowness. :-)

                      Note that this wasn't even over SSH. I cannot imagine how
                      slow that would be then. Backups over SSH/rsync see about
                      30-50% of the performance of direct NFS, so I assume the
                      same with VNC over SSH.

                      To do it over SSH, VNC uses port 5901 and above. So you
                      would connect via SSH as follows:

                      ssh -X -L 5901:localhost:5901 user@NSLU2
                      then, once connected via SSH, open a VNC client, then
                      connect to "localhost:1". Sometimes MS-Windows can be
                      a pain about localhost, so if that doesn't work, try
                      something clever like 127.0.0.2:1 instead. This is needed
                      for RDC over SSH, at least, for WinXP.

                      As a side note, I am running with 64MB detected by kernel
                      (256MB actual, but due to some kernel bugs, I think, and/or
                      perhaps some issues with memory init with Apex, I forced it
                      to 64MB). Even with 64MB, and just one xterm, I was running
                      10MB out of swap. I only have an NFS client, samba, sshd and
                      other essentials running, no http, media, etc. servers. So
                      those of you with only 32MB, it may actually run much slower
                      than my setup. Would be nice if I could get all 256MB to
                      work (but my NSLU2 is my main backup server and pretty much
                      always in use).

                      Regards,
                      -Rob


                      ----- Original Message -----
                      Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                      Date: Sun, August 26, 2007 21:03
                      From: "dhbrandtjr" <dhbrandtjr@...>

                      > Rob,
                      >
                      > Thank you for your detailed instructions. I will give attempt to follow
                      > your directions to get my system to work. From your comments, it appears
                      > that you were able to accomplish what I am attempting to do. Assuming that
                      > is correct, how was performance? Could you running X applications on the
                      > slug and display the corresponding results within a windows window?
                      >
                      > Don
                      >
                      > --------------------------------------------------------------------------------------------
                      >
                      >
                      > Rob Lockhart wrote:
                      > >
                      > > Don, it seems you already have xauth installed. You could
                      > > delete .Xauthority and it'll get re-created:
                      > >
                      > > [rob@NSLU2:] rm ~/.Xauthority
                      > >
                      > > (disconnect)
                      > >
                      > > SSH into NSLU2:
                      > >
                      > > [user@linux ~]$ slogin -X NSLU2
                      > > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                      > > /usr/bin/X11/xauth: creating new authority file /home/user/.Xauthority
                      > >
                      > > If you wanted to be real cheap (and smart!) you could just install Cygwin
                      > > http://www.cygwin.com and install everything. Now, you'll have an icon
                      > > called "Singular CAS" with some note about Starting X server. Run that.
                      > > Now there should be a big "X" in your lower right taskbar for WinXP.
                      > >
                      > > Now, open up a Cygwin shell, and make sure DISPLAY variable is set.
                      > > I had to set mine manually:
                      > > export DISPLAY=localhost:0.0
                      > > I also noticed an xauth data error:
                      > > "Warning: No xauth data; using fake authentication data for X11
                      > > forwarding."
                      > > so I ran "xauth" from cygwin shell:
                      > >
                      > > $ xauth.exe
                      > > xauth: creating new authority file /home/Rob/.Xauthority
                      > > Using authority file /home/Rob/.Xauthority
                      > > xauth> quit
                      > >
                      > > $ ssh -X user@NSLU2
                      > > user@nslu2's password:
                      > > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                      > >
                      > > user@NSLU2:~$ printenv DISPLAY
                      > > localhost:10.0
                      > > user@NSLU2:~$ xeyes
                      > >
                      > > and then I see eyes following my mouse cursor.
                      > >
                      > > If this is not working, could it be some kind of firewall issue?
                      > > I got a bunch of warnings about accepting connections from xauth.exe
                      > > ssh, bash.exe, etc.
                      > >
                      > > HTH,
                      > > -Rob
                      > >
                      > > ----- Original Message -----
                      > > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                      > > Date: Sun, August 26, 2007 15:08
                      > > From: "dhbrandtjr" <dhbrandtjr@...>
                      > >
                      > >> Rob,
                      > >>
                      > >> When I "apt-get install xbase-clients" on my slug, I received the
                      > >> following
                      > >> message:
                      > >>
                      > >> xbase-clients is already the newest version
                      > >>
                      > >> From that I assume that xbase-clients is already installed.
                      > >>
                      > >> Have you any other suggestions?
                      > >>
                      > >> Thanks,
                      > >>
                      > >> Don
                      > >>
                      > >> ----------------------------------------------------------------------------------------------------
                      > >>
                      > >> Rob Lockhart wrote:
                      > >> >
                      > >> > ----- Original Message -----
                      > >> > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                      > >> > Date: Sat, August 25, 2007 17:37
                      > >> > From: "David Given" <dg@...>
                      > >> >
                      > >> >> Rob Lockhart wrote:
                      > >> >>
                      > >> >> (Rob, your mailer is configured for HTML and is producing a
                      > >> >> mangled plain text version with, apart from anything else,
                      > >> >> no quoting. You may want to look at the setup...)
                      > >> >
                      > >> > Switched to plaintext. It didn't show being mangled on my web
                      > >> > email client, but this is a big list and surely on some client
                      > >> > it would have been mangled.
                      > >> >
                      > >> >> [...]
                      > >> >> > export DISPLAY=localhost:0.0
                      > >> >> > xterm &amp;amp;amp;
                      > >> >>
                      > >> >> This probably won't work.
                      > >> >>
                      > >> >> ssh -X doesn't listen on display 0 --- it usually starts at 10
                      > >> >> and works up. It also sets the DISPLAY variable itself, and if
                      > >> >> it doesn't get set, that probably means X forwarding isn't
                      > >> >> turned on and setting it manually wouldn't work anyway.
                      > >> >
                      > >> > Yes, this is clear. My instructions were meant for starting
                      > >> > at the client (NOT the NSLU2), getting it working locally then
                      > >> > moving to NSLU2. I couldn't get it working on NSLU2 so I
                      > >> > couldn't complete my instructions. The
                      > >> > "usually starts at 10 and works up"
                      > >> > is the config setting in /etc/ssh/sshd_config :
                      > >> >
                      > >> > X11Forwarding yes
                      > >> > X11DisplayOffset 10
                      > >> >
                      > >> > My point was to
                      > >> > 1) get X working locally, and
                      > >> > 2) *then* try to get it working with the NSLU2.
                      > >> >
                      > >> >> Just to clarify: to make X forwarding work, you need:
                      > >> >>
                      > >> >> 1) an X server on your local machine
                      > >> >> 2) access to the X server from your ssh client (running it
                      > >> >> in an xterm works)
                      > >> >> 3) you need to connect to the NSLU2 with ssh -X
                      > >> >> (you must specify -X or it won't work; you may be able to
                      > >> >> get around this by changing one of ssh's many obscure
                      > >> >> scary configuration files)
                      > >> >> 4) you need xauth installed on the NSLU2 (it's in the
                      > >> >> xbase-clients Debian package)
                      > >> >> 5) then it just works.
                      > >> >>
                      > >> >> e.g:
                      > >> >>
                      > >> >> dg@pyanfar:~$ xauth
                      > >> >> xauth: creating new authority file /home/dg/.Xauthority
                      > >> >> Using authority file /home/dg/.Xauthority
                      > >> >> xauth> dg@pyanfar:~$ logout
                      > >> >> Connection to pyanfar closed.
                      > >> >> dg@hilfy:~$ ssh -X pyanfar
                      > >> >> dg@pyanfar's password:
                      > >> >> /usr/X11R6/bin/xauth: creating new authority file
                      > >> /home/dg/.Xauthority
                      > >> >> dg@pyanfar:~$ xterm &amp;
                      > >> >> dg@pyanfar:~$
                      > >> >
                      > >> > Note that what my email was saying is that in my setup, even with
                      > >> >
                      > >> > ssh -X user@NSLU2_IP_ADDRESS
                      > >> >
                      > >> > I would login, and yet the NSLU2 DISPLAY env variable was not
                      > >> > being set (in fact, with "-v" for verbosity, it said it couldn't
                      > >> > set up the port forwarding). I've used ssh over X for years
                      > >> > but certainly not with the NSLU2. It appears that in my
                      > >> > case, even using -X doesn't forward the X11 display from
                      > >> > NSLU2 back to the host. I even tried
                      > >> > "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
                      > >> > that it couldn't forward that port (this was within VNC).
                      > >> > I originally tried this with a VNC window onto my
                      > >> > Fedora 7 box (display is :1) and just tried it with the
                      > >> > primary X display (:0 login). Same thing! So the -X seems
                      > >> > to not be working over ssh in my setup.
                      > >> >
                      > >> > Performing "apt-get install xbase-clients" and now it works!
                      > >> > I.e., the DISPLAY env variable is being set when doing:
                      > >> > ssh -X user@NSLU2
                      > >> >
                      > >> > I didn't have xterm but previously installed xemacs and that
                      > >> > came up. Not too shabby! Thanks for the missing step!
                      > >> > I assumed that since xemacs depends on x, that at least the
                      > >> > auth agent would have been installed as a dependency, but
                      > >> > clearly xemacs can be run as "xemacs -nw" in which case
                      > >> > it runs in purely VT100-type style w/o any Xwindows features.
                      > >> >
                      > >> > ... time to modify some Wiki's...
                      > >> >
                      > >> >> ...and the window pops up.
                      > >> >>
                      > >> >> It's not even particularly slow. xterm consumes 2780kB of
                      > >> >> real memory on my system; rxvt might be a better better bet,
                      > >> >> at 1620kB. Admittedly, there's not a lot of benefit over
                      > >> >> using a simple ssh shell, but it's perfectly usable.
                      > >> >> (Don't forget that a mere ten years ago, most desktops
                      > >> >> were about the same spec as the NSLU2! *And* they had to
                      > >> >> run the X server at the same time!)
                      > >> >
                      > >> > This is true! That's generally why I would run fvwm or icewm,
                      > >> > because such a small memory footprint. Over a slow link,
                      > >> > X might not be too usable. In that case, you could try -C
                      > >> > for SSH compression. That might not be as good at compression
                      > >> > as something like running a TightVNC server/client with
                      > >> > tight compression.
                      > >> >
                      > >> > Regards,
                      > >> > -Rob
                      > >> >
                      > >
                      > >
                      > >
                    • dhbrandtjr
                      Rob, Thank you so very much for all the detail. I will attempt to follow your directions. From my initial reading, it appears that you have presented a
                      Message 10 of 12 , Aug 28, 2007
                      View Source
                      • 0 Attachment
                        Rob,

                        Thank you so very much for all the detail. I will attempt to follow your
                        directions. From my initial reading, it appears that you have presented a
                        detail explanation of what I need to do to accomplish using a gui on the
                        slug. I really appreciate the time and effort that you took to document the
                        required steps.

                        Don Brandt

                        ==========================================================

                        Rob Lockhart wrote:
                        >
                        > In regards to your question, yes, it is possible to run
                        > some stuff in Xwindows, but I attempted to answer your
                        > initial question... could you run an Xserver from NSLU2.
                        > The answer is yes, and I got that working in NSLU2.
                        > This is not what I would call easy by any means.
                        >
                        > So, assuming a little knowledge of linux and Debian, I'll explain
                        > in a bit of detail how to set up a VNC server on the NSLU2. Note
                        > that I did not install KDE, you have to be really insane to expect
                        > that to run out of RAM, and KDE is known for being a real memory
                        > hog. And VNC is known to be a CPU/network hog (we all know of the
                        > limits of the NSLU2 networking impementations). So, I installed
                        > icewm instead. I also installed fvwm but didn't actually run it.
                        > Root prefixed by "#", mortal user by "$".
                        >
                        > # apt-get install icewm
                        > # apt-get install xfonts-*
                        > (I did the above because I was just too lazy to go through hundreds
                        > of fonts to determine what I needed - and I have a fast connection
                        > and a couple GB free of HD space on / partition).
                        > # apt-get install vncserver
                        > # vi /etc/vnc.conf
                        >
                        > modify it as follows
                        > (below "I don't know what the default is, though." text and other
                        > appropriate places in the file below the commented-out parts)
                        >
                        > $fontPath .= "/usr/share/fonts/X11/100dpi,";
                        > $fontPath .= "/usr/share/fonts/X11/misc/,";
                        > $fontPath .= "/usr/share/fonts/X11/75dpi/,";
                        > $fontPath .= "/usr/share/fonts/X11/Type1/,";
                        > $fontPath .= "/usr/share/fonts/X11/util/";
                        >
                        > $geometry = "1280x1024";
                        >
                        > $depth = "16";
                        >
                        > $getDefaultFrom = "-display localhost:1"
                        >
                        > save the file, and continue below
                        >
                        > $ vncpasswd
                        > (choose something - blank passwords not recommended)
                        >
                        > $ vi ~/.vnc/xstartup
                        > and add the contents below (left in RedHat for credit):
                        >
                        > #!/bin/sh
                        > # Red Hat Linux VNC session startup script
                        > #exec /etc/X11/xinit/xinitrc
                        > #exec /usr/X11R6/bin/twm
                        > #exec /usr/X11R6/bin/fvwm2
                        > exec /usr/X11R6/bin/icewm
                        > #exec /usr/bin/icewm-session
                        >
                        > Save it, and then type:
                        > $ vncserver
                        >
                        > It will take about a minute, but it finally comes up and,
                        > according to running "top", cycling every 10sec, the CPU load
                        > settles down to 10-20%. I then connected to it with UltraVNC
                        > (since it supports RealVNC, TightVNC and UltraVNC protocols).
                        > If it works, you'll be prompted for the password you chose
                        > above. Connect to "your_NSLU2_IPaddress:1". It should
                        > connect, and then the NSLU2 will take a bit of time to
                        > implement the desktop manager.
                        >
                        > Just moving the mouse around, you'll see how much loading on
                        > the CPU there is. But it does work!
                        >
                        > Since I've already "mucked" my system up, maybe someone could
                        > verify my steps above and then yet another Wiki addition.
                        > But with disclaimers - do not try this unless you're prepared
                        > for the slowness. :-)
                        >
                        > Note that this wasn't even over SSH. I cannot imagine how
                        > slow that would be then. Backups over SSH/rsync see about
                        > 30-50% of the performance of direct NFS, so I assume the
                        > same with VNC over SSH.
                        >
                        > To do it over SSH, VNC uses port 5901 and above. So you
                        > would connect via SSH as follows:
                        >
                        > ssh -X -L 5901:localhost:5901 user@NSLU2
                        > then, once connected via SSH, open a VNC client, then
                        > connect to "localhost:1". Sometimes MS-Windows can be
                        > a pain about localhost, so if that doesn't work, try
                        > something clever like 127.0.0.2:1 instead. This is needed
                        > for RDC over SSH, at least, for WinXP.
                        >
                        > As a side note, I am running with 64MB detected by kernel
                        > (256MB actual, but due to some kernel bugs, I think, and/or
                        > perhaps some issues with memory init with Apex, I forced it
                        > to 64MB). Even with 64MB, and just one xterm, I was running
                        > 10MB out of swap. I only have an NFS client, samba, sshd and
                        > other essentials running, no http, media, etc. servers. So
                        > those of you with only 32MB, it may actually run much slower
                        > than my setup. Would be nice if I could get all 256MB to
                        > work (but my NSLU2 is my main backup server and pretty much
                        > always in use).
                        >
                        > Regards,
                        > -Rob
                        >
                        >
                        > ----- Original Message -----
                        > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                        > Date: Sun, August 26, 2007 21:03
                        > From: "dhbrandtjr" <dhbrandtjr@...>
                        >
                        >> Rob,
                        >>
                        >> Thank you for your detailed instructions. I will give attempt to follow
                        >> your directions to get my system to work. From your comments, it appears
                        >> that you were able to accomplish what I am attempting to do. Assuming
                        >> that
                        >> is correct, how was performance? Could you running X applications on the
                        >> slug and display the corresponding results within a windows window?
                        >>
                        >> Don
                        >>
                        >> --------------------------------------------------------------------------------------------
                        >>
                        >>
                        >> Rob Lockhart wrote:
                        >> >
                        >> > Don, it seems you already have xauth installed. You could
                        >> > delete .Xauthority and it'll get re-created:
                        >> >
                        >> > [rob@NSLU2:] rm ~/.Xauthority
                        >> >
                        >> > (disconnect)
                        >> >
                        >> > SSH into NSLU2:
                        >> >
                        >> > [user@linux ~]$ slogin -X NSLU2
                        >> > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                        >> > /usr/bin/X11/xauth: creating new authority file /home/user/.Xauthority
                        >> >
                        >> > If you wanted to be real cheap (and smart!) you could just install
                        >> Cygwin
                        >> > http://www.cygwin.com and install everything. Now, you'll have an icon
                        >> > called "Singular CAS" with some note about Starting X server. Run
                        >> that.
                        >> > Now there should be a big "X" in your lower right taskbar for WinXP.
                        >> >
                        >> > Now, open up a Cygwin shell, and make sure DISPLAY variable is set.
                        >> > I had to set mine manually:
                        >> > export DISPLAY=localhost:0.0
                        >> > I also noticed an xauth data error:
                        >> > "Warning: No xauth data; using fake authentication data for X11
                        >> > forwarding."
                        >> > so I ran "xauth" from cygwin shell:
                        >> >
                        >> > $ xauth.exe
                        >> > xauth: creating new authority file /home/Rob/.Xauthority
                        >> > Using authority file /home/Rob/.Xauthority
                        >> > xauth> quit
                        >> >
                        >> > $ ssh -X user@NSLU2
                        >> > user@nslu2's password:
                        >> > Linux NSLU2 2.6.18-4-ixp4xx #1 Sun Apr 22 08:34:11 UTC 2007 armv5tel
                        >> >
                        >> > user@NSLU2:~$ printenv DISPLAY
                        >> > localhost:10.0
                        >> > user@NSLU2:~$ xeyes
                        >> >
                        >> > and then I see eyes following my mouse cursor.
                        >> >
                        >> > If this is not working, could it be some kind of firewall issue?
                        >> > I got a bunch of warnings about accepting connections from xauth.exe
                        >> > ssh, bash.exe, etc.
                        >> >
                        >> > HTH,
                        >> > -Rob
                        >> >
                        >> > ----- Original Message -----
                        >> > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                        >> > Date: Sun, August 26, 2007 15:08
                        >> > From: "dhbrandtjr" <dhbrandtjr@...>
                        >> >
                        >> >> Rob,
                        >> >>
                        >> >> When I "apt-get install xbase-clients" on my slug, I received the
                        >> >> following
                        >> >> message:
                        >> >>
                        >> >> xbase-clients is already the newest version
                        >> >>
                        >> >> From that I assume that xbase-clients is already installed.
                        >> >>
                        >> >> Have you any other suggestions?
                        >> >>
                        >> >> Thanks,
                        >> >>
                        >> >> Don
                        >> >>
                        >> >>
                        >> ----------------------------------------------------------------------------------------------------
                        >> >>
                        >> >> Rob Lockhart wrote:
                        >> >> >
                        >> >> > ----- Original Message -----
                        >> >> > Subject: Re: [nslu2-linux] How to you run xterm on a (debian) slug?
                        >> >> > Date: Sat, August 25, 2007 17:37
                        >> >> > From: "David Given" <dg@...>
                        >> >> >
                        >> >> >> Rob Lockhart wrote:
                        >> >> >>
                        >> >> >> (Rob, your mailer is configured for HTML and is producing a
                        >> >> >> mangled plain text version with, apart from anything else,
                        >> >> >> no quoting. You may want to look at the setup...)
                        >> >> >
                        >> >> > Switched to plaintext. It didn't show being mangled on my web
                        >> >> > email client, but this is a big list and surely on some client
                        >> >> > it would have been mangled.
                        >> >> >
                        >> >> >> [...]
                        >> >> >> > export DISPLAY=localhost:0.0
                        >> >> >> > xterm &amp;amp;amp;
                        >> >> >>
                        >> >> >> This probably won't work.
                        >> >> >>
                        >> >> >> ssh -X doesn't listen on display 0 --- it usually starts at 10
                        >> >> >> and works up. It also sets the DISPLAY variable itself, and if
                        >> >> >> it doesn't get set, that probably means X forwarding isn't
                        >> >> >> turned on and setting it manually wouldn't work anyway.
                        >> >> >
                        >> >> > Yes, this is clear. My instructions were meant for starting
                        >> >> > at the client (NOT the NSLU2), getting it working locally then
                        >> >> > moving to NSLU2. I couldn't get it working on NSLU2 so I
                        >> >> > couldn't complete my instructions. The
                        >> >> > "usually starts at 10 and works up"
                        >> >> > is the config setting in /etc/ssh/sshd_config :
                        >> >> >
                        >> >> > X11Forwarding yes
                        >> >> > X11DisplayOffset 10
                        >> >> >
                        >> >> > My point was to
                        >> >> > 1) get X working locally, and
                        >> >> > 2) *then* try to get it working with the NSLU2.
                        >> >> >
                        >> >> >> Just to clarify: to make X forwarding work, you need:
                        >> >> >>
                        >> >> >> 1) an X server on your local machine
                        >> >> >> 2) access to the X server from your ssh client (running it
                        >> >> >> in an xterm works)
                        >> >> >> 3) you need to connect to the NSLU2 with ssh -X
                        >> >> >> (you must specify -X or it won't work; you may be able to
                        >> >> >> get around this by changing one of ssh's many obscure
                        >> >> >> scary configuration files)
                        >> >> >> 4) you need xauth installed on the NSLU2 (it's in the
                        >> >> >> xbase-clients Debian package)
                        >> >> >> 5) then it just works.
                        >> >> >>
                        >> >> >> e.g:
                        >> >> >>
                        >> >> >> dg@pyanfar:~$ xauth
                        >> >> >> xauth: creating new authority file /home/dg/.Xauthority
                        >> >> >> Using authority file /home/dg/.Xauthority
                        >> >> >> xauth> dg@pyanfar:~$ logout
                        >> >> >> Connection to pyanfar closed.
                        >> >> >> dg@hilfy:~$ ssh -X pyanfar
                        >> >> >> dg@pyanfar's password:
                        >> >> >> /usr/X11R6/bin/xauth: creating new authority file
                        >> >> /home/dg/.Xauthority
                        >> >> >> dg@pyanfar:~$ xterm &amp;
                        >> >> >> dg@pyanfar:~$
                        >> >> >
                        >> >> > Note that what my email was saying is that in my setup, even with
                        >> >> >
                        >> >> > ssh -X user@NSLU2_IP_ADDRESS
                        >> >> >
                        >> >> > I would login, and yet the NSLU2 DISPLAY env variable was not
                        >> >> > being set (in fact, with "-v" for verbosity, it said it couldn't
                        >> >> > set up the port forwarding). I've used ssh over X for years
                        >> >> > but certainly not with the NSLU2. It appears that in my
                        >> >> > case, even using -X doesn't forward the X11 display from
                        >> >> > NSLU2 back to the host. I even tried
                        >> >> > "ssh -L 6001:localhost:6001 user@NSLU@" but ssh complained
                        >> >> > that it couldn't forward that port (this was within VNC).
                        >> >> > I originally tried this with a VNC window onto my
                        >> >> > Fedora 7 box (display is :1) and just tried it with the
                        >> >> > primary X display (:0 login). Same thing! So the -X seems
                        >> >> > to not be working over ssh in my setup.
                        >> >> >
                        >> >> > Performing "apt-get install xbase-clients" and now it works!
                        >> >> > I.e., the DISPLAY env variable is being set when doing:
                        >> >> > ssh -X user@NSLU2
                        >> >> >
                        >> >> > I didn't have xterm but previously installed xemacs and that
                        >> >> > came up. Not too shabby! Thanks for the missing step!
                        >> >> > I assumed that since xemacs depends on x, that at least the
                        >> >> > auth agent would have been installed as a dependency, but
                        >> >> > clearly xemacs can be run as "xemacs -nw" in which case
                        >> >> > it runs in purely VT100-type style w/o any Xwindows features.
                        >> >> >
                        >> >> > ... time to modify some Wiki's...
                        >> >> >
                        >> >> >> ...and the window pops up.
                        >> >> >>
                        >> >> >> It's not even particularly slow. xterm consumes 2780kB of
                        >> >> >> real memory on my system; rxvt might be a better better bet,
                        >> >> >> at 1620kB. Admittedly, there's not a lot of benefit over
                        >> >> >> using a simple ssh shell, but it's perfectly usable.
                        >> >> >> (Don't forget that a mere ten years ago, most desktops
                        >> >> >> were about the same spec as the NSLU2! *And* they had to
                        >> >> >> run the X server at the same time!)
                        >> >> >
                        >> >> > This is true! That's generally why I would run fvwm or icewm,
                        >> >> > because such a small memory footprint. Over a slow link,
                        >> >> > X might not be too usable. In that case, you could try -C
                        >> >> > for SSH compression. That might not be as good at compression
                        >> >> > as something like running a TightVNC server/client with
                        >> >> > tight compression.
                        >> >> >
                        >> >> > Regards,
                        >> >> > -Rob
                        >> >> >
                        >> >
                        >> >
                        >> >
                        >
                        >
                        >

                        --
                        View this message in context: http://www.nabble.com/How-to-you-run-xterm-on-a-%28debian%29-slug--tf4328854.html#a12363681
                        Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
                      Your message has been successfully submitted and would be delivered to recipients shortly.