Results 1 to 7 of 7

Thread: X Redirect

  1. #1
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    20,200

    Default X Redirect

    I've been playing around with Xming, and trying to redirect X11 from the Untangle server to my desktop. My ultimate goal is to get the kiosk X console to render to my windows station.

    So step one is to get Xming and install it.

    http://sourceforge.net/projects/xming/files/

    You have to download it from the sourceforge.net site, as they've password protected access off the project's primary web server.

    After that you just need putty, and an open SSH port to your Untangle server.

    Now to configure the X server, run XLaunch.

    1.) Select the One Window without titlebar option, leave display number at 0, click next
    -Note: I actually prefer the One Window option, however I've had intermittent issues with the window eating 100% of the desktop space even when I've forced it into a smaller window.
    2.) Select Start no Client, click next
    3.) In the additional Parameters for Xming input this "-screen 0 1024x768"
    -Note: Remember the screen number from step one? That's the zero, the rest can be whatever size you want your window to be. Click next, then finished.

    At this point you should have a 1024x768 window with the X grey hash background on it. If you need to move it to a new location, right click on the Xming :0.0 item in the task tray, select move, and tap one of the cursor keys on your keyboard. At this point you can move the window around and choose a final destination with a single click.

    Now, fire up putty.

    In the connection category, expand SSH and select the X11 tree item. Tick the box that says Enable X11 Forwarding, and fill 127.0.0.1 into the box. Go back up to the Session Category, fill in the IP address of your Untangle server and log in normally.

    Verify your X is redirected with this command

    echo $DISPLAY

    It should report something like localhost:10.0

    You can test your graphical window by running this command.

    xclock

    You should see the cursor in your putty session go inactive, and a clock appear in the graphical window.

    A useful command at this point is...

    wireshark

    Having a root enabled copy of wireshark running on your Untangle server, but rendering on your desktop. Handy to say the least.

    The part I'm having trouble with is kiosk's X environment. I can run the startxfce4 at the root prompt and get a generic xfce4 session to render. However, if I su - kiosk and run the command there I get an error.

    a quick echo $DISPLAY after running su shows that the display variable is incorrect. That's easy enough to fix with a quick change to the environment variable. export DISPLAY=localhost:10.0

    Now we get an xauth error when we try and run xclock.

    http://froebe.net/blog/2008/11/14/ge...ve-the-answer/

    That link contains details on how to import the magic cookie from the root account to the kiosk account. After that is done, I can run xclock, wireshark, and many other X applications as kiosk. However, startxfce4 simply doesn't work. No real errors, not beyond what it spews when run as root, but it doesn't render either.

    Seems I need to bone up on my X some more. Being able to redirect the X console would have many positive applications. Not the least of which would be clean screen shots of the console, and potentially a way to bundle xming and putty together with some basic configuration scripts to act as a remote administration package. Freeing the Untangle server from needing to render a graphical configuration screen at all.

    Anyone else have some experience with X have any insite as to how to get that kiosk X environment to render? It would be trivial to get it working if I could log into the kiosk account directly. But, I'm loath to forcibly reset the password on that account so I can login with it... I have no idea what that would do to an Untangle installation. The last thing we need is the local console to stop working because we reset a password.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  2. #2
    Untangle Ninja mrunkel's Avatar
    Join Date
    Jul 2008
    Posts
    3,041

    Default

    I don't think you're going to be able to get the full desktop to work since randr most likely isn't supported on your X windows server.

    If it is, you can just "source /home/kiosk/.xsession" after you log in as root.

    In any case, most of the functionality should be there by just running iceweasel (aka firefox).

    All the commands for the kiosk can be found in /home/kiosk/utils/..

    Of course, X is pretty painfully slow over the Internet. Maybe I should file a bug to support nxclient and server.
    m.


    Big Frickin Disclaimer:
    While I'm pretty sure, I can't guarantee that I know what I'm doing. There might be a better way to do this, and this way might actually suck. Make sure you understand the implications of what you're doing before trying to follow these directions.

    It often helps troubleshooting if you have a good network map. Look here if you want my advice on how to draw one.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  3. #3
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    20,200

    Default

    It isn't meant to go over the Internet. If I want to go that far I'll just wrap the Untangle server in ESXi, or use an IP-KVM. XMing has randr support, not sure what version...

    That source command does indeed work. I get an Untangle branded X environment. However, the command bar isn't what appears on the console. It appears more normal to xfce4, has a clock and a task tray. See the attached screenshot for a better view.

    Also, as soon as this command is run, the command bar on the actual console vanishes... forcing me to use ctrl+alt+backspace to kill the X server and reload it.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  4. #4
    Untangle Ninja mrunkel's Avatar
    Join Date
    Jul 2008
    Posts
    3,041

    Default

    Hrm. Yeah, that's because you're running as root, not kiosk.

    You can try
    su - kiosk -c 'source /home/kiosk/.xsession'

    But I think you'll have permissions issues when doing that.

    Sorry, without trying a bunch of stuff I've exhausted my ideas.
    m.


    Big Frickin Disclaimer:
    While I'm pretty sure, I can't guarantee that I know what I'm doing. There might be a better way to do this, and this way might actually suck. Make sure you understand the implications of what you're doing before trying to follow these directions.

    It often helps troubleshooting if you have a good network map. Look here if you want my advice on how to draw one.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  5. #5
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    20,200

    Default

    Hmm I'll give that a try a bit later. I figure if anything else I have a way of using the wireshark on the Untangle from the convenience of my laptop / desktop. Most of my Untangle consoles are a bit hard to get to.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  6. #6
    Untangler
    Join Date
    May 2009
    Posts
    53

    Default

    I'm just like you i have the display just like ypu, but instead of use 127.0.0.1 i use the local ip address of my pc, and i have no errors in the clock or others apps.

    The Untangle Kiosk is started fine, but as compositing is not supported in remote display it will not show the kiosk buttons. (so bad)

    If you save all session starting the script of the kios, you can start the remote session with only one click. this is nice!.

    THe only features in my mind for what you need this is for sniffing.

  7. #7
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    20,200

    Default

    Yeah that's all I've used it for really, as a way to run Wireshark's GUI on my desktop while it sniffs the UT server.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

Posting Permissions

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

SEO by vBSEO 3.6.0 PL2