Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-10-2013, 03:42 PM   #1
LQ Newbie
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Redirecting program display to XRDP session

Hi there. Wasn't 100% sure where the proper place would be to post this. Seems to me like a beginners question, mostly because I'm not entirely sure of the terminology used. A disclaimer right at the top(ish) since as I wrote this out I realized this may grab someone's attention... yes I'm using root, and yes the end-user is using root; I understand the risks.

I have a Ubuntu server (12.04 LTS) running at a remote site, connected by WAN. I started with SSH access, and as the needs evolved, I ended up needing a graphical display. So I installed ubuntu-desktop, xrdp, x window manager, and gnome-session-fallback (as a suggested fix for a problem I was having getting xrdp working correctly).

I'm able to connect now and connect via Microsoft RDP from a windows station to the Ubuntu server. There may be instances where the end-user at that site using this server will need to run applications locally on this server. This end-user however is not a linux user, and so -finding- the program that they need to run may sometimes be an issue.

I was hoping there was a way for me to SSH into the server, and run a program, pointing it to the Xvnc session open so that the end user logged in via RDP would have it just show up on their screen:
root@sanitized:/# ps aux | grep Xv
root 16331 0.0 0.9 25684 19856 ? S 08:31 0:10 Xvnc :10 -geometry 1680x1050 -depth 16 -rfbauth /root/.vnc/sesman_root_passwd -bs -ac -nolisten tcp

A google search mentioned changing the display variable, and had several commands, but I was hoping I could build an understanding rather than just copy and paste into SSH.

I may be completely off-the-ball on this one, but I do see /proc/10 exists... but I'm not sure where to go from there.

I also saw using ssh -X or ssh -Y, but I'm not sure if that works with an xrdp session?

I see that /proc refers to the PID of a process now. In my case, that would mean I would want /proc/16331 right?

Last edited by ErikTheAngry; 04-10-2013 at 03:49 PM.
Old 04-10-2013, 05:08 PM   #2
LQ Newbie
Registered: Apr 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
User ended up being done with it sooner than anticipated, gave me some time to test things out.

It seems this works... though if someone more familiar with the topic could enlighten me as to the risks of running xhost + (I've read a comment that it is bad form?) to disable the X11 Forwarding ACLs I'd appreciate it.

The entire process, from my SSH session, was this:

ps aux | grep Xv

I was able to get the output as described in my OP. The :10 was the display variable.

I ran xhosts +, and then export DISPLAY= to set the display variable to the Xvnc session. I also confirmed that X11Forwarding was set to yes and X11DisplayOffset was set to 10 within /etc/ssh/sshd_config

I am now able to do something like /usr/bin/firefox and have it launch on the RDP/Xvnc/pickyourname session.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Redirecting console output from a Qt application to a telnet session bameije Linux - Embedded & Single-board computer 4 01-21-2011 10:32 AM
redirecting video output to OLED display ravi_chobey Linux - Embedded & Single-board computer 1 12-27-2009 11:06 AM
Redirecting(Stealing?) X11 Display debuser123 Linux - Desktop 2 12-12-2006 06:05 PM
php: session variables lost while redirecting appas Programming 2 10-13-2004 10:18 AM
how to redirecting the standard output in program phil123 Linux - General 3 02-23-2004 01:02 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration