LinuxQuestions.org
Review your favorite Linux distribution.
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 08-26-2008, 03:55 PM   #1
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
How to tell if Cygwin is functioning??


Running ubuntu 7.10 and trying to talk to it from vista
I did xhost + and if I echo $DISPLAY I get 0.0

I downloaded cygwin and I have a nice little batch file that allows me to some limited linux style comands but cant do gedit from there

I can ssh in using putty and I can ftp in but cant run gedit or any other gui from the ssh window.

How can I tell if cygwin is actually functioning? and how can I can I get x apps to display on the vista machine???

The vista machine is 192.168.1.102 and the uxbox is 192.168.1.124
 
Old 08-26-2008, 04:03 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by john test View Post
I can ssh in using putty and I can ftp in but cant run gedit or any other gui from the ssh window.
That is as it should be.

Quote:
How can I tell if cygwin is actually functioning?
Despite thread title, I don't think that is the question you want answered.

Quote:
how can I can I get x apps to display on the vista machine???
That is the question.

I use xwin, which is located in /usr/X11R6/bin in my cygwin install. But I don't recall whether it came as part of cygwin or needed to be installed after cygwin.

Hopefully the names xwin and X11R6 should give you enough that if you don't have it installed you can find the cygwin compatible copy to install.

Edit: The web site for some version of this (not the one I use) is at
http://x.cygwin.com/

Last edited by johnsfine; 08-26-2008 at 04:08 PM.
 
Old 08-26-2008, 04:05 PM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by john test View Post
Running ubuntu 7.10 and trying to talk to it from vista
I did xhost + and if I echo $DISPLAY I get 0.0

I downloaded cygwin and I have a nice little batch file that allows me to some limited linux style comands but cant do gedit from there

I can ssh in using putty and I can ftp in but cant run gedit or any other gui from the ssh window.

How can I tell if cygwin is actually functioning? and how can I can I get x apps to display on the vista machine???

The vista machine is 192.168.1.102 and the uxbox is 192.168.1.124
I have the following function in my cygwin .bashrc which starts X, allowing me to use X apps in cygwin:
Code:
gg () {
        X -multiwindow &> /dev/null &
        export DISPLAY=127.0.0.1:0.0
}
After I log in, I run gg (the name of the function), and then I can run gedit, gvim or whatever, be it from the cygwin installation or after ssh-ing into a linux box.

Hope this helps.

edit: Also make sure you have X11 forwarding enabled in Putty (can't remember which section it's in, but it's fairly straightforward ).

Last edited by pwc101; 08-26-2008 at 04:09 PM.
 
Old 08-26-2008, 04:09 PM   #4
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Have you got the Xwin part of cygwin running?

Simply starting Cygwin's command line doesn't start the XWin server that emulates X on windows. Here's what you do:

-Start Cygwin command shell
-run 'startxwin.sh'
-A new window should pop up with a new shell inside of it.

That new shell is where you can run gui apps.

Also note that when you ssh, you need to use '-X' option to enable X11 forwarding (X must be capitalized and remote computer must support X11 forwarding).
 
Old 08-26-2008, 04:27 PM   #5
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
on vista / looking in /usr/bin I see "xarg" but no "xwin"

I am guessing the script above is a shell script and I am wondering if it runs on the uxbox or the vista box?

Does X reside somewhere in the Cygwin file system ?
Is there an equivalent of apt-get install xwin for cygwin?

Remember I am a newbie Thanks for the help
 
Old 08-26-2008, 04:35 PM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by john test View Post
I am guessing the script above is a shell script and I am wondering if it runs on the uxbox or the vista box?
Run it on the Vista box.
Quote:
Originally Posted by john test View Post
Does X reside somewhere in the Cygwin file system ?
Yes.
Quote:
Originally Posted by john test View Post
Is there an equivalent of apt-get install xwin for cygwin?
Rerun the setup.exe that installed cygwin, and select the X packages to install; they're not part of a default cygwin install.
 
Old 08-26-2008, 04:45 PM   #7
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
I will try to reinstall cygwin

I can/t execute X or startxwin or xwin in cygwin

when I putty into the uxbox do I run -X or -X + ????
 
Old 08-26-2008, 04:51 PM   #8
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
is there an editor in cygwin?? I tried nano pico vi and vim with no luck
scratch that word pad cant navigate the the cygwin directory and notepad doesnt track the cr newlines in .bashrc

Last edited by john test; 08-26-2008 at 04:58 PM.
 
Old 08-26-2008, 04:58 PM   #9
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by john test View Post
is there an editor in cygwin?? I tried nano pico vi and vim with no luck
Never mind I see wordpad and notepad work sorry bout that
Probably best not to use notepad or wordpad as they might add windows line endings, which don't work in cygwin.

Think of the setup.exe file as a package manager rather than an installer in the traditional sense; it allows you to add packages to the system as well as install updates to the installed packages.

I find the cygwin default base install is very minimal, and always spend some time browsing the list to install all the things I think I'll need. Inevitably, I miss some things, but the setup.exe package manager is handy for adding extra packages.

The syntax for the ssh command is
Code:
ssh -X hostname
where hostname is the ubuntu box's name or ip address you're using to connect.
 
Old 08-26-2008, 05:02 PM   #10
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Here ya go:

1. run Cygwin setup program
2. Click 'Next>'
3. Click 'Install from Internet' and click 'Next>'
4. Leave everything defaulted on next page and click 'Next>'
5. Leave Local Package Directory alone and click 'Next>'
6. Use whatever your internet connection is set to(Probably direct connection) and click 'Next>'
7. Pick whatever mirror works and click 'Next>'
8. Scroll down to 'X11' entry.
9. Click the space that is to the right of 'X11' until it says 'install' and then click 'Next>'
10. After it's done you know have the XWin program installed

1. Start cygwin shell, bash prompt, etc.
2. Type in 'startxwin.sh' and press enter
3. A new window should appear that is another shell prompt.

From here, you can either use command line ssh or putt:

Command line ssh:
Code:
ssh -X <username>@<serverURL>
and that will log you in.

Putty:
Open putty and goto 'Connection->SSH->X11'
On that page you need to make sure you always click 'Enable X11 forwarding' before you sign into your remote computer.

Good luck. If that doesn't work, get back to us!
 
Old 08-26-2008, 06:48 PM   #11
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
OK I set up putty to do x11 forwarding -- i have two authentication choices and both fail
as below
gedit
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
cannot open display:

There is a block to the right which is for display location what goes there??
 
Old 08-26-2008, 09:13 PM   #12
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Did a reload of cygwinX and still no gedit or other gui apps
 
Old 08-26-2008, 11:23 PM   #13
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by john test View Post
OK I set up putty to do x11 forwarding -- i have two authentication choices and both fail
as below
gedit
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
cannot open display:

There is a block to the right which is for display location what goes there??
HMM. This is baffling me actually. Mine works without anything in that display location box.

Also, I tested turning X11 forwarding off in sshd_config and still got a different error.

The only thing I can think of would be a firewall blocking access one of the machines. Try turning firewalls off and see if that fixes it.
 
Old 08-27-2008, 06:54 AM   #14
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Do you export the $DIPLAY?
What do you get on the suse cli if you type "echo $DISPLAY"?
 
Old 08-27-2008, 08:21 AM   #15
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
on my box:
Quote:
~> echo $DISPLAY
localhost:10.0
if yours is different try this:

Code:
export DISPLAY=localhost:10.0
See if that works
 
  


Reply


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
Gnome not functioning!! fireblade_spark Linux - Newbie 1 11-20-2007 01:15 PM
You must know the windows functioning. RonRice Linux - General 1 09-01-2005 05:19 AM
RealPlayer 10 not functioning!! Azzath Linux - Software 3 02-11-2005 07:42 PM
how winsocks is functioning? yenonn Linux - Networking 0 09-15-2003 12:52 AM
Where Are the FUNCTIONING Apps.?? kajensen Linux - General 5 09-06-2003 06:18 PM

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

All times are GMT -5. The time now is 08:01 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