This is a discussion on How to remotely connect to linux machine and then use GUI software on it? within the Linux Networking forums, part of the Linux Forums category; Hi! I am new to linux. I wish I post my question to the correct group. In my school lab, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I am new to linux. I wish I post my question to the correct group. In my school lab, there is a linux machine and I have an account on it. Now I can use some SSH software to connect it from my home, and then use only text mode commands. My question is: If I also want to use GUI (graphic user interface) softwares such as Mozilla web-browser on that linux from my home PC, what should I do? there is a linux-administrator in my lab but he says he does not know the answer of my question. He is willing to install necessary software for me. Thank you. |
|
|||
|
> Hi!
> I am new to linux. I wish I post my question to the correct group. > In my school lab, there is a linux machine and I have an account on it. > Now I can use some SSH software to connect it from my home, > and then use only text mode commands. > My question is: > If I also want to use GUI (graphic user interface) softwares such as > Mozilla web-browser on that linux from my home PC, what should I do? > there is a linux-administrator in my lab but he says he does not know > the answer of my question. He is willing to install necessary software > for me. > Thank you. (1) Start an X server, such as the one provided by http://x.cygwin.com/, on your home PC. (2) Enable X forwarding in your SSH client. (3) Log in to the linux host, and run the GUI command from the command line there. The app will display on your home PC. Good luck, Andrew. -- To reply by email, replace "deadspam.com" by "alumni.utexas.net" |
|
|||
|
On Wed, 20 Apr 2005 12:54:12 -0700, I_have_nothing wrote:
> Hi! > I am new to linux. I wish I post my question to the correct group. > In my school lab, there is a linux machine and I have an account on it. > Now I can use some SSH software to connect it from my home, > and then use only text mode commands. > My question is: > If I also want to use GUI (graphic user interface) softwares such as > Mozilla web-browser on that linux from my home PC, what should I do? > there is a linux-administrator in my lab but he says he does not know > the answer of my question. He is willing to install necessary software > for me. > Thank you. From your end you need to specify X forwarding, it's also a good idea to use compression so do the following, ssh -X -C target_machine On the target machine you need to enable X forwarding. This is done in /etc/ssh/sshd_config, X11Forwarding yes An easier way to configure ssh is by using webmin, it has a great ssh module. After you've sshed into the machine just start the app from the command line. |
|
|||
|
By 20 Apr 2005 12:54:12 -0700, "I_have_nothing" <ddt_pest@yahoo.com.tw>
decided to post "How to remotely connect to linux machine and then use GUI software on it?" to comp.os.linux.networking: >Hi! >I am new to linux. I wish I post my question to the correct group. >In my school lab, there is a linux machine and I have an account on it. >Now I can use some SSH software to connect it from my home, >and then use only text mode commands. >My question is: >If I also want to use GUI (graphic user interface) softwares such as >Mozilla web-browser on that linux from my home PC, what should I do? >there is a linux-administrator in my lab but he says he does not know >the answer of my question. He is willing to install necessary software >for me. >Thank you. The other answers pretty much cover it. A few details: o you need to run an X-server on your machine, true, but what is that? It's software that acts as a graphical environment server and as a client. You run it on your home machine, be it *nix, BSD or other. It provides a graphical display as specified by the incoming connection. o when you start the GUI app on the remote machine in the lab, it will attempt to connect to your X-server; you may need to specify a DISPLAY environment variable # DISPLAY=<my ip> on the machine in the lab o You may need to do this on a per-program basis on the command line: /usr/bin/kshisen -display 192.168.0.1:0 This is an example, non-routable ip#, use your own! Note the ':0' at the end of the command. o The tunnel over ssh may just work automatically, or you may just need to adjust settings such as XDCMP mode (most likely QUERY?) Good luck, it's worth it. There are commercial X-servers out there, such as X-win32 from Starnet for non-*nix operating systems. Do a google. /.. -- find / -iname "*gw*" -exec rm -rf {} \; In heaven, there is no beer, That's why we drink it here, And when we're all gone from here, Our friends will be drinking all the beer! -- Famous old Czech song about beer -- |
|
|||
|
Thanks!
But ...a few more questions: 1. Start an X server--I run cygwin.bat. It looks OK. There is a cygwin window pop-up and it has the following prompt: User@IBM-E4029...~ $ Q: Now I have problem to start the Cygwin/w. I read the Chapter 4 of user guide but still can not find a way to start it. Would you please help? 2. Enable X forwarding in your SSH client. I use SSH Secure Shell connect to the linux host. It looks Ok. Q: How can I Enable X forwarding in your SSH client(my PC?) I type "ssh -X -C bonds.MYschool.edu" under the $ in cygwin window but get "bash:ssh: command not found". What should I do? I check linux host by "cat /etc/ssh/sshd_config" There is a "X11Forwarding yes" in it. Though I can not run it, but I assume X forwarding is enabled on target machine(linux host). Q: When I try to run GUI in linux, such as htmlview, I got: " htmlview No valid text mode browser found." What's wrong? Thanks! >(1) Start an X server, such as the one provided by http://x.cygwin.com/, on your home PC. >(2) Enable X forwarding in your SSH client. >(3) Log in to the linux host, and run the GUI command from the command line there. >The app will display on your home PC. >Good luck, >Andrew. >From your end you need to specify X forwarding, it's also a good idea to use compression so do the following, >On the target machine you need to enable X forwarding. This is done in /etc/ssh/sshd_config, >X11Forwarding yes > The other answers pretty much cover it. A few details: > > o you need to run an X-server on your machine, true, but what is that? > It's software that acts as a graphical environment server and as a > client. You run it on your home machine, be it *nix, BSD or other. It > provides a graphical display as specified by the incoming connection. > o when you start the GUI app on the remote machine in the lab, it will > attempt to connect to your X-server; you may need to specify a DISPLAY > environment variable # DISPLAY=<my ip> on the machine in the lab > o You may need to do this on a per-program basis on the command line: > /usr/bin/kshisen -display 192.168.0.1:0 > This is an example, non-routable ip#, use your own! Note the ':0' at the > end of the command.> -- > |
|
|||
|
> Thanks!
> But ...a few more questions: > > 1. Start an X server--I run cygwin.bat. It looks OK. > There is a cygwin window pop-up and it has the following prompt: > User@IBM-E4029...~ > $ > Q: Now I have problem to start the Cygwin/w. > I read the Chapter 4 of user guide but still can not find a way to > start it. Would you please help? I think you mean Cygwin/X, the X server? From the Cygwin bash prompt, I run XWin.exe -multiwindow -clipboard -dpi 100 & A little X icon appears in my systray, letting me know that the X server is running. Of course for this to work you'll have to have installed the Cygwin xorg-x11-xwin package, plus whatever other associated packages. > 2. Enable X forwarding in your SSH client. > I use SSH Secure Shell connect to the linux host. It looks Ok. > Q: How can I Enable X forwarding in your SSH client(my PC?) > I type "ssh -X -C bonds.MYschool.edu" under the $ in cygwin window > but get "bash:ssh: command not found". What should I do? Your command is correct. The problem is that bash can't find the ssh executable. Either you haven't installed the openssh package, or else your PATH doesn't include /usr/bin. > I check linux host by "cat /etc/ssh/sshd_config" > There is a "X11Forwarding yes" in it. Though I can not run it, but I > assume X forwarding is enabled on target machine(linux host). > > Q: When I try to run GUI in linux, such as htmlview, I got: > " htmlview > No valid text mode browser found." > What's wrong? Not sure, but maybe it's looking for a text mode browser because no X display is available, because you haven't finished setting up your X forwarding yet. Fix the above two problems first, and that problem may solve itself. Good luck, Andrew. -- To reply by email, replace "deadspam.com" by "alumni.utexas.net" |
|
|||
|
Thank you so much! Some progress, but still have problems.
> I think you mean Cygwin/X, the X server? From the Cygwin bash prompt, I > run > > XWin.exe -multiwindow -clipboard -dpi 100 & > > A little X icon appears in my systray, letting me know that the X server > is running. Of course for this to work you'll have to have installed > the Cygwin xorg-x11-xwin package, plus whatever other associated > packages. Yes, I install xorg-x11-xwin package and openssh, and run XWin.exe -multiwindow -clipboard -dpi 100 &. It looks working so far. > > The problem is that bash can't find the ssh > executable. Either you haven't installed the openssh package, or else > your PATH doesn't include /usr/bin. I did not installed the openssh package earlier, now It works now. > > Q: When I try to run GUI in linux, such as htmlview, I got: > > " htmlview > > No valid text mode browser found." I type "gedit" to run the editor, I get: (gedit:30549): Gtk-WARNING **: cannot open display:" I do not know how to set the "display". Do you know how to do it? I also have problem to get my local ip.<--- Do I need it? Thanks! |
|
|||
|
> I type "gedit" to run the editor, I get:
> (gedit:30549): Gtk-WARNING **: cannot open display:" > > I do not know how to set the "display". Do you know how to do it? OK, you are almost there now. I'm afraid I've gotten rather lazy thinking about setting DISPLAY, because I use PuTTY as my ssh client, and it sets DISPLAY automatically for me. You need to run something like this in your ssh session before starting a GUI app: export DISPLAY=localhost:10 The trick is figuring out which display number to put on the end-- 10 in the example I gave above. I can't remember the details of that now; maybe the ssh man page talks about it, or the X server docs. You could also just try some different ones; 10 and 11 are often used to forward to remote X servers. Or, use PuTTY for your ssh client. As I said it will take care of setting DISPLAY for you. > I also have problem to get my local ip.<--- Do I need it? In Win9x/ME, run winipcfg. In WinNT/2K/XP, open a command prompt and run ipconfig. Both of those will show you your local IP address. Unfortunately that won't help you if you're behind a router, because you'll only get your LAN IP address, which is unroutable. Instead run IP2, available free from http://keir.net/download/ip2.zip. It will show you both your LAN and WAN IP addresses. Good luck, Andrew. -- To reply by email, replace "deadspam.com" by "alumni.utexas.net" |