Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to have a sort of 'thin client' computer to display programs that are run on a more powerful computer over SSH. (standard ssh stuff). Anyway, when I run xinit and then ssh -X remote@123.123.1.9 all works beautifully. But I want to have it automaticly (without user input). xinit -e 'ssh -X remote*123.123.1.9' also works nice. The only problems with these two methods are the login xterm. So I went to startx because it doesn't have an xterm (i think). But, when I put the ssh login command in /etc/X11/xinit/xinitrc it doesn't work. It just hangs. Although, I have noticed that, although users doesn't say remote is logged in, ps -e remote says he is running sshd untill I kill the X server (it just displays black).
So, what am I doing wrong or what is a better / the proper way to achieve this?
If it helps:
Server 64bit Arch Linux up-to-date
Client 32bit Ubuntu 10.04 LTS
Would using vnc be a possibility? That would also fit in with the "thin client" paradigm. It also creates its own private X desktop.
One other question: Are you trying to run just a single X client remotely and display locally or are you trying to display *all* remote X clients locally?
If it's the latter, I don't think startx is designed to do that -- When startx runs, it tries to initialize the display adapter on the system it's running on. So if you ssh to a system and then run startx on that system, the startx program will initialize the display on the remote computer.
If you don't like the xterm, perhaps creating a ~/.xinitrc that runs some program that just sits forever would be helpful (since xinit looks for ~/.xinitrc and if it doesn't find it, it runs xterm. If you create an xinitrc, then xinit will run the programs listed there, and the X server will terminate when the last program in xinitrc exits).
Would using vnc be a possibility? That would also fit in with the "thin client" paradigm. It also creates its own private X desktop.
I have thought about this but it appears to take more resources. Also the screen doesn't update nicely (it flickers). I may have to use this but I was hoping I could get it working with raw X.
Quote:
Originally Posted by plpl303a
One other question: Are you trying to run just a single X client remotely and display locally or are you trying to display *all* remote X clients locally?
I don't quite get the question. I have one computer right now but if I can figure this out I would like to connect more. I want one X server up on each 'branch' connecting to one login with a full desktop session running on the 'central' computer.
Quote:
Originally Posted by plpl303a
If it's the latter, I don't think startx is designed to do that -- When startx runs, it tries to initialize the display adapter on the system it's running on. So if you ssh to a system and then run startx on that system, the startx program will initialize the display on the remote computer.
I'm sorry for being unclear, I am running startx on the remote computer to start and X server and then ssh to the 'central' computer that will run all of the clients.
Quote:
Originally Posted by plpl303a
If you don't like the xterm, perhaps creating a ~/.xinitrc that runs some program that just sits forever would be helpful (since xinit looks for ~/.xinitrc and if it doesn't find it, it runs xterm. If you create an xinitrc, then xinit will run the programs listed there, and the X server will terminate when the last program in xinitrc exits).
This sounds like a game winner. I will try this out and see how it goes. I thought the xterm was just a 'byproduct' of xinit that is nice for debugging but not for the average desktop user. I'll get back to you as soon as I get a chance to try this out.
Thank you. You have helped me to figure this out. It turns out that when ssh is not running interactively bash is not called. You can solve this by calling bash (or any program) via ssh
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.