Re: remote Xorg login (555 Views)
Reply
Regular Advisor
monu_1
Posts: 149
Registered: ‎10-08-2006
Message 1 of 14 (556 Views)
Accepted Solution

remote Xorg login

Hi all,
I am using Fedora core6 and I am accessing this machine via windows2k through putty(ssh console login) application.
now i want x-desktop login.
is it possible to remote graphical login (where windows2k is running)?
if yes plz suggest how we can?

Thanks in advance
MKS
Honored Contributor
Oviwan
Posts: 692
Registered: ‎11-29-2005
Message 2 of 14 (556 Views)

Re: remote Xorg login

Hey

Check VNC, i always use this:
http://www.realvnc.com/

Regards
Honored Contributor
spex
Posts: 1,367
Registered: ‎05-14-1996
Message 3 of 14 (556 Views)

Re: remote Xorg login

Hello,

It is possible, but first you will have to install an X-Server Server on your W2k machine. Choices include Xming, Cygwin/X, and Exceed, among others.

Then go to PuTTY Configuration->SSH->X11 and check "Enable X11 forwarding" and enter "localhost:0" for "X display location".

You may also have to add your client to the /etc/X*.hosts database on your server via the 'xhost' command.

http://freedesktop.org/wiki/Xming
http://x.cygwin.com/
http://www.hummingbird.com/products/nc/exceed/index.html

PCS
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 4 of 14 (556 Views)

Re: remote Xorg login

Shalom,

ssh -X hostname command

Works for me. There is probably a way to make this work from a windows host.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Regular Advisor
monu_1
Posts: 149
Registered: ‎10-08-2006
Message 5 of 14 (556 Views)

Re: remote Xorg login

Hi Spex,

I have dwnload Xming-6-9-0-23-setup.exe but its showing me on installation that require Window NT 5.01 or later. I m not understanding why it is asking?

But when i use it on window xp it has been installed but according your instruction it is not working .
plz specified more and give me a link where i can dwnload right version which support win2k.

Thank you
MKS
Respected Contributor
Rick Retterer
Posts: 156
Registered: ‎04-30-2003
Message 6 of 14 (556 Views)

Re: remote Xorg login

The current version of Xming (XCygwin) can be found @

http://sourceforge.net/projects/xming

Which should support W2k -thru- Vista

Follow the Installation Guide and RElease notes completely in order to set it up correctly.

Personally, I like to use VNC on both my W2k system and Fedora Core6... Works great and easy to use.

Cheers!
Rick Retterer
- Rick Retterer



Regular Advisor
Geert Van Pamel
Posts: 126
Registered: ‎12-31-2002
Message 7 of 14 (556 Views)

Re: remote Xorg login

Why don't you install a "Remote Desktop Server" on Linux, compatible with your Windows built-in Remote Desktop client.

Advantage: you do not have to install anything at all on your Windows machine, so you do not pay any license at all.

5 minutes to install.
xrdp is built on top of vnc

Prerequisites: first install openssl-devel and pam-devel

Download xrdp-0.4.0.tar.gz or later from http://xrdp.sourceforge.net

Compile:

cd

cd src

gzip -dc xrdp-0.4.0.tar.gz |tar -xf -

cd xrdp-0.4.0

make



Install:

su

make install


cd /etc/init.d

ln -s /usr/local/xrdp/xrdp_control.sh xrdp

cd /etc/init.d/rc5.d

ln -s ../init.d/xrdp S15xrdp

service xrdp start


You can also do the opposite: if you are logged in on Linux and you want to see your remote Windows desktop, just do:

ipconfig (to get the IP address of your Windows machine)

rdesktop -f 45.x.x.x
Regular Advisor
monu_1
Posts: 149
Registered: ‎10-08-2006
Message 8 of 14 (556 Views)

Re: remote Xorg login

Hi Geert,

Thanks,

I m getting following error report.

#service xrdp start
starting xrdp
df: `': No such file or directory
df: `': No such file or directory
/usr/bin/startkde: line 29: [: -lt: unary operator expected
xsetroot: unable to open display ''
Error: Can't open display:
/usr/bin/startkde: line 124: /.kde/share/config/startupconfig: No such file or directory

and also as u define above /etc/init.d/rc5.d but here it is in /etc/rc.d/rc5.d/ not init.d directory

Plz suggest where is the probs.

Thx,
MKS
Regular Advisor
Geert Van Pamel
Posts: 126
Registered: ‎12-31-2002
Message 9 of 14 (556 Views)

Re: remote Xorg login

Sorry, the above startup scheme was for SuSE.

For Red Hat or Fedora distributions, the correct startup is as follows:

First determine the default run level:

grep default /etc/inittab
...
id:3:initdefault:

If the run level is 3, then:
cd /etc/rc3.d

If the run level is 5, then:
cd /etc/rc5.d

ln -s ../init.d/xrdp S15xrdp

If KDE is not starting properly, as on your system, you could try the following:

vi /usr/local/xrdp/startwm
...
twm&
xterm
exit 0

If needed, stop and start xrdp

service xrdp stop

service xrdp start

Now start again the "Remote desktop client" on Windows XP, and login again... you should see at least an X-terminal

You could try as well with Gnome.

If your X-Windows display is not correctly created, then there is propably something wrong with Xvnc

Check if the following processes run:

ps -ef |grep vnc
geertvp 27692 27690 0 22:37 pts/0 00:00:01 Xvnc :10 -geometry 1280x800 -dep

ps -ef |grep sesman
root 27673 1 0 22:36 pts/0 00:00:00 ./sesman

ps -ef |grep xrdp
root 27671 1 0 22:36 pts/0 00:00:01 ./xrdp

Hope it works now?
Regular Advisor
monu_1
Posts: 149
Registered: ‎10-08-2006
Message 10 of 14 (556 Views)

Re: remote Xorg login

hi,
its not working.The result is as follows

#twm
_X11TransSocketINETConnect() can't get address for localhost:6003: Name or service not known
twm: unable to open display ":0.0"

# ps -ef |grep vnc
root 2662 2202 0 16:19 pts/2 00:00:00 grep vnc

#ps -ef |grep sesman
root 2665 2202 0 16:20 pts/2 00:00:00 grep sesman

#ps -ef |grep xrdp
root 2668 2202 0 16:21 pts/2 00:00:00 grep xrdp

# service xrdp start
starting xrdp
df: `': No such file or directory
df: `': No such file or directory
/usr/bin/startkde: line 29: [: -lt: unary operator expected
xsetroot: unable to open display ''
Error: Can't open display:
/usr/bin/startkde: line 124: /.kde/share/config/startupconfig: No such file or directory

I could not getting exactly where is the problem?is there any DISPLAY setting probs or KDE settings?

Plz suggest!

Thx,
MKS
Regular Advisor
Geert Van Pamel
Posts: 126
Registered: ‎12-31-2002
Message 11 of 14 (555 Views)

Re: remote Xorg login

You should *not* manually execute twm, it is run automatically from /usr/local/xrdp/startwm.sh when accessing the system from the "Remote Desktop Client".

Make sure that openssl-devel and pam-devel is installed. You should install versions compatible with your OS.

rpm -qa > /tmp/installed.txt

grep openssl-devel /tmp/installed.txt
...
openssl-devel-0.9.6b-29

grep pam-devel /tmp/installed.txt
...
pam-devel-0.75-40


Make sure that xrdp and Xvnc is properly installed, and running:

ls /usr/local/xrdp
ad256.bmp cursor1.cur libscp.so libxrdp.so sesman sesrun sestest Tahoma-10.fv1 xrdp256.bmp
cursor0.cur librdp.so libvnc.so libxup.so sesman.log sessvc startwm.sh xrdp xrdp_control.sh

Check that xrdp_control.sh and startwm.sh is available in the above directory.

Check that xrdp is a symbolic link in the /etc/init.d directory

ls -ld /etc/init.d/xrdp
lrwxrwxrwx 1 root root 31 Jun 24 10:20 /etc/init.d/xrdp -> /usr/local/xrdp/xrdp_control.sh

You should see the following menu when typing the command "service xrdp"

service xrdp
Usage: xrdp_control.sh {start|stop|restart|force-reload}

which Xvnc
/usr/bin/Xvnc

ps -ef |grep Xvnc
geertvp 27692 27690 0 Aug11 ? 00:00:01 Xvnc :10 -geometry 1280x800 -dep

Display :10 corresponds to 6000 + 10 = TCP port 6010, 6000 being the base X port number

grep 6000 /etc/services
x11 6000/tcp X # the X Window System

Terminal services should run:

nmap localhost
...
3389/tcp open ms-term-serv

netstat -l
...
tcp 0 0 *:x11-ssh-offset *:* LISTEN
tcp 0 0 *:3389 *:* LISTEN

netstat -ln
...
tcp 0 0 0.0.0.0:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN

Edit the file /usr/local/xrdp/startwm and put the following commands at the top of the script:

twm&
xterm
exit 0

From the above and your last remark, I conclude that the xrdp startup script does not run correctly, and that possibly there is a problem with the Xvnc installation.

Please also verify the protection of all above mentioned files and directories.

Another problem that can block access is a local firewall.

Are you sure that KDE is correctly installed?? Try with Gnome, or with other options in the shell script /usr/local/xrdp/startwm.sh

You can also enable error logging for "xrdp start" troubleshooting:

vi /usr/local/xrdp/xrdp_control.sh
[old]
LOG=/dev/null
[new]
LOG=/tmp/xrdp.log
...
xrdp_start()
{
echo -n "Starting: xrdp and sesman . . "
./$XRDP >> $LOG
./$SESMAN >> $LOG
echo "."
sleep 1
return 0;
}

Then start xrdp again, and verify the log file:

service xrdp start

cat /tmp/xrdp.log

When everything works ok, you should see the display on the xterm terminal session:

echo $DISPLAY
:10.0

(could, and will certainly be another number on your system)
Regular Advisor
monu_1
Posts: 149
Registered: ‎10-08-2006
Message 12 of 14 (555 Views)

Re: remote Xorg login

Thanks a lot.
Its working now but not displaying as same as of my server desktop.
Its dispaly TWM Icon Manager, VNC Config and terminal only.
is there any setting in configuration(resolution setting) to dispaly proper desktop?

Thanks,
MKS
Regular Advisor
Geert Van Pamel
Posts: 126
Registered: ‎12-31-2002
Message 13 of 14 (555 Views)

Re: remote Xorg login

We are sure now that you have a working X-display and that xterm creates a virtual terminal. This proves that the basic functionality of Remote Desktop Server works.

Now you can try to edit the file /usr/local/xrdp/startwm.sh again and put one of the following commands at the top of the script (depending on whether you installed Gnome or KDE)

gnome-session
exit 0

kde
exit 0

startkde
exit 0
Occasional Visitor
Rick Blalock
Posts: 1
Registered: ‎08-30-2007
Message 14 of 14 (555 Views)

Re: remote Xorg login

I'm trying to accomplish this very thing myself, but my machine is running Slackware 12 and as far as I can see, pam-devel and openssl-devel are only available in RPM packages. Is there a way to install an RPM on a Slack machine?
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.