Re: ssh config

2009-08-18 Thread Mark J. Reed
Let's clarify something here.

~ is always the same as $HOME.  If you change $HOME - within bash -
then ~ changes too:

$ HOME=/bogus/directory
$ echo ~
/bogus/directory

HOME starts out set to whatever's in /etc/passwd, but you can change
it.  For that reason, security-conscious programs like ssh ignore
$HOME and go by what's in /etc/passwd (which, on a real Unix system,
an unprivileged user can't change).

So changing $HOME is asking for trouble, basically.


-- 
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Error: Can't open display: 127.0.0.1:0.0

2009-05-04 Thread Mark J. Reed
On Mon, May 4, 2009 at 5:01 PM, Mike Ayers wrote:
>> Firewall exception    Port number = 6000/TCP

Sounds like your firewall is preventing access to the X11 port (TCP
port 6000).

>> System Variables    Display=127.0.0.1:0.0 (I can ping
>> 127.0.0.1 from cygwin)

Mike>        Shouldn't this be "127.0.0.1:0"?

:0 and :0.0 are equivalent - it's  (display number, ".", screen
number), and the screen number defaults to 0.

-- 
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Pipe (|) symbol under spanish keybord in xterm

2009-04-08 Thread Mark J. Reed
On Wed, Apr 8, 2009 at 10:37 AM, Gery Herbozo Jimenez  wrote:
> I've been working for a while with a spanish keyboard

http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-non-U.S.-keyboard-layout

> and up to now I don't know how to get the pipe (|) symbol in my xterm 
> terminal. However, I
> do get it in the bash terminal without problems using Ctrl + Alt + 1. When I 
> follow this step
> in the xterm I get this instead of the pipe: (arg: 1). What does it mean?

In readline's emacs mode, holding down the alt key while typing
numbers is how you enter a repeat count for an editing command - e.g.
alt-3 alt-f (hold down alt and type 3f) to go forward three words. The
"(arg: 1)" means you've typed a repeat count of "1" so far (you could
add more digits to make it "10" or something).  The control key is not
contributing anything in this instance.

It seems X is not recognizing your keyboard layout.  I'd try adding
"-xkblayout es" to the X server command line, as indicated in the
above FAQ entry.

--
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Saving all xterm output to a file

2009-02-08 Thread Mark J. Reed
On Sun, Feb 8, 2009 at 6:35 AM, Thomas Dickey  wrote:
> hmm - yes (I had at hand a script which does the latter, and couldn't
> recall the detail needed for the former, which seemed to be what OP
> requested).

Redirects are processed left-to-right.  So this:

command >foo 2>&1

says "send stdout into file foo and then send stderr (file descriptor
2) wherever stdout (file descriptor 1) is going".  So they both go
into the file.  If you swap them, like this:

command 2>&1 >foo

that says "send stderr wherever stdout is going, and then send stdout
into file foo".  Which means stderr goes to the screen like usual and
the 2>&1 doesn't do much in this case.  But since pipes are set up
before any of the redirects, this command:

command 2>&1 >foo | othercommand

will send stdout into a file while piping stderr into the other
command, and this one:

command 2>&1 | othercommand

will pipe them both together.

-- 
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: rgb.txt not honored in X7?

2009-02-03 Thread Mark J. Reed
On Tue, Feb 3, 2009 at 8:03 PM, Mike Ayers wrote:
>>   However, in Cygwin X11R7, even though the rgb.txt file
>> is the same, but in the new location,
>
>Which is the new location?

I don't know if there is a default location in X11R7, but you can set
the location explicitly via the environment variable RGBDEF in the
environment from which you start the X server.

-- 
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Restore Alt-Ctl-Backspace As Server Kill

2009-02-03 Thread Mark J. Reed
I don't use it, but "startfluxbox" sounds like something that kicks of
fluxbox and then exits (vs xterm which stays around).   Could that be
the problem?

Also, if you're using ssh, why not use ssh forwarding instead of
sending the X traffic back over a separate, unencrypted connection?
And you don't need to logout explicitly; terminating the shell does
the same thing.

ssh -Y u...@machine startfluxbox

you might try

ssh -nY u...@machine startfluxbox

to prevent standard input from causing a problem...


On Tue, Feb 3, 2009 at 2:48 PM, Tim Daneliuk wrote:
>
>  ssh u...@machine "export DISPLAY=mymachine:9;xterm;logout"
>
> But both of these have the problem:
>
>  ssh u...@machine "export DISPLAY=mymachine:9;startfluxbox;logout"
>  ssh u...@machine "export DISPLAY=mymachine:9;exec startfluxbox;logout"
>
>
> Now the "Narrowing It Down" and "Really Strange" part.  This works
> just fine:
>
>  ssh u...@machine "export DISPLAY=mymachine:9;exec fluxbox;logout"
>
> It seems that something (I have not figured out just what yet)
> about the default fluxbox startup script (on FreeBSD 6-STABLE in this
> case) is interacting with the cygwin X server and killing it.
>
> Oiy, my head ...

-- 
Mark J. Reed 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: xterm-237-2 still has no UTF-8 support

2008-12-09 Thread Mark J. Reed
On Tue, Dec 9, 2008 at 10:39 AM, Yongwei Wu wrote:
> I got these messages:
>
> Warning: Cannot convert string
> "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*" to type
> FontStruct
> Warning: Cannot convert string "nil2" to type FontStruct
>
> And non-ASCII characters become either spaces or question marks.  I
> verified that I can copy the correct characters, but they do not
> appear.

If you can copy them and they appear properly when you paste, that
would seem to imply that the xterm is correctly handling the Unicode
characters.  It's just that the associated glyphs are not present in
the font you're using.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: xterm not accepting Window Title name changes

2007-10-23 Thread Mark J. Reed
Somewhat OT, but don't you need -e on the echo command to get it to
interpret the backslash escapes?  Or is that only needed for the
non-numeric ones?


On 10/23/07, Paul McFerrin <[EMAIL PROTECTED]> wrote:
> Hi:
>
> I can't seem to get xterm to recognize Window Title name changes via the
> following:
>
> echo "\0332;new_title\07\c"
>
> I have added the following new lines to my .Xdefaults file with no effect.
>
> XTerm.AllowTitleOps:true
> XTerm.AllowTitleOps: true
> XTerm.allowTitleOps: true
> XTerm.allowWindowOps:true
> XTerm.AllowWindowOps:true
> XTerm.vt100.AllowTitleOps:  true
> XTerm.vt100.AllowTitleOps:   true
> XTerm.vt100.allowTitleOps:   true
> XTerm.vt100.allowWindowOps:  true
> XTerm.vt100.AllowWindowOps:  true
> VT100.AllowTitleOps: true
> VT100.allowTitleOps: true
> VT100.allowWindowOps:true
> VT100.AllowWindowOps:true
> XTerm.vt100.utf8Title:   true
> VT100.AllowTitleOps:true
>
> and I have modified my "startxwin.sh script to start xterm the following
> way:
>
> xterm -aw -b 5 +cm -rw -sb -sk  -sl 1500 -rv -e /usr/bin/ksh -l &
>
> I thought it was working yesterday, but at this point I can't remember
> very much!  Yesterday, I only had the:
>
>XTerm.AllowTitleOps:true
>
> line in .Xdefaults and I thought it was working
>
> What am I doing wrong??
>
>
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://x.cygwin.com/docs/
> FAQ:   http://x.cygwin.com/docs/faq/
>
>


-- 
Mark J. Reed <[EMAIL PROTECTED]>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Xargs....

2007-10-22 Thread Mark J. Reed
On 10/22/07, Hall Nation <[EMAIL PROTECTED]> wrote:
> I just couldn't get what was described abt xargs in man ,,,  I mean I need it 
> in simple terms.. (layman terms)

xargs has nothing to do with X11, first of all.  The "x" in this case
means "trans", as in "transpose", which is the operation that takes a
vertical column and turns it into a horizontal row.

Say you have a file named x.txt with these lines in it:

 x1
 x2
 x3

Now say you run this:

   xargs echo 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: What is xargs?

2007-10-12 Thread Mark J. Reed
> On 2007-10-12, Hall Nation wrote:
> > I am new to cygwin/X.
> >
> > Using the above setup at the workplace..
> > I need to know about the xargs command. What does it
> > do ?

As Gary said, the "man" (short for "manual") command is your friend.

It's also important to note that not all commands whose name starts
with "x" have anything to do with X the graphics system.  In the case
of "xargs", the "x" represents the operation that conceptually turns a
vertical list of items into a horizontal list of command-line
arguments.

So if you have a file named "lines.txt" whose contents are as follows:

line1
line2
line3

Then if you type this at the bash prompt:

xargs mycommand 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: xterm

2007-08-31 Thread Mark J. Reed
 >> Make sure the X server is running first (run 'startxwin').
> >
> > This might not sufficient - at least it is not in my system:
> > Even when you start the X server (in my case in multiwindow
> > mode), but then try to start xterm from a CMD Cygwin shell
> > (such as from the shell you get when opening the Cygwin
> > icon which is created by default when you setup Cygwin initially),
> > you get the above error message.

Well, sure.

X allows individual programs running on one computer to display
selectively on a different one over the network, which is quite handy.
 You can also have multiple X servers running on the same host, thanks
to things like virtual consoles, Xnest,  Xvnc, etc.

But that means that an X client can't safely make assumptions about
where the X server is.  So you have to tell it.

You do this by supplying a display identifier string.  In the usual
case, a single X server on the same machine as the program, the
display identifier is almost always ":0".

How do you provide this information?  The usual way is by setting the
environment variable DISPLAY.  If you have a shell that was started up
by an X program (like xterm or rxvt), that shell will inherit the
value of DISPLAY (if you type "echo $DISPLAY" you will see it).  So
that shell can automatically start up X programs; they will show up on
the same display as the window you type their command in.

However, a plain Cygwin shell running in a Windows command window has
no knowledge of X by default, and no DISPLAY variable set.  So when
you try to run an X program it complains about not being able to open
the display - because you haven't told it which display to open.  (Not
the most informative error message, and it probably ought to default
to :0, but I'm just the messenger. :))

You can tell each program manually where to display:

$ xterm -display :0

Or you can just set DISPLAY yourself first:

export DISPLAY=:0

If you're always (or almost always) going to have X running, you can
put the export command in your .bash_profile so that you can always
start X programs.  But that can cause difficulties - some programs,
such as vim, behave differently when DISPLAY is set, and may hang for
a while trying to get some information about the X environment if
DISPLAY is set when X isn't really running.

-- 
Mark J. Reed <[EMAIL PROTECTED]>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Adding fonts

2007-08-21 Thread Mark J. Reed
It's a little more work, but it might be better to add the Windows
fonts directory to the X font path.  Then you only store the actual
fonts in one place on disk, and all the system TTF fonts are available
to X.

You'd need to create the X11 font management metafiles in the system
fonts dir, but Windows will just ignore them.  You'd also need to
update them whenever you add new fonts . . . or schedule a job to
check periodically.


On 8/21/07, S James S Stapleton <[EMAIL PROTECTED]> wrote:
> Yes. It's as easy as:
> cp /path/to/original.font /usr/X11R6/lib/X11/fonts/[fonttype]/
>
> where you replace [fonttype] with the type of font you want
>
> ex. copy all windows ttf fonts over:
> $ cp /cygdrive/c/WINDOWS/Fonts/*.[tT][tT][fF] /usr/X11R6/lib/X11/fonts/ttf/
>
>
> Caveat:
> You might run into problems, depending on if you are running in dos or unix
> line mode, I can't remember...
>
> Hope that helps,
> -Jim Stapleton
>
> - Original Message -
> From: "Jean-Claude Gervais" <[EMAIL PROTECTED]>
> To: "Cygwin-XFree" 
> Sent: Monday, August 20, 2007 4:11 PM
> Subject: Adding fonts
>
>
> > Hi,
> >
> > Is there a simple way to add fonts to Cygwin's X server?
> >
> > For example, I have a true-type font called TAHOMA.TTF that I would like
> > to make available to the X Server.
> >
> > Are all the host operating system's fonts automatically available to the
> > X server? Do I have to perform any special actions to enable them? Is
> > there a formula for doing this?
> >
> > Thanks in advance, list.
> >
> > J
> >
> >
> > --
> > Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> > Problem reports:   http://cygwin.com/problems.html
> > Documentation: http://x.cygwin.com/docs/
> > FAQ:   http://x.cygwin.com/docs/faq/
> >
> >
> >
> > --
> > BEGIN-ANTISPAM-VOTING-LINKS
> > --
> >
> > Teach CanIt if this mail (ID 397534979) is spam:
> > Spam:https://antispam.osu.edu/b.php?c=s&i=397534979&m=513b38672a09
> > Not spam:https://antispam.osu.edu/b.php?c=n&i=397534979&m=513b38672a09
> > Forget vote: https://antispam.osu.edu/b.php?c=f&i=397534979&m=513b38672a09
> > --
> > END-ANTISPAM-VOTING-LINKS
> >
>
>
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://x.cygwin.com/docs/
> FAQ:   http://x.cygwin.com/docs/faq/
>
>


-- 
Mark J. Reed <[EMAIL PROTECTED]>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Pseudo-terminal will not be allocated because stdin is not a terminal.

2007-02-01 Thread Mark J. Reed

In the POSIX API there is a function that takes a file descriptor and
returns true if that descriptor is associated with a "terminal", false
otherwise.  The effective definition of "terminal" is therefore
"something that causes that function to return true".  :)

Xterms running under Cygwin are designed to do whatever it is that
makes the Cygwin version of the function return true, but non-Cygwin
programs have their own idea (perhaps based on a Windows POSIX layer
version of the same function, perhaps not), and apparently
Cygwin/xterm doesn't pass muster.  More than likely the only thing
that looks like a "terminal" to the Windows ssh client is a command
prompt console window (do they still call those "DOS boxes"?).

On 2/1/07, Christopher Faylor <[EMAIL PROTECTED]> wrote:

On Thu, Feb 01, 2007 at 04:42:59PM -0800, peter360 wrote:
>Indeed!  It turns out I was using c:\WINDOWS\System32\ssh.exe, which I have
>no idea how it got there...  I installed openssh and the problem was fixed.
>Thanks!
>
>Just out of curiosity, how does a program check if stdin is a "terminal"?
>My xterm looks like a terminal to me but apparently the windows version of
>ssh.exe couldn't figure that out...

Windows doesn't know what a "terminal" is.  Cygwin invents its own concept
but only Cygwin programs are aware of this.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/





--
Mark J. Reed <[EMAIL PROTECTED]>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/