configure rxvt on cygwin 1.7.5

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

configure rxvt on cygwin 1.7.5

philippe-61
Hi,

after upgrading cygwin, I fail to customize my rxvt terminal. I've
changed the files

-  /cygwin.bat to replace basic console by rxvt with the line

rxvt -fn "-*-Courier-medium-r-*-18-*-*-*-*-iso8859-1" -geometry 80x30
-sr -bg "#ffffd5" -fg "black" -sl 2000 -termName xterm -e /usr/bin/bash
--login -i


-  ~/.Xdefault with

Rxvt*geometry: 80x30
Rxvt*background: #ffffd5
Rxvt*foreground: black
Rxvt*scrollBar: True
Rxvt*scrollBar_right: True
Rxvt*font: -*-Courier-medium-r-*-18-*-*-*-*-iso8859-1
Rxvt*SaveLines: 2000

- ~/.bashrc with my aliases

- and 've added  /etc/bashrc with my promt definition :

PS1='\e[0m\][\e[32m\]\u\e[0m\]@\e[31m\]\h\e[0m\]\e[0m\]]\e[34m\]\w\e[0m\]>\n$
'

this last definition seems to be ignored anyway ...
so where should i place the /etc/bashrc

Philippe.


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Csaba Raduly-2
On Tue, Jul 6, 2010 at 11:22 PM, philippe wrote:
> so where should i place the /etc/bashrc

In the file /etc/bash.bashrc

--
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
Csaba Raduly a écrit :
> On Tue, Jul 6, 2010 at 11:22 PM, philippe wrote:
>> so where should i place the /etc/bashrc
>
> In the file /etc/bash.bashrc

the change bashrc->basch.barchrc doesn't solve the problem.

Philippe.


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Andy Koppe
In reply to this post by philippe-61
On 6 July 2010 22:22, philippe wrote:
> -  /cygwin.bat to replace basic console by rxvt with the line
>
> rxvt -fn "-*-Courier-medium-r-*-18-*-*-*-*-iso8859-1" -geometry 80x30
> -sr -bg "#ffffd5" -fg "black" -sl 2000 -termName xterm -e /usr/bin/bash
> --login -i

Setting termName to "xterm" in rxvt is a bad idea, because the two
terminals diverge in various ways, for example regarding keycodes for
modifier key combinations. Better stick with TERM=rxvt.

> - and 've added  /etc/bashrc with my promt definition :
>
> PS1='\e[0m\][\e[32m\]\u\e[0m\]@\e[31m\]\h\e[0m\]\e[0m\]]\e[34m\]\w\e[0m\]>\n$
> '
>
> this last definition seems to be ignored anyway ...

Have a look at http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
to see which files are being sourced when bash is invoked with
--login.

Andy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
Andy Koppe a écrit :
>
> Setting termName to "xterm" in rxvt is a bad idea, because the two
> terminals diverge in various ways, for example regarding keycodes for
> modifier key combinations. Better stick with TERM=rxvt.

ok

>
> Have a look at http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
> to see which files are being sourced when bash is invoked with
> --login.


I've together the contains of /etc/bashrc and ~/.bash into a single file
~/.profile and now it's ok for my prompt and aliases ! But I've still
some problems with special characters (é à ç ...), how can I change
default encoding to avoid errors like below :

[philippe@port78]~/Documents>
$ ls cl*
clé avast.txt
[philippe@port78]~/Documents>
$ ls clé*
ls: cannot access clé*: No such file or directory

Thank's,

Philippe.



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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Jeremy Bopp-3
On 7/8/2010 2:44 PM, philippe wrote:

> I've together the contains of /etc/bashrc and ~/.bash into a single file
> ~/.profile and now it's ok for my prompt and aliases ! But I've still
> some problems with special characters (é à ç ...), how can I change
> default encoding to avoid errors like below :
>
> [philippe@port78]~/Documents>
> $ ls cl*
> clé avast.txt
> [philippe@port78]~/Documents>
> $ ls clé*
> ls: cannot access clé*: No such file or directory

You probably need to abandon rxvt and switch to either rxvt-unicode or
mintty.  Rxvt pretty much only supports ASCII characters.  It's also
abandoned upstream, so it isn't likely to be fixed either.  However, if
rxvt used to work for you under Cygwin 1.5, you might be able to make it
happy again by changing your LANG setting to LANG=C.

I highly recommend mintty.

-Jeremy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
Jeremy Bopp a écrit :
> [...] However, if rxvt used to work for you under Cygwin 1.5, you might be
> able to make it happy again by changing your LANG setting to LANG=C.

No, i don't know where to modify this option LANG :-)

> I highly recommend mintty.

ok, mintty is distributed with cygwin and seems to be a nice terminal.
I've search a little about mintty configuration, i understand that i've
to move ~/.profile to ~/.minttyrc, but it's not sufficient to traduce in
a "mintty syntax" my ~/.Xdefault or the command below :


rxvt -fn "-*-Courier-medium-r-*-18-*-*-*-*-iso8859-1" -geometry 90x30
-sr -bg "#ffffd5" -fg "black" -sl 8000 -termName rxvt -e /usr/bin/bash
--login -i


Do you know a good tutorial to configure mintty or can you help me!

Thank's,

Philippe.



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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

DePriest, Jason R.
On Thu, Jul 8, 2010 at 4:22 PM, philippe <> wrote:

> Jeremy Bopp a écrit :
>> [...] However, if rxvt used to work for you under Cygwin 1.5, you might be
>> able to make it happy again by changing your LANG setting to LANG=C.
>
> No, i don't know where to modify this option LANG :-)
>
>> I highly recommend mintty.
>
> ok, mintty is distributed with cygwin and seems to be a nice terminal.
> I've search a little about mintty configuration, i understand that i've
> to move ~/.profile to ~/.minttyrc, but it's not sufficient to traduce in
> a "mintty syntax" my ~/.Xdefault or the command below :
>
>
> rxvt -fn "-*-Courier-medium-r-*-18-*-*-*-*-iso8859-1" -geometry 90x30
> -sr -bg "#ffffd5" -fg "black" -sl 8000 -termName rxvt -e /usr/bin/bash
> --login -i
>
>
> Do you know a good tutorial to configure mintty or can you help me!
>
> Thank's,
>
> Philippe.

Hello Philippe.

If you run mintty and click on the icon in the upper left, you will
see that an 'Options' option is available.

Most of what you want can be set up in there and it will be saved to
your .minttyrc file automatically.

-Jason

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Jeremy Bopp-3
In reply to this post by philippe-61
On 7/8/2010 4:22 PM, philippe wrote:
> Jeremy Bopp a écrit :
>> [...] However, if rxvt used to work for you under Cygwin 1.5, you might be
>> able to make it happy again by changing your LANG setting to LANG=C.
>
> No, i don't know where to modify this option LANG :-)

LANG is an environment variable.  Under Cygwin 1.5, LANG=C was the
default, but under Cygwin 1.7, LANG=C.UTF-8 is the default.  This change
is probably why rxvt stopped working for you out of the box.

>> I highly recommend mintty.
>
> ok, mintty is distributed with cygwin and seems to be a nice terminal.
> I've search a little about mintty configuration, i understand that i've
> to move ~/.profile to ~/.minttyrc, but it's not sufficient to traduce in

~/.profile is something entirely different than ~/.minttyrc.  They have
completely different functions.  The former sets up your shell
environment while the latter configures mintty (the terminal) itself.
There is nothing at all to move from one file to the other.

> a "mintty syntax" my ~/.Xdefault or the command below :
>
>
> rxvt -fn "-*-Courier-medium-r-*-18-*-*-*-*-iso8859-1" -geometry 90x30
> -sr -bg "#ffffd5" -fg "black" -sl 8000 -termName rxvt -e /usr/bin/bash
> --login -i
>
>
> Do you know a good tutorial to configure mintty or can you help me!

As Jason already informed you, mintty has an options dialog you can use
to configure it.  The equivalents of your rxvt options, except for the
-e option, can be configured there and saved automatically to
~/.minttyrc so that future runs of mintty automatically have the right
settings without the need for a long, complicated set of command line
options.  However, most if not all of the options can be set via the
command line as well if that's your preference.  See man mintty for details.

For your -e option, simply run mintty with a single "-" as the only
option, i.e. "mintty -".  That will tell mintty to run an interactive
login shell for your user as specified in /etc/passwd.  As you'll see in
the manpage for mintty, mintty does have a -e option, but there really
isn't any need to be so verbose about the shell to start for most
people.  Set the shell program you want to use in /etc/passwd, and let
mintty do the rest.

-Jeremy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Michael Lemke
On Fri, 09 Jul 2010 00:41:25 +0200, Jeremy Bopp <[hidden email]> wrote:

> On 7/8/2010 4:22 PM, philippe wrote:
>> Jeremy Bopp a écrit :
>>> [...] However, if rxvt used to work for you under Cygwin 1.5, you  
>>> might be
>>> able to make it happy again by changing your LANG setting to LANG=C.
>>
>> No, i don't know where to modify this option LANG :-)
>
> LANG is an environment variable.  Under Cygwin 1.5, LANG=C was the
> default, but under Cygwin 1.7, LANG=C.UTF-8 is the default.  This change
> is probably why rxvt stopped working for you out of the box.

If you want to continue with rxvt and want to keep it as close
as possible to the old behavior set

export LANG=C.ISO-8859-1
export LC_TIME=C

in .profile

Works for me.  The LC_TIME is to keep ls -l produce the standard time
strings.

Michael


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Andy Koppe
On 9 July 2010 00:01 lemkemch wrote:
> If you want to continue with rxvt and want to keep it as close
> as possible to the old behavior set
>
> export LANG=C.ISO-8859-1
> export LC_TIME=C
>
> in .profile

Setting LANG in .profile is too late for bash itself, because that
will continue to operate in C.UTF-8. That will cause trouble when
entering non-ASCII characters on the command line, for example, try
typing an ä or â.

Therefore you need to set it before bash is invoked, for example in
cygwin.bat if that's where you're invoking rxvt from.

Andy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Andy Koppe
In reply to this post by Jeremy Bopp-3
On 8 July 2010 23:41, Jeremy Bopp wrote:

> As Jason already informed you, mintty has an options dialog you can use
> to configure it.  The equivalents of your rxvt options, except for the
> -e option, can be configured there and saved automatically to
> ~/.minttyrc so that future runs of mintty automatically have the right
> settings without the need for a long, complicated set of command line
> options.  However, most if not all of the options can be set via the
> command line as well if that's your preference.  See man mintty for details.
>
> For your -e option, simply run mintty with a single "-" as the only
> option, i.e. "mintty -".  That will tell mintty to run an interactive
> login shell for your user as specified in /etc/passwd.  As you'll see in
> the manpage for mintty, mintty does have a -e option, but there really
> isn't any need to be so verbose about the shell to start for most
> people.  Set the shell program you want to use in /etc/passwd, and let
> mintty do the rest.

Good advice. Also, it's easiest just to invoke mintty from the start
menu shortcut in the Cygwin folder that's created when mintty is
installed. That already has that '-' argument.

Andy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
In reply to this post by Andy Koppe
Andy Koppe a écrit :
> On 9 July 2010 00:01 lemkemch wrote:
>> If you want to continue with rxvt and want to keep it as close
>> as possible to the old behavior set
>>
>> export LANG=C.ISO-8859-1
>> export LC_TIME=C
>>
>> in .profile

this change modify only output display.

>
> Setting LANG in .profile is too late for bash itself, because that
> will continue to operate in C.UTF-8. That will cause trouble when
> entering non-ASCII characters on the command line, for example, try
> typing an ä or â.

that's exactly what appends.
>
> Therefore you need to set it before bash is invoked, for example in
> cygwin.bat if that's where you're invoking rxvt from.

adding

export LANG=C.ISO-8859-1
export LC_TIME=C

in Cygwin.bat has no effect.

Philippe


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Csaba Raduly-2
On Fri, Jul 9, 2010 at 9:08 AM, philippe wrote:
> adding
>
> export LANG=C.ISO-8859-1
> export LC_TIME=C
>
> in Cygwin.bat has no effect

That's because you need to translate them from bash syntax to cmd.exe syntax:

set LANG=C.ISO-8859-1
set LC_CTIME=C

--
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
Csaba Raduly a écrit :
>
> That's because you need to translate them from bash syntax to cmd.exe syntax:
>
> set LANG=C.ISO-8859-1
> set LC_CTIME=C

OK, it was so simple :-)

Philippe.


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
In reply to this post by Andy Koppe
Andy Koppe a écrit :
>>
>> For your -e option, simply run mintty with a single "-" as the only
>> option, i.e. "mintty -".  That will tell mintty to run an interactive
>> login shell for your user as specified in /etc/passwd.  

if i add in the Cygwin.bat the line

mintty -t myminty -

mintty is launched with the good configuration at startup but there is
an additional  cmd window which doesn't close after the mintty is
launched (but i can close it mnually).


>
> Good advice. Also, it's easiest just to invoke mintty from the start
> menu shortcut in the Cygwin folder that's created when mintty is
> installed. That already has that '-' argument.

just a remark : after the standard cygwin installation I've a single
short cut to Cygwin.bat in the start menu cygwin folder nothing else ...???

Philippe.


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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

Andy Koppe
On 9 July 2010 08:51, philippe wrote:

>>> For your -e option, simply run mintty with a single "-" as the only
>>> option, i.e. "mintty -".  That will tell mintty to run an interactive
>>> login shell for your user as specified in /etc/passwd.
>
> if i add in the Cygwin.bat the line
>
> mintty -t myminty -
>
> mintty is launched with the good configuration at startup but there is
> an additional  cmd window which doesn't close after the mintty is
> launched (but i can close it mnually).

If you invoke it from there, you'll need to precede it with the 'start' command:

start mintty -t myminty -

The cmd window will still flash up briefly though, which you can avoid
by invoking mintty from a shortcut.


>> Good advice. Also, it's easiest just to invoke mintty from the start
>> menu shortcut in the Cygwin folder that's created when mintty is
>> installed. That already has that '-' argument.
>
> just a remark : after the standard cygwin installation I've a single
> short cut to Cygwin.bat in the start menu cygwin folder nothing else ...???

The shortcut should have been created if you installed mintty by
selecting it in Cygwin setup.exe.

Andy

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

Reply | Threaded
Open this post in threaded view
|

Re: configure rxvt on cygwin 1.7.5

philippe-61
Andy Koppe a écrit :
>
> If you invoke it from there, you'll need to precede it with the 'start' command:
>
> start mintty -t myminty -
OK,

thank's for all,

Philippe.


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