LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 03-01-2007, 10:47 PM   #1
kavius
Member
 
Registered: Feb 2003
Location: Halifax, NS, CAN
Distribution: Ubuntu
Posts: 71

Rep: Reputation: 16
xming, plink, and startkde not working


I hate asking, but I think I've read every tutorial online and they all seem to assume I know things I don't. I got a little further after reading posts on here, but I'm not quite there yet.

I have a linux box at home, and a windows laptop. I want to be able to log into the kde desktop from the laptop. I have XMing and putty installed. I am able to connect using xdmc from inside my home network, but I want to be able to connect via SSH from outside.

Unfortunately, I haven't been able to get an app to run via SSH yet. THis is what I've tried and the error message:
Quote:
> Xming.exe :0 -clipboard -nodecoration
> plink.exe -X -l root -pw <pass> <ip> /opt/kde/bin/startkde
/opt/kde/bin/startkde: line 22: xsetroot: command not found
/opt/kde/bin/startkde: line 144: xset: command not found
/opt/kde/bin/startkde: line 154: xsetroot: command not found
startkde: Starting up...
ksplash: cannot connect to X server
kdeinit: Aborting. $DISPLAY is not set.
Warning: connect() failed: : No such file or directory
ksmserver: cannot connect to X server
startkde: Shutting down...
Warning: connect() failed: : No such file or directory
Error: Can't contact kdeinit!
startkde: Running shutdown scripts...
startkde: Done.
Is someone able to shed some light on this one? It sure doesn't make sense to me.

Last edited by kavius; 03-02-2007 at 10:23 AM. Reason: Possibly unclear portion of plink command
 
Old 03-01-2007, 10:59 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
If you've got a ssh and X capable livecd hanging around, try booting with that and try ssh -X to see if Windows is a factor here.
 
Old 03-02-2007, 11:35 PM   #3
kavius
Member
 
Registered: Feb 2003
Location: Halifax, NS, CAN
Distribution: Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 16
Nope. Looks like the issue is on the desktop side.

I got myself a knoppix cd and tried "ssh -X -l root <ip>". Once logged in I tried firing up xclock. After that I echoed "$DISPLAY", I don't get the results. Isn't there supposed to be a little more there? Like a display?
Quote:
root@odin:~# xclock &
[1] 8081
Error: Can't open display:
root@odin:~# echo $DISPLAY

[1]+ Exit 1 xclock
 
Old 03-03-2007, 12:42 AM   #4
kavius
Member
 
Registered: Feb 2003
Location: Halifax, NS, CAN
Distribution: Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 16
Alright... It keeps complaining about the display, and when I echo $DISPLAY I'm not getting as much information as I am expecting (based on tutorials I have read). So I ran a search on one of the lines of error message I was receiving:

Aborting. $DISPLAY is not set.

This turns up a website that tells you how to set the display variable. The only problem is I think I'm setting it to the wrong value. I set it to 127.0.0.1 but that doesn't seem to be better.
Quote:
http://infocenter.sybase.com/help/in...stalllnx91.htm

DISPLAY environment variable not set correctly
This error message means that the DISPLAY environment variable on the remote machine is not set correctly to display the Installer to your local machine:
The DISPLAY environment variable is not set correctly.

To correct the problem, enter the following command at the UNIX prompt of the remote machine, where host_name is the name of the machine on which you want the Installer to appear (that is, on your local machine): For C shell:
setenv DISPLAY host_name:0.0

For Bourne shell:
DISPLAY=host_name:0.0; export DISPLAY
If I'm behind a router, does that mean it needs the router's address and the router needs port forwarding? That doesn't seem quite right to me.
 
Old 03-08-2007, 12:49 PM   #5
kavius
Member
 
Registered: Feb 2003
Location: Halifax, NS, CAN
Distribution: Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 16
Lightbulb Solved

Ignore everything written before. This was a case of stupidity on my part. It helps if you turn on your service. This was a case of crossing my 'I's and dotting my 'T's.

I had made the mistake of editing SSH_Config on my remote machine, I needed to edit SSHD_config on the remote machine.

SSH should make a local loopback connection for the X11 Display. If you are logging in via SSH and you echo $DISPLAY, and it is empty, triply/quadruple check your SSHD config file and make sure you have turned on X11Forwarding. Since this was my mistake, I'll say it again, Edit your SSHD, not your SSH config file.

The other thing to note is that SSH clients have verbose modes. If you are having problems, turn on verbose mode. That's what really clued me in. I turned on verbose on plink (-v) and received a message that indicated that SSHD was actively refusing to forward X11. That prompted me to check SSHD again (exactly where the problem was).

FYI for the uninitiated:
I ran kde from my home machine while sitting at a buddies house, extremely slow and flooded his connection. I was quickly reminded that you have to cut things down if you are going to run across a network. I've have a couple of things I want to experiment with on this subject:

1. Compression http://www.paulandlesley.org/faqs/LBX-HOWTO.html
- LBX: I think I will try to use this as it is part of the X spec
- SSH: compression, but may not be as good as LBX
may be worth it just because I noticed the
terminal was running a little slow
- DXPC: haven't looked at it at all
2. Other WM
- KDE is a hog something else (blackbox/fluxbox?)
may give better performance
3. KDE Desktop stripped down
- I am wondering what kind of performance increase
I can get just by turning down all of the effects
given by KDE

THis makes me wonder if I can write a script for letting X know how I want it to run that depends on whether I am remote or local. Locally, I want all the flashy memory hog stuff, but remotely I don't want to wait 20 minutes for a window to load.
 
Old 07-18-2008, 10:48 AM   #6
kavius
Member
 
Registered: Feb 2003
Location: Halifax, NS, CAN
Distribution: Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 16
Post Distinguishing Remote and Local Connections

In order to reduce bandwidth, but maintain convenience, I have two configurations for X on the linux computer: one for remote connections and one for local. The trick is to have the machine determine which one its supposed to be using.

While originally I did this so I could connect from my windows computer at work, I have used similar techniques for my girlfriend's (and her daughter's) EEE.

On the Remote machine, create a script in the user's home folder called "RemoteX":
Quote:
# kicker --config ~/.config/remotekickerrc
xfce4-panel
On the Local machine, create a batch file... wherever you want:
Quote:
set HOMEIP=75.153.178.208
xming -clipboard -multiwindow
c:\progfile\putty\plink.exe -C -X -ssh %HOMEIP% ~/RemoteX
exit
Now, when you run the batch file on the local windows computer, it will start "xming". I use multiwindow mode because it I like the environment to look fully integrated. Clipboard sharing is turned on because that is just handy. This should create an X icon in the system tray.

The next thing that happens is "plink" is called to establish the connection, and call the script in the users folder.

The user is prompted to log in (in the batch window), and "RemoteX" is run.

RemoteX (running on the Remote machine), contains a single instruction: start the xfce4-panel. Since the locally I load up a full KDE desktop, I can configure xfce4 to use fewer resources, and not affect my local KDE experience. Also, I do not load a full desktop environment, only the panel (aka toolbar). Again, very little is loaded, but I have a handy menu button that sits in the top right corner of my screen.

Comments
^^^^^^^^
I have seen a lot of people suggest running xterm, which they then use to start things. I do not like this technique because it intimidates non-technical users. Currently, I have my girlfriend and her daughter connecting remotely to my computer, using their laptops. Both are intimidated by the command line, but by giving them a "start" button, I find they get the best of both worlds. I've even noticed that her daughter tends to use the browser on the linux computer (konquerer) for downloading large files (her wireless is not as fast as the physical cable).

Having the separate panel for the remote computer is nice. I also have a different colour scheme pre-configured for the linux machine. It acts as a signal to the user that something is different. I have had a couple of instances where someone was browsing and couldn't figure out why they couldn't save to their local computer (alright... so that was me). The different colour scheme reminds me that I have to think a little differently.

Regarding integration, I have found that I have a command shell stuck open on my computer the whole time my connection is open. This is something I would like to do away with. I imagine some combination of pageant, and a windows version of "sh" will do the trick (it exists, I use it at work, but I don't know where it comes from):

sh -c "/progfile/putty/plink.exe -C -X -ssh %HOMEIP% ~/remotex"

I have a windows version of a linux command shell, so my batch file creates a new, hidden shell, that is running plink. The only problem with this is that "RemoteX" is not terminating cleanly so when I click "quit" on my panel, it does not close the connection as well. If I don't have the shell open, I'm going to have a bunch of connection hanging open in the background. I have also experimented with tortoisePlink (from the tortoiseSVN project), that did not go well and I kind of abandon it, maybe you will have better luck.

In the RemoteX script, you may have noticed a commented out line referring to "kicker". Kicker is KDE's task bar. Kicker takes a command line parameter to use a different config file than the default. So I have created a configuration file called "remotekickerrc". It is a stripped down configuration of Kicker that runs even faster. I keep waffling between the two setups, each have their advantages/disadvantages, but it really comes down to personal preference.

There are more secure setups, and faster configurations, but for the home user/newb, this may be a nice way to get started. I find that I just want to get it up and working and then I can tweak it (from remote locations). I hope people find this useful, I know I pull up this thread up everytime I "cat zero" my drive.

Last edited by kavius; 07-18-2008 at 10:49 AM. Reason: Formatting
 
  


Reply



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
coLinux and Xming issues. BaptismOfFire Linux - Distributions 3 12-17-2009 02:25 PM
XMing/PLink won't cooperate... richardh1970 Linux - Software 1 10-21-2008 08:09 AM
xming problem, cannot Copy&Paste from windows parv Linux - Software 6 04-16-2007 09:53 PM
using putty and xming from windows to linux stevisg General 2 12-01-2006 12:12 AM
Problem with KDE / xdmcp / xming /keyboard matiasquestions *BSD 0 05-21-2006 09:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 06:19 AM.

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