Re: How to set the colors of terminfo's standout mode?

2004-04-29 Thread Owen Rees
--On Wednesday, April 28, 2004 16:54:37 -0500 Alejandro López-Valencia 
wrote:

At 07:56 a.m. 28/04/2004, Frank Slootweg wrote:

  Is there a place where all these (I assume ANSI) escape sequences for
colors are listed? When I have that information, I can probably untic an
existing terminfo entry, modify it and tic it back to another name and
use that.
The one I use came with the documentation of an ftp/sftp client I use,
yafc. Tis information is very hard to come by if one is in a bind, so
I'll include it here. Yafc's info file says:
The escape sequences are defined in ECMA-048, a link to the PDF is at
. 
This has also been adopted as ISO 6429, but ISO does not offer a free 
downloadable version.

It is not the easiest of documents to decipher, but the colour codes are on 
page 62, part of the section "8.3.117 SGR - SELECT GRAPHIC RENDITION".

You can string together many codes between the 'ESC[' and 'm', separated by 
semicolons, but which ones work varies depending on what has been 
implemented in the kind of terminal, and perhaps also on other settings.

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


Re: mkpasswd group

2005-12-22 Thread Owen Rees

--On 22 December 2005 07:31 -0800 Mike Blanco wrote:


I have run the commands as specified but each time I
open the console window again I get the same message.
I have researched this mailing list as well as google
and found similiar listings but was unable to find
resolutions to this issue.


Here is something that should be equivalent to what eventually worked for 
me running cygwin on XP Pro in an environment where the domain structure is 
non-trivial and the domains are large.


mkgroup -l -d > /etc/group
mkpasswd -l > /etc/passwd
mkpasswd -u "$USERNAME" -d "$USERDOMAIN" >> /etc/passwd


The 'mkgroup' creates a group file containing local groups and some groups 
from some domain that seems to be appropriate in this context.


The first 'mkpasswd' creates a passwd file containing local accounts.

The second 'mkpasswd' creates an entry for my domain account and appends it 
to the passwd file. At least in my case, the group id generated in this 
step matches the right group entry generated by the call of 'mkgroup'.


In my case, using 'mkpasswd -d "$USERDOMAIN"' would have generated tens of 
thousands of entries and taken rather a long time so the use of -u was 
rather important. I also had to specify the domain explicitly, the one that 
is used if I just use -d is not the domain that contains my account.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



Re: Can not Contact Domain Controller

2005-12-23 Thread Owen Rees

--On 22 December 2005 14:08 -0800 Mike Blanco wrote:


So I have tried to do this:

mkgroup -l -d > /etc/group
mkpasswd -l > /etc/passwd
[EMAIL PROTECTED] ~
$ mkpasswd -u "mblanco" -d "bgchemical.com" >
/etc/passwd
mkpasswd (731): [2453] Could not find domain
controller for this domain.

I can never contact my domain controller, which is on
the same machine as the cygwin.


The prompt suggests that you are logged in as 'administrator', not as 
'mblanco' so you will need to set up the account 'administrator' properly 
in cygwin if you want things to work in that context.


As Holger asked, are you sure that "bgchemical.com" is your windows domain 
name? Are you perhaps confusing Internet domains (as in DNS, FQDN and names 
like 'example.com') with Windows Domains (as in PDCs, BDCs and these days 
Active Directory). The terminology is somewhat confusing, especially since 
the two kinds of domain can be linked if the Windows Domain Administrator 
knows what they are doing (see Gary's response to your question). Even if 
the Windows Domain and DNS have been set up so that they work properly 
together, my quick experiment suggests that you do not use a FQDN for the 
'-d' parameter to mkpasswd.


On the subject of domain controllers, if you can log in as administrator on 
a machine that is running a Windows Domain Controller then I would hope 
that you know far more about being Windows Domain Administrator than I 
remember from the Windows NT Admin course I did nearly 10 years ago. If you 
meant that you are running a DNS server then that is an entirely different 
thing.


Two things to do to get some basic information before going any further:

At a Windows Command Prompt type

whoami

This should respond with

DOMAIN\user

For values of DOMAIN and user that match what you use to log in to Windows. 
Then from a cygwin shell type


echo -u "$USERNAME" -d "$USERDOMAIN"

the USERNAME and USERDOMAIN environment variables should be set to the 
values reported by whoami (Note that there is also a whoami command 
provided by cygwin - it is not the same thing as the Windows command).


If the values matched, in a cygwin shell type

mkpasswd -u "$USERNAME" -d "$USERDOMAIN"

This should respond with the line you need to put in your /etc/passwd to 
make things work for the user you are logged in as.


One final point. In the extract quoted above you used '> /etc/passwd' for 
the second call of mkpasswd but this will replace the previous contents of 
/etc/passwd deleting all the local account data. You should use '>> 
/etc/passwd' to append the extra line.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



Re: cygipc-1.13-2.tar.bz2 download

2006-03-21 Thread Owen Rees

--On Monday, March 20, 2006 12:17:31 -0500 Igor Peshansky wrote:


On Mon, 20 Mar 2006, Rajendra S. Gad wrote:

Please inform me where I will have better instruction for installing and
configuring DSpace on this plateform.


I have no idea what DSpace is, but if it does indeed require Cygwin tools
under Linux, then it's really out of this list's domain.  I'd suggest
asking whoever distributes DSpace for help in configuring it.


DSpace <http://www.dspace.org/> is a digital repository system. The web 
site has links to code (at SourceForge), installation documentation, FAQ, 
mailing list, Wiki etc. and that would be the best place to look for help. 
There is also a quite long list of installations all around the world.


The SourceForge dspace project mentions Cygwin, but only as one possible 
O/S you could use. (Yes, I know Cygwin is not an O/S in its own right, but 
that is the heading where it appears.)


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


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



Re: useradd & user ids

2006-04-24 Thread Owen Rees

--On 21 April 2006 17:18 +0200 Corinna Vinschen wrote:


You should see the RIDs in big installations with > 100.000 users...


[...]


You didn't have a look into http://cygwin.com/cygwin-ug-net/ntsec.html
lately, I assume.  The RID is mentioned right at the start. ;-)


I did not see any mention of 1 there but 'mkpasswd -l -c' offers me an 
entry with a uid that is my 6-digit RID plus 10000.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



Re: useradd & user ids

2006-04-24 Thread Owen Rees

--On 24 April 2006 16:50 +0200 Corinna Vinschen wrote:


but 'mkpasswd -l -c' offers me an
entry with a uid that is my 6-digit RID plus 1.


The -c option always adds the default offset.  It's not intended for
local accounts anyway.


It's not just -c that adds the 1:

 mkpasswd.exe -d $USERDOMAIN -u $USERNAME

also gives a uid that is RID+1.

The ntsec page mentions using mkpasswd and mkgroup but does not explain how 
the uid or gid is chosen. I think my comment was prompted by the mention of 
numbers of 4 digits earlier in this thread. Having a 6-digit RID for my 
domain account I can see that the uid generation does straightforward 
arithmetic and not some sort of string processing. (Is it really 19106 this 
year? Some people wrote code that thinks so.)



--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



Re: find missing parameter

2006-06-30 Thread Owen Rees

--On 30 June 2006 02:42 -0700 Brian Dessent wrote:


First, -exec is a bad way to do this.  It will have to fork/exec a copy
of rm once for each file to be deleted, which is extraordinarily slow
under Cygwin.  Use xargs instead:

find . -name db\* -mtime +2 -type f -print0 | xargs -0 rm

This will result in rm being called only once with all the filenames to
delete as arguments (unless the total length is too great to fit on one
command line, in which case rm will be called as many times as
necessary, but still much less than once per file.)


Provided that your version of cygwin (specifically findutils) is reasonable 
recent, you can use


find  . -name "db*" -mtime +2 -type f -exec /bin/rm {} +

to do more or less the same as with xargs.

--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



RE: bad installation ?

2005-03-21 Thread Owen Rees
--On 12 March 2005 09:30 + John Morrison (Cygwin) wrote:
(with reply-to cygwin-apps, but I can't because I am not subscribed to that 
list)

Can't help there - I don't maintain mkpasswd's man page.  Personally I
didn't know that your user could be in a different domain from the one
where it is defined!  Oh well, live and learn.
Suggestions to improve things...?
It might be worth mentioning the environment variables USERNAME and 
USERDOMAIN as in

mkpasswd -u $USERNAME -d $USERDOMAIN
This may be useful to people who have a domain login in an environment 
where there is a non-trivial domain structure.

You might also think that 'mkpasswd -l -c' would give you an entry for the 
current domain user that has the same group id as you get by using the 
invocation shown above, but this is not necessarily so.

--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK

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


Re: cygwin/x symantec antivirus conflict (fixed in snapshot?)

2004-10-14 Thread Owen Rees
--On 11 October 2004 00:06 -0400 Christopher Faylor 
<[EMAIL PROTECTED]> wrote:

So, I'd appreciate reports on the latest snapshot.  Does it fix any
problems?  Cause any problems?  No change?
I have XP Pro and Symantec AV - the 20041010 snapshot fixes the slowness I 
was having with emacs/X locally and X forwarded over SSH, and with no 
problems observed so far. The severe performance problems appeared some 
time in August IIRC, and my first impression is that the performance is now 
better than before the problems.

Regards,
Owen Rees <[EMAIL PROTECTED]>
Hewlett Packard Laboratories, Bristol, UK
tel: +44 117 312 9439 fax: +44 117 312 9153
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: cygwin forgets CTRL key press

2005-09-16 Thread Owen Rees
A quick test with xev under both Linux and Cygwin/X on two systems I have 
here shows a key release event for CTRL about 4 seconds after I release 
whatever other key I pressed - I was still holding the CTRL key down!


I also see this in a standard Windows Command Prompt window (i.e. Cygwin 
not involved) but it is harder to judge the delay there.


I suspect it may be the keyboard or perhaps the KVM switch, but at least 
for me it is not Cygwin specific.


It also happens for SHIFT, and probably other modifiers too, but I have not 
tested that.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


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



Re: copying and pasting in the terminal window?

2006-08-25 Thread Owen Rees

--On 24 August 2006 10:39 -0700 Eric Hanchrow wrote:


Igor> FWIW, my main gripe with Console is that it doesn't
Igor> understand line wrapping, so cutting and pasting a line that
Igor> wraps multiple times results in multiple lines.

Yup.  And as far as I know, there's no way to tell the console "please
save the accumulated scrollback into a file".  But then I don't think
rxvt can do that either :-)


You can select all the available scrolled text with both Console and rxvt 
(Console scrolls when you drag off the top/bottom and extends the 
selection, rxvt extends the selection with a right mouse click so you can 
select, scroll, right click).


Once you have copied it all, "cat >somefile" then paste, CR ^D will get it 
into a file. Perhaps not quite as simple as having a 'save' option, but not 
too hard to do.


If you are using rxvt, long lines that wrapped on display will be long 
lines in the file, With Console, there will be line breaks wherever it 
wrapped.


In the context of copying and pasting in a window, I find rxvt far superior 
to Console because of the way it handles long lines (as well 
copying/pasting the way X does without requiring that X be running).


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK



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



Re: copying and pasting in the terminal window?

2006-08-25 Thread Owen Rees

--On Friday, August 25, 2006 14:25:00 +0200 Marko Bozikovic wrote:


As the author of Console, I'd like to know how does rxvt handle long lines
when copying. I might be able to improve Console :-)


The trouble with having chosen "Console" as the name of your project is 
that Microsoft refers to the thing you get by default in a standard Windows 
system when you ask for a command prompt as "windows console" if they are 
being explicit, and "console" when being less explicit. This can lead to 
confusion and misunderstandings.


I was referring to Microsoft's "Windows Console" (as it appears in headings 
of various MSDN articles), the thing you get running bash if you start up a 
shell window in a conventional Cygwin installation.


As for rxvt, it's available as a cygwin package if you want to know more 
about it.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


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



Re: String concatenation and if-fi constructs in bash fail

2006-11-09 Thread Owen Rees

--On Thursday, November 09, 2006 12:32:15 +0100 Borislav Tomov wrote:


Example results:

one
+ne
+two
The number 2: two
 + twos one



Example result:
   for line XX which is the last +1 line of the script, the
following message is displayed

script_path: line XX: syntax error: unexpected end of file


This is not Cygwin specific. You get the same results on Linux provided 
that you copy the scripts across in binary mode preserving the \r 
characters at the ends of the lines.


See the archives for much discussion of bash and \r.

--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


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



Re: Spurious [ANNOUNCEMENT]s

2007-03-09 Thread Owen Rees

--On Friday, March 09, 2007 09:26:13 -0500 Norton Allen wrote:


These spurious [ANNOUNCEMENT] subjects seem to be popping up from a
number of people. It seems unlikely that they are all doing this
intentionally (though I agree the quoting must be a mailer problem.) I
wonder if there isn't some way the cygwin.com mailman installation
sometimes gets confused and modifies the subject line.

Oliver, I don't suppose you have a copy of one of your messages in your
Sent folder that you could send along with full headers to show that it
didn't have an [ANNOUNCEMENT] subject when it left your machine?


It looks to me as if they are happening on messages sent via the nabble 
forum. For example,

<http://cygwin.com/ml/cygwin/2007-03/msg00286.html> has this at the end:

View this message in context: 
http://www.nabble.com/copy-paste-tf3374100.html#a9392075

Sent from the Cygwin Users mailing list archive at Nabble.com.

If you follow that link the message does not have the [ANNOUNCEMENT] in the 
subject when displayed there.


--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


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



Re: strange behavior with perl v 5.8.8

2007-09-27 Thread Owen Rees

--On Thursday, September 27, 2007 11:14:09 AM -0400 Andrew Louie wrote:


when incrementing by 0.1 i get a strange behavior where at some
arbitrary  number, it will append 0.99 to the end of the
number.


This is rounding error and applies to all computer systems and all 
programming languages that use fixed size number representations. It can be 
fatal - for example see 
<http://www.ima.umn.edu/~arnold/disasters/patriot.html>.


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

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



Re: More questions about mkgroup and mkpasswd

2007-12-04 Thread Owen Rees

--On 30 November 2007 10:54 -0500 Larry Hall (Cygwin) wrote:


It gathers information from the domain controller and adds it to these
files.  This should include all domain users and groups.  This can be
overkill but the good thing is that if it doesn't complain in the process
or take way too long to generate, it just works.


If there are tens of thousands of users in the domain who are never going 
to use the machine and probably also tens of thousands of groups that will 
never need to be known on the system it does take a bit too long.


I have found that the /etc/passwd created by the postinstall script is fine 
but the /etc/group needs to be fixed. I have found that this creates a 
group file that works for me.


/bin/mkgroup -l >group
/bin/mkgroup -d -g "Domain Users" >>group

Things may get a bit more complicated if your computer account and your 
user account are in different domains but since I am not in that situation 
any more, I can't provide and details based on current experience.


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

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



Re: Finding either boot time or login time

2009-01-30 Thread Owen Rees

--On 30 January 2009 10:58 -0500 Brian Mathis wrote:


I've noticed that, on Vista, "net stats srv" always seems to return
1980, while systeminfo returns the correct result.


On this Vista system right now "net stats srv" says:

 Statistics since 27/01/2009 16:04:50

systeminfo says

 System Boot Time:  29/01/2009, 12:13:49

There is an event in the event log:

Log Name:  System
Source:EventLog
Date:  27/01/2009 16:04:44
Event ID:  6013
Task Category: None
Level: Information
Keywords:  Classic
User:  N/A
Computer:
Description:
The system uptime is 39 seconds.

There is nothing in the event log near 29/01/2009, 12:13:49 that suggests a 
reboot happened then, and I don't think I rebooted then and the latest 
USER32/1074 "Shutdown Type: restart" was at 27/01/2009 14:44:39.


A later event says:

Date:  30/01/2009 12:00:59
The system uptime is 85630 seconds.

Which is consistent with the 29/01/2009, 12:13:49 time and so almost 
certainly wrong.


This is a dual core laptop that has been in hibernation since booting so 
make what you will of what the numbers say. If Windows does not have a way 
to report last boot time accurately then there is not really anything 
cygwin can do to get around that.


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN


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



RE: Finding either boot time or login time

2009-02-02 Thread Owen Rees

--On 02 February 2009 11:54 -0500 Cooper, Karl \(US SSA\) wrote:


I don't know perl, but I did try both of these one-liners on my
Cygwin 1.7 setup, and the output differs (by one second).  I thought
that was interesting.


I get a one second difference between the two formulae as well (due to the 
use of 'int' in one but not the other) but that is insignificant compared 
to the 1 hour and 43 minutes by which both are wrong (and that is since 
rebooting at 08:57 this morning).


As far as I can tell, uptime does not include time spent in hibernation (or 
suspend/sleep probably).


A little web searching suggests that not counting sleep time is probably 
consistent with recent Linux behaviour.


I also noticed that the Windows Vista 'systeminfo' command gives the same 
wrong answer for "System Boot Time".


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN


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



Re: side effects after installing gcc-3.4.4.999

2009-03-03 Thread Owen Rees

--On Monday, March 02, 2009 19:08:58 + Dave Korn wrote:


Ah, look, it's not that the
prompt is getting lost: it's just that GCC's output comes out after the
prompt for some reason.


That looks as if gcc launches a child process then exits without waiting 
for it. The command processor issues its prompt before the gcc child 
process writes its message.


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

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