Suggestion: Add run-parts to Cygwin.

2021-06-29 Thread Joe Smith via Cygwin
The gist is that one can use Windows Task Manager to start a single

bash script with elevated privileges and that script can run the scripts

in a given directory, with elevated privileges.  Various Linux

distributions use /etc/cron.{daily,weekly,monthly} for this purpose.


$ head -5 /usr/bin/run-parts
#!/bin/bash# Name: /usr/bin/run-partsModified by Joe Smith
(joeinwap,gmail)
# Purpose: Runs jobs sequentially at regular intervals
(daily,weekly,monthly)# Concept taken from Debian, copied from RHEL-5,
modified for Cygwin.
# See end for "How to run cron jobs with elevated privs on Cygwin".
#!/bin/bash
# Name: /usr/bin/run-parts  Modified by Joe Smith (joeinwap,gmail)
# Purpose: Runs jobs sequentially at regular intervals (daily,weekly,monthly)
# Concept taken from Debian, copied from RHEL-5, modified for Cygwin.
# See end for "How to run cron jobs with elevated privs on Cygwin".

### Set ENV to run under Windows Task Scheduler ###
export SHELL=/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export MAILTO=root  # See also /etc/ssmtp/ssmtp.conf
export HOME=/root
export USER=root

# keep going when something fails
set +e

if [ $# -lt 1 ]; then
echo "Usage: run-parts "
exit 1
fi

if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit 1
fi

### Log STDOUT and STDERR since Task Scheduler is not the same as crond.
LOGFILE=/var/log/cron.log
TMPFILE=/var/log/run-parts.log
exec >$TMPFILE 2>&1

# Ignore *~ and *, scripts
start_time=`date`
for i in $1/*[^~,] ; do
[ -d $i ] && continue
# Don't run *.{rpmsave,rpmorig,rpmnew,swp} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
[ "${i%.swp}" != "${i}" ] && continue
[ "${i%,v}" != "${i}" ] && continue

if [ -x $i ]; then
$i 2>&1 | awk -v "progname=$i" \
  'progname {
   print progname ":\n"
   progname="";
   }
   { print; }'
fi
done
end_time=`date` # Merge tmp log with /var/log/cron

if [ -s $TMPFILE ]; then
  echo "Started: $start_time"   >> $LOGFILE
  cat   $TMPFILE>> $LOGFILE
  echo "Finished: $end_time">> $LOGFILE
  echo ""   >> $LOGFILE
  :   > $TMPFILE
fi

exit 0

cat <<'EOM'
"How to run cron jobs with elevated privs on Cygwin".

This procedure has been used with Cygwin running on Vista or Windows 7, 10.

# Here is an example of a Linux-style /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
#1  * * * * root run-parts /etc/cron.hourly
02 22 * * * root run-parts /etc/cron.daily
22 22 * * 0 root run-parts /etc/cron.weekly
42 22 1 * * root run-parts /etc/cron.monthly

###

The second column (hours) is 4 for Linux, which is fine for servers, but
for laptops, values like 0 (midnight) or 22 (10pm) may be more appropriate.

Start -> All Programs -> Accessories -> System Tools -> Task Scheduler

Task Scheduler: Create Basic Task (do this 3 times)
  Name: cron-daily, cron-weekly, or cron-monthly
  Description: Runs cygwin programs with elevated privs.
Trigger:
  Daily,   10:02:00pm, recur every 1 days
  Weekly,  10:22:00pm, recur every 1 weeks on Sunday
  Monthly, 10:42:00pm, recur all months on the 1st
Action: Start a program
  Program:   C:\cygwin64\bin\bash.exe
  Arguments: /usr/bin/run-parts /etc/cron.daily
 or: /usr/bin/run-parts /etc/cron.weekly
 or: /usr/bin/run-parts /etc/cron.monthly
  Start in:  C:\cygwin64\bin
Finish: Open the Properties dialog when finished.
General:
  Run whether user is logged on or not
  Do not store password
  Run with highest privileges
Conditions:
  Wake the computer to run this task
Settings:
  Run task as soon as possible after a scheduled start is missed
  Stop the task if it runs longer than: 1 hour

Populate the directories with shell scripts or symlinks to binaries.
ln -s /usr/bin/updatedb /etc/cron.daily

I used "ln -s /usr/bin/run-parts /etc/cron-parts" so that this
file can be easily found using "ls -l /etc/cron*".


   joeinwap,gmail
EOM

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


Using /etc/cron.{daily, weekly, monthly} on Cygwin (/usr/bin/run-parts)

2021-06-09 Thread Joe Smith via Cygwin
Please add 'run-parts' to Cygwin.  I have been using the attached program
(copied from Debian) successfully with Vista, Windows-7, and Windows-10.

mintty screen dump

#!/bin/bash
# Name: /usr/bin/run-parts  Modified by Joe Smith (joeinwap,gmail)
# Purpose: Runs jobs sequentially at regular intervals (daily,weekly,monthly)
# Concept taken from Debian, copied from RHEL-5, modified for Cygwin.
# See end for "How to run cron jobs with elevated privs on Cygwin".

### Set ENV to run under Windows Task Scheduler ###
export SHELL=/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export MAILTO=root  # See also /etc/ssmtp/ssmtp.conf
export HOME=/root
export USER=root

# keep going when something fails
set +e

if [ $# -lt 1 ]; then
echo "Usage: run-parts "
exit 1
fi

if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit 1
fi

### Log STDOUT and STDERR since Task Scheduler is not the same as crond.
LOGFILE=/var/log/cron.log
TMPFILE=/var/log/run-parts.log
exec >$TMPFILE 2>&1

# Ignore *~ and *, scripts
start_time=`date`
for i in $1/*[^~,] ; do
[ -d $i ] && continue
# Don't run *.{rpmsave,rpmorig,rpmnew,swp} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
[ "${i%.swp}" != "${i}" ] && continue
[ "${i%,v}" != "${i}" ] && continue

if [ -x $i ]; then
$i 2>&1 | awk -v "progname=$i" \
  'progname {
   print progname ":\n"
   progname="";
   }
   { print; }'
fi
done
end_time=`date` # Merge tmp log with /var/log/cron

if [ -s $TMPFILE ]; then
  echo "Started: $start_time"   >> $LOGFILE
  cat   $TMPFILE>> $LOGFILE
  echo "Finished: $end_time">> $LOGFILE
  echo ""   >> $LOGFILE
  :   > $TMPFILE
fi

exit 0

cat <<'EOM'
"How to run cron jobs with elevated privs on Cygwin".

This procedure has been used with Cygwin running on Vista or Windows 7, 10.

# Here is an example of a Linux-style /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
#1  * * * * root run-parts /etc/cron.hourly
02 22 * * * root run-parts /etc/cron.daily
22 22 * * 0 root run-parts /etc/cron.weekly
42 22 1 * * root run-parts /etc/cron.monthly

###

The second column (hours) is 4 for Linux, which is fine for servers, but
for laptops, values like 0 (midnight) or 22 (10pm) may be more appropriate.

Start -> All Programs -> Accessories -> System Tools -> Task Scheduler

Task Scheduler: Create Basic Task (do this 3 times)
  Name: cron-daily, cron-weekly, or cron-monthly
  Description: Runs cygwin programs with elevated privs.
Trigger:
  Daily,   10:02:00pm, recur every 1 days
  Weekly,  10:22:00pm, recur every 1 weeks on Sunday
  Monthly, 10:42:00pm, recur all months on the 1st
Action: Start a program
  Program:   C:\cygwin64\bin\bash.exe
  Arguments: /usr/bin/run-parts /etc/cron.daily
 or: /usr/bin/run-parts /etc/cron.weekly
 or: /usr/bin/run-parts /etc/cron.monthly
  Start in:  C:\cygwin64\bin
Finish: Open the Properties dialog when finished.
General:
  Run whether user is logged on or not
  Do not store password
  Run with highest privileges
Conditions:
  Wake the computer to run this task
Settings:
  Run task as soon as possible after a scheduled start is missed
  Stop the task if it runs longer than: 1 hour

Populate the directories with shell scripts or symlinks to binaries.
ln -s /usr/bin/updatedb /etc/cron.daily

I used "ln -s /usr/bin/run-parts /etc/cron-parts" so that this
file can be easily found using "ls -l /etc/cron*".


   joeinwap,gmail
EOM

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


The -X option to unzip-6.00 does not work.

2014-09-07 Thread Joe Smith
   On Unix, support restoration of 32-bit
   UID/GID data using the new "ux" IZUNIX3
   extra field introduced with Zip 3.0.

The -X option does not work as advertised.

Problem: Files extracted with unzip-6.00.12fc20 are owned by root:root
even when -X is specified.

Diagnosis: The code for -X depends on preprocessor definitions that
are never defined.

See comment #5 in
'Does "unzip -X" work in Info-ZIP UnZip 6.00?'
http://www.linuxquestions.org/questions/linux-software-2/does-unzip-x-work-in-info-zip-unzip-6-00-a-4175476765/#post5026340

--
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



Re: BitDefender again

2009-08-28 Thread Joe Smith


"Michael Kairys"  wrote in message 
news:h73co7$tt...@ger.gmane.org...

Thanks for the replies...


the suggestion to use a base address in the 0x3500 area (or indeed
any of the others they mentioned) is going to horribly frag your heap and 
bork

your maximum allocatable memory limit, isn't it?


I don't know. How would I tell?


 Wonder if it wouldn't work just as well to rebase /their/ DLL?


I don't know. Sounds scary given the liberties an AV program seems to take 
with the operating system... Should I try? How would I?


If you can figure out which DLL they are injecting, you can do exactly what 
they tell you to do, except using their DLL instead of the cygwin DLL.


Or you can go the easy route, and follow the instructions they have provided 
to rebase cygwin.dll. The person who wrote the message you quoted is 
obviously familar with Cygwin, since he has you use Cygwin's rebase utility. 
This indicates to me that he has actually tried the solution he mentions, 
and it has fixed the problem for him. 




--
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



Re: Question of the necessity of rebaseall

2009-05-26 Thread Joe Smith


"Larry Hall (Cygwin)"  wrote:

Andy Koppe wrote:

Remember, the semantics of fork is that BOTH processes (the parent and
child) must see the SAME memory, and that includes all shared libraries
being mapped at the SAME location.  But since Windows doesn't provide a
native fork, the child must remap everything that the parent had, and 
hope

that it lands at the same place.  Rebasing improves the chance that the
child will remap, because there are fewer dlls to be remapped in an
arbitrary order.


Shudder. I wonder whether MS's own POSIX layer, the snappily named
"Services for Unix Applications", has to go through the same
contortions or whether there isn't some hidden fork support somewhere.


They don't use the Win32 subsystem so they aren't subject to its
restrictions but are instead locked in there own little subsystem



True, but from an application's perspective subsystems are mostly just an 
API, in some places basically just translating calls to the Native NT API. 
That API can also be used directly by programs. Might there not be some 
underdocumented NT Native API that provides better support for forking?


I know that the answer is yes. The SFU subsystem uses these calls to 
implement fork. Unfortunately, the calls are poorly documented, and For 
compatibility reasons it is best for code not maintained by Microsoft to 
minimize the use of Native NT calls, and stay with the documented calls when 
possible.


I'm pretty sure that combined with the insufficent documentation to use use 
the NT API calls are why Cygwin does not implement fork that way.


But I'm also pretty sure you knew all that already, so I supose this post is 
more of an elaboration than a contradiction. 




--
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: HEADS UP:Problem with svn under latest snapshot.

2007-08-08 Thread Joe Smith


"Thomas Berger" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]


It could be a matter of interference with TortoiseSVN.


No. It could not. I don't have tortoiseSVN.



--
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/



HEADS UP:Problem with svn under latest snapshot.

2007-08-07 Thread Joe Smith
Just in case you were not aware, Something has broken svn in the latest 
snapshot. (Actually at least the two most recent snapshots have this 
problem).


Here is the error: "svn: Can't move '.svn/tmp/entries' to '.svn/entries': 
Permission denied"



LS output:
$ ls -al .svn
total 2
drwxr-xr-x+ 6 Owner None   0 Aug  7 16:11 .
drwxr-xr-x+ 3 Owner None   0 Aug  7 16:09 ..
-r--r--r--  1 Owner None 192 Aug  7 16:09 entries
-r--r--r--  1 Owner None   2 Aug  7 16:09 format
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 prop-base
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 props
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 text-base
drwxr-xr-x+ 5 Owner None   0 Aug  7 16:11 tmp

$ ls -al .svn/tmp
total 1
drwxr-xr-x+ 5 Owner None   0 Aug  7 16:11 .
drwxr-xr-x+ 6 Owner None   0 Aug  7 16:11 ..
-rw-r--r--  1 Owner None 192 Aug  7 16:11 entries
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 prop-base
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 props
drwxr-xr-x+ 2 Owner None   0 Aug  7 16:09 text-base


If I were to take a guess, i'm thinking it the "-r--r--r--" permission on 
.svn/entries that is causing the problem.
Something probably changed in the permissions handling, causing the 
breakage. 




--
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: ntfs ObCaseInsensitive & cygwin?

2007-07-31 Thread Joe Smith


"Corinna Vinschen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On Jul 31 11:21, Morgan Read wrote:

Hi Folks

Lots of refs to the case sensitivity nightmare in archives, but couldn't
find any to ntfs' obcaseinsensitive registry option
(HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\
dword:ObCaseInsensitive see here: http://support.microsoft.com/kb/817921)

So, does anyone know:
* If this provides case sensitivity to cygwin (as it seems to to
SFU/Interix)?






* If there's a way to query the system to see if it "thinks" it's
working?...


Only under a non-Win32 subsystem.


Umm.. CreateFile() is a win32 API command.
http://msdn2.microsoft.com/en-US/library/aa363858.aspx
It supports a "FILE_FLAG_POSIX_SEMANTICS" attribute, which claims to allow 
case sesitive files? Does that not do anything? I would have thought that 
would give case sensitive access through the win32 API if ObCaseInsensitive 
was set to 0.


I agree however, that for the most part the Win32 subsystem's API does not 
really have much support for case-sensitive access.
It would make better sense to utilize the native NT API for case sensitive 
access.




--
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: unlink()'s not quite POSIX behavior.

2007-07-31 Thread Joe Smith


"Joe Smith" wrote in message news:[EMAIL PROTECTED]

Nevermind. I see that the relavent changes to NT_unlink are just very 
recent, and the only problem is that the latest cygwin dll does not incldue 
those changes yet.
You can ignore the previous message. 




--
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/



unlink()'s not quite POSIX behavior.

2007-07-31 Thread Joe Smith
It appears that currently unlink will not immedately remove a file (that has 
only one link) if a handle to the file is open, but will flag it for 
deletion once the file handle closes.


This is causing a problem with Python 3000.

POSIX says:


When the file's link count becomes 0 and no process has the file open,
the space occupied by the file shall be freed and the file shall no longer
be accessible. If one or more processes have the file open when the last
link is removed, the link shall be removed before unlink() returns, but
the removal of the file contents shall be postponed until all references
to the file are closed.


AIUI,
Windows NT had a design goal of allowing a complient implementation
of POSIX to be implmented in a subsystem (along with userespace utilities).
(Hence services for unix).


Could we at least simulate the behavior by moving the file out of the way 
(simultaionsly renaming it to something unique),
and forcing it into the delqueue? (by Setting the 
FILE_DISPOSITION_INFORMATION's DeleteFile flag to true?)


Wait a moment, that looks to be exactly what unlink_nt is doing?
What is going on?

(The problem is with a call in Python3k getting a "Permission denied" (ERRNO 
13) error when attempting to create a file shortly after it has been deleted 
with unlink. That seems to be consistant with standard windows behavior for 
deleting a file, as trying to create it again before the last handle is 
closed would return an ERROR_ACCESS_DENIED.)


However, it looks like with unlink_nt that should not be happening, right?



--
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: Eliminating -mno-cygwin from gcc.

2007-02-07 Thread Joe Smith


"Christopher Faylor" wrote in message 
news:[EMAIL PROTECTED]

[snip]
I guess this means that I need to generate a cross-binutils, too.


Is a cross-binutils really needed? Which (if any) of the binutils act 
differently when targeted at MingW32

than when targeted at Cygwin?

(I've never worked with a cross toolchain where the executable format of the 
host and target are the same.) 




--
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: Missing Programs

2006-12-23 Thread Joe Smith


"Harold Fuchs" wrote in message news:[EMAIL PROTECTED]

Larry Hall (Cygwin) wrote:

[snip]


A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


I'll treat myself for Christmas ;-)
Thanks, Harold
PS I disagree fundamentally with your sentiment about top posting: (a) I
come from an era when the *only* way to get e-mails was on paper (I had
e-mail in 1979 and was by no means the first in my company) and (b) if you
have been following the conversation, why repeat everything that's been 
said

before coming to the latest point? And if you haven't been following the
conversation then you deserve the pain ;-)


Umm... I'm not sure what you really disagree with. It sounds like you are 
more arguing about quoting in email. The quoting is very important. It helps 
clairify which email is being responded to. (Very important, especially on 
mailing lists) It gives context. etc. But quoting should generally be 
limited to the relevent parts of the mail. There is definately no need to 
repeat everything that has been said before comming to the latest point.


And top posting can be problematic when reply to multiple points in an 
email. It is preferable to place your responses directly after the relevent 
quote.

It is good for clairy and organization.

But this is getting off topic. Please continue on cygwin-talk. (I 
unfortuantle cannot set the followup-to header, because I'm posting via 
Gmane with OE.)




--
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: Which list should cygwin development be discussed on ?

2006-07-01 Thread Joe Smith


"Christopher Faylor" <[EMAIL PROTECTED]> wrote in 
message news:[EMAIL PROTECTED]

On Fri, Jun 30, 2006 at 01:48:14AM +0100, Darryl Miles wrote:

Is my more technical discussion better put onto the cygwin-patches list
?


No.  The mailing list descriptions really are accurate.  If you don't
have a patch, then you shouldn't be sending email to cygwin-patches.



Most cygwin development discussion occurs on the main list or on 
cygwin-apps.
Basically The general rule for cygwin apps appears to be that the first 
messgage in a thread has to
be about creation of new packages, or discussions about packaging policy. 
(Also requests for uploads go to that list).
Then the disussion can drift a little to more general cygwin development, 
but should still be in the context of a specific package.


Also, discussion of the development of setup.exe usually takes place on 
cygwin-apps, because that is the designated list for discussing bugs in 
setup.exe




--
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: 1.0:Question about Cygwin1.dll crashing with DEP/NX

2006-05-30 Thread Joe Smith


"Brian Dessent" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

I'm afraid you are probably not going to find anybody on this list
interested in even considering problems with these ancient versions.  If
you can reproduce the problem you experience with a current Cygwin
snapshot then post more details, otherwise I think you're on your own.
It's kind of like calling Ford and asking if the model-T will run on
unleaded -- so much has changed over the last 7 or so years.


Except that ford might actually provide support for the model-T, because 
Ford
owes its success to that car. Imagine the commercial, and what offically 
supporting

the out of date cars might do to improve Fords image.

A better example might be asking MS tech support about a problem in
Windows 1.0 (except that was more than 7 years ago).


Brian





--
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: The $HOME variable; rxvt and .inputrc

2006-05-17 Thread Joe Smith


"George" wrote in message news:[EMAIL PROTECTED]

1.  Does the admonition against setting $HOME as a Windows environmental
variable still stand, or was that an old wives' tale?

If $HOME is set it windows then it MUST be a windows path, or you can break
other (non-cygwin) programs that respect $HOME. Other than that
setting $HOME is fine, as cygwin will convert the variable to a unix style 
path. 




--
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: "Last" or equiv for Windows login?

2006-05-04 Thread Joe Smith


"Bruce Dobrin" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hi,


Is there a flag for "last" or who or another program (cygwin or other)
that shows me the current and/or previous Windows login user?  (Rather
than the "last" cygwin shell login).  With a combination of cygwin tools
and wmic  I have been able to log almost everything on any given remote
machine...  But I can't figure out how to find out who is/was logged
into the windows console (desktop or whatever you want to call it).  Any
ideas?

Thanks
Bruce Dobrin


I assume you have the ability to install programs, and remotely run programs 
on the given remote machines.
You should be able to use a utility like Microsoft's logparser 
(http://www.logparser.com/) to do this.
Basically log parser allows you use SQL to search the event Log, among many 
other things.


logparser BLURB:
Log parser is a powerful, versatile tool that provides universal query 
access to text-based data such
as log files, XML files and CSV files, as well as key data sources on the 
Windows® operating system
such as the Event Log, the Registry, the file system, and Active 
Directory®. You tell Log Parser what
information you need and how you want it processed. The results of your 
query can be custom-formatted
in text based output, or they can be persisted to more specialty targets 
like SQL, SYSLOG, or a chart.


Most software is designed to accomplish a limited number of specific tasks. 
Log Parser is different...
the number of ways it can be used is limited only by the needs and 
imagination of the user. The world

is your database with Log Parser.





--
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: ":" in filename

2006-03-24 Thread Joe Smith


"Joe Smith"  wrote in message news:[EMAIL PROTECTED]
"Brian Dessent"  wrote in message 

Sorry! -^


--
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: ":" in filename

2006-03-24 Thread Joe Smith


"Brian Dessent" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hiroki Sakagami wrote:


What happens in the below commands?  The ":" in filenames seems to be
a problem.  But I don't understand the rule.


The colon is used by NTFS to signify alternate data streams.  You can
google for more information about this, e.g.
.


Actually it is a limitation of Windows. NTFS supports a "POSIX" filename 
namespace which supports up to 255 unicode (probably utf-16) characters, 
excluding only NUL (0x) and Forward Slash '/'. Window's main subsystem 
does not support the POSIX NTFS file namespace, but I suspect the Windows 
POSIX subsystem (a.k.a. INTERIX) does support the POSIX NTFS file namespace.


Windows's Subsystem system is very interesting, but like many other 
interesting features of Windows NT, it came from overengineering, and is 
amost never used.
(One can render windows virtually worthless by disabling the "Windows" 
subsystem!)


Interestingly NTFS alows some other strange configurations, including files 
that take up zero disk space because the data section is actually included 
in the MFT, and directories with a default datasteam (Thus it would be both 
a file and a directory. No clue how Windows would react to that!)






--
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: gurl (call browser and it an URL)

2006-02-20 Thread Joe Smith


"Igor Peshansky" wrote:

True, except cygstart won't do unconditional 'www*'->'http://www*'
translation if a file with that name exists (e.g., try "touch
www.cygwin.com && cygstart www.cygwin.com").
Igor


Cmd's 'start' command is exactly the same in this respect.
I'm betting that the 'run' applet of windows is also the same, although it 
is hard to know what the cwd of that applet would be.





--
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: 'su' no longer working?

2006-01-05 Thread Joe Smith


"Brian Dessent" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Joe Smith wrote:



It was for this very reason (command-line automated privilege
manipulation) that editrights was written and placed in the 'base'
Cygwin install so that *-config scripts can use it for creating services
that run as non-SYSTEM accounts.

ACK...





--
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: 'su' no longer working?

2006-01-05 Thread Joe Smith
Reply to my own message: Actually Igor's suggestion of just testing the 
context switch is far better. 





--
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: 'su' no longer working?

2006-01-05 Thread Joe Smith


"Eric Blake" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Igor Peshansky on 1/5/2006 3:37 PM:

Hi,

'su' used to be an executable that worked correctly from a SYSTEM-owned
shell, but now it's a shell script that simply prints a "not supported"
message.  Is it possible to resurrect the old "su" executable (that
perhaps prints the same message if run from a non-SYSTEM account)?


Coreutils certainly builds an su executable, but the cygwin distro of su
has been a script since at least 5.2.1 when Corinna was the maintainer; I
only enhanced the script to be a little more useful.  I'll see what I can
do about getting the executable built and running, but no promise on a
timeline; is there any easy run-time test as to whether the current user
is SYSTEM and should try to perform user switching, vs. normal users to
print a warning message that su is relatively useless under cygwin/Windows
semantics?



Well just check that the app has appropriate priveleges.
(Only the app actually needs them, the user running the app does not 
nessisaryally need them)


For passworded user switching:
SE_ASSIGNPRIMARYTOKEN_NAME &&
SE_INCREASE_QUOTA_NAME &&
SE_TCB_NAME

For passwordless user switching:
SE_CREATE_TOKEN_NAME &&
SE_ASSIGNPRIMARYTOKEN_NAME &&
SE_INCREASE_QUOTA_NAME


This is all documented in:
http://cygwin.com/cygwin-ug-net/ntsec.html


You should not cripple to program to being usable only on the system 
account.
It is very much possible to give a user those privleges, and easy on XP pro 
via the group policy editor (according to microsoft. I've never tried it.)






--
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: 'su' no longer working?

2006-01-05 Thread Joe Smith



'su' used to be an executable that worked correctly from a SYSTEM-owned
shell, but now it's a shell script that simply prints a "not supported"
message.  Is it possible to resurrect the old "su" executable (that
perhaps prints the same message if run from a non-SYSTEM account)?


I know. It has been that way for many months (at least on my system). I'm 
surprised you just now noticed it.
It is a bit stupid, as su worked if run under a system account, or if run 
under a user account with the proper priveleges. (Someplace in this mailing 
list are the instructions).
(I know, I gave my main account those once. That let me do 'su SYSTEM' to 
get a system owned shell. :) ) 





--
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: Utility to get IP address of the machine

2006-01-04 Thread Joe Smith

David said:

Probably useless if you're behind any kind of NAT device.
Unless you need the external ip address. Sometimes you need the internal 
address, but other times you need the external address.








--
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: Does "^G" work on Windows 9x/Me?

2006-01-04 Thread Joe Smith




So, maybe I will just cause the system to use MessageBox(MB_OK) aka
MessageBox(0).

MessageBox???



--
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: tar with switches leads to stack dump

2005-12-22 Thread Joe Smith

I still don't see why upstream refuses to update a compressed archive, but
at least it didn't abort.


Gnu tar will not allow the use of '-r or -u' when a tar file is given on 
stdin.


I assume that compressed archives work using tar as a filter, instead of 
using potentially huge temporary files.

This means that '-r or -u' could not work with the compressed archives.



Now a small (ok... mid-sized) rant:

Apparently these operations which (the manual indicates) do not make any 
changes to the body of the
archive, but mearly append more data to the end requires random access to 
the file.


For -r, all that tar should need to do is output the input file in its 
entiretry, except the End_Of_File marker,
then output what 'tar -A filenames' would. Simple... Should have absolutely 
no need to do anything requireing random access.


For -u, things are a bit different.
It should dereference the files. The files should be placed into a dynamicly 
allocated (unfortunate, but I can see
no way around it for archives inputted on std-in) array of a struct similar 
to this:


struct input {
char[] string_that_indicates_where_the_file_is_on_the_disk;
char[] path_inside_the_archive;
int time_file_on_disk_was_last_modified;
bool 
there_is_a_file_with_the_same_path_inside_the_archive_last_modified_at_the_same_time_or_after_

   time_file_on_disk_was_last_modified;
}

Hmm... I guess those strings would also need to go on the heap. Anyway, scan 
the input while duping it to standard out,
setting the bools as needed, again leaving off the the End_Of_File marker. 
Then append what "tar -A filesWithBoolSetToFalse" would output.




--
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: Where is patch?

2005-12-14 Thread Joe Smith


"Lennart Borgman" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Corinna Vinschen wrote:


On Dec 14 19:30, Lennart Borgman wrote:

I am having trouble with patch. My Cygwin patch (and my GnuWin32 patch) 
says it is version 2.5.9. But where is the sources for this? I looked at 
ftp://ftp.gnu.org/gnu/patch and they only have version 2.5.4. How can 
that be?




Cygwin patch is 2.5.8.  The version is taken from some Linux distro, I
don't remember which one.  The sources are where the binaries are, use
setup.exe to pull them on your machine.  As for the upstream sources, I
have no idea.  The bug report list is bug-gnu-utils AT gnu DOT org.

Thanks for the information. It sounds a bit strange that the sources does 
not come from gnu.org however. Something seems to be wrong here. I have 
made a bcc of this message to bug-gnu-utils. I think the newest sources 
should be available at gnu.org and its mirrors.


Well, path 2.5.9 is available from an official gnu server, but is in a very 
strange place:

ftp://alpha.gnu.org/gnu/diffutils/
diffutils? in the main archive it is in its own directory!

Also from what i can tell:
 Nothing from ftp://alpha.gnu.org is or has ever been offical.
 It houses development snapshots.

Note that the above may be incorect, but it is the best I am able to figure 
out.


Actually considering that the changelog of 2.5.9 indicates that it is an 
actual release, it seems likely that it was never moved over to the main 
site only because it was in the wrong directory. 




--
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 I get a sigint when the bash window closed with close window's button ?

2005-11-15 Thread Joe Smith


"Igor Pechtchanski" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On Tue, 15 Nov 2005, Konrad Eisele wrote:


When th cygwin bash window is closed by clicking on the window's close
button the the appliaction gets killed without recieving a sigint or any
atexit called. Is there a way to be able to run cleanup code when the
application is about to be killed?


According to exceptions.cc, a SIGHUP will be sent to bash in this case.
Are you handling the right signal?

BTW, the atexit() callback also should be called -- do you have a simple
testcase to reproduce the problem?
Igor


I know nothing about signals, but this program when run inside bash does not 
seem to run callback() *ever*.
^c does not run it. Closing the bash window does not run it. But if you 
remove the loop then it *is* run.


#include 
void callback()
{
 FILE *current;

current=fopen("test.txt","a");
fprintf(current,"atexit");
}

int main()
{
 atexit(*callback);
 while(1)
 {};
} 




--
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: bug report place

2005-11-06 Thread Joe Smith


"Carl Karsten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




report this as a bug



http://cs.nyu.edu/~pechtcha/cygwin/setup-2.513-1-alpha.exe


Where should bugs be reported?
Please post bugs to this list, but be sure to read and follow the 
instructions found here: http://cygwin.com/problems.html 




--
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: WINE on Cygwin

2005-11-03 Thread Joe Smith



I guess I don't see the point. Isn't Wine an emulator for running
Windows apps on Unix/Linux? If so then why would you need it under Cygwin 
as Cygwin already runs on Windows so if your want to run a Windows apps, 
well then just run the Windows app!


Well how about to support WINE development?
It would be quite nice to be able to run an app under windows and under WINE 
at the same time to help differentiate between wine bugs and software bugs 
(Including Windows bugs).





--
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: error: undefined reference to [EMAIL PROTECTED]'

2005-10-30 Thread Joe Smith


"Fernando Barsoba" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hi,

I'm trying to build a project with sha-1 and md5 implementations from 
http://www.cr0.net:8040/code/crypto/sha1/  (in case it is important 
information)


and I'm getting the following error:


 Incremental build of configuration Debug for project Sha1 

make -k all
Building file: ../sha1.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -osha1.o ../sha1.c
Finished building: ../sha1.c

Building target: Sha1.exe
Invoking: GCC C Linker
gcc -oSha1.exe ./sha1.o
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o)(.text+0xab): 
undefined reference to [EMAIL PROTECTED]'

collect2: ld returned 1 exit status
make: *** [Sha1.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project Sha1

Any idea why is that? It's the first time is happening as far as I 
remember..


Windows compilers actually rename the function called 'main'. I'm not sure 
what the reason is. The most obvious reason is that the code in the crt (c 
runtime) is run before main, but the actual entry point of the application 
(in the crt) is not named main. In Microsoft's crt it is named 
'WinMainCRTStartup' (or  'wWinMainCRTStartup' for unicode applications).


Cygwin uses the same renaming for consistancy (besides, I think it uses 
Microsoft's crt anyway.)



If you are compiling just the files you linked for the included stand alone 
test applicaton (that is the only thing sha1.exe could be)read this:
  The problem is that the code you referenced has no 'main' function. Look 
closely at the code and you will see

  you need to define 'TEST'.

Otherwise if you are trying to use it in a project of your own:
  You need to just include the files in the other project such that they 
are linked directly into the application. If you need
  more assistance you should contact somebody exepirenced with c, and with 
using Eclipse to compile c code. If they are at all
  confused regarding this error message just tell them that it is exactly 
equivelent to a message of

  "undefined reference to `_main'".





--
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: how to get a coredump [was RE: Asterisk Cygwin]

2005-10-27 Thread Joe Smith


"Christopher Faylor" <[EMAIL PROTECTED]> wrote in 
message news:[EMAIL PROTECTED]

On Thu, Oct 27, 2005 at 12:17:15PM -0400, Jason Pyeron wrote:

As I don't use debuggers every day, I am posing this to the list:

On Mon, 24 Oct 2005, Jerris, Michael MI wrote:

With the patch on that bug in mantis, everything compiles great and
starts, but I am getting segfaults when I try to pass calls.  Do you
know how to get a coredump, I don't seem to be able to on my machine,
just a stackdump which is basically useless.



Add "error_start:/usr/bin/dumper.exe" to your CYGWIN environment variable.


Well either that or the man page is slightly wrong.
the manpage says:


One  common way to use  dumper is to plug it into cygwin's Just-In-Time
debugging facility by adding

error_start=x:\path\to\dumper.exe

to   theCYGWIN   environmentvariable.Pleasenotethat
x:\path\to\dumper.exe   is   Windows-style  and  not  cygwin  path.  If
error_start is set this way, then dumper will be started whenever  some
program encounters a fatal error.


That makes it explicit that windows paths must be used, but your post does 
not use it.
Without doing any testing, I'll guess that the man page is out of date. 




--
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: Executable flag

2005-10-26 Thread Joe Smith


Okay, a reproducable example:

Open cygwin. Write 'notepad test.txt'. Notepad opens, write something and 
then save the file. Now do an ll. The file test.txt has been created and 
has the executable flag set. I want it to not be set in such cases.


/David



The problem is that windows programs create files seen by cygwin as 
excecutable. I find this quite annoying myself, as an 'ls' outside a cygwin 
controlled directoy floods my screen with green text. (my 'ls' is an alias 
for 'ls --color'). It would be nice if the default for windows programs was 
the other way around. 




--
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: cygpath feature suggestion

2005-10-03 Thread Joe Smith




In this case, the only PTC required is for the documentation.  Take a look
at 'cygpath --help', the option already exists.  It is just not in the man
page.


I fail to see what he requested. What he wanted was like 'cygpath -pf -' 
except that instead of using colons to seperate the path list, newlines were 
used. I say this is probably a wontfix.


Use of "cygpath -pf -|sed s/:/\\n/g" works fine for me.


cgf





--
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: CTRL-C kills ALL processes, not just foreground process.

2005-09-22 Thread Joe Smith


"Christopher Faylor" <[EMAIL PROTECTED]> wrote in 
message news:[EMAIL PROTECTED]

On Thu, Sep 22, 2005 at 03:47:38PM -0400, Christopher Faylor wrote:

On Thu, Sep 22, 2005 at 03:36:38PM -0400, Joe Smith wrote:

"Big Action" <[EMAIL PROTECTED]> wrote:

Do I only need to replace the cygwin1.dll, or should I download and
extract the entire "make install" tree?


replace the cygwin1.dll I would recomend rebooting afterwards before
testing just to be sure everything is using the new version.


You can't replace a running DLL so this should be unnecessary.  If you
can overwrite cygwin1.dll with a new version then you should be all set.
If this wasn't the case, I'd be rebooting all day long.


I don't know if the above is clear or not but what I was trying to say was
that if anything else was using cygwin1.dll, you wouldn't be able to copy
over it.  You *have* to stop all running cygwin processes before replacing
cygwin1.dll so, given that, there is no reason to reboot if you have
successfully managed to copy over, e.g., c:\cygwin\bin\cygwin1.dll .

cgf
Um... even though there is only one copy of cygwin1.dll on the system, my 
background cygwin/s server causes problems every upgrade. It seems that 
setup does succeed in replacing cygwin1.dll. Bash dies with the version 
mismatch error. But as soon as I kill the x server, everything works.


Unless there is something funky going on it seems the in use dll is being 
replaced. 




--
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: CTRL-C kills ALL processes, not just foreground process.

2005-09-22 Thread Joe Smith


"Big Action" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]


Hi Corinna,

Thanks for the quick reply!


This should be fixed in recent developer snapshots, try the latest from
http://cygwin.com/snapshots/



Do I only need to replace the cygwin1.dll, or should I download and 
extract the entire "make install" tree?


replace the cygwin1.dll
I would recomend rebooting afterwards before testing just to be sure 
everything is using the new version. 




--
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: How do I make /bin/sh=sh

2005-08-23 Thread Joe Smith


"Shankar Unni" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Eric Blake wrote:


Actually, I'm playing with a change to bash, soon to be bash-3.0-12,
where the postinstall script will leave /bin/sh alone if its timestamp
is newer than /bin/bash.


For one release. What happens after the next upgrade to bash?

I thionk he will leave that in the post-install so it will always be like 
that. or at least untill the part of the script making /bin/sh == bash is 
removed. 




--
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: RFE: removing symbolic link / windows shortcut duality

2005-08-13 Thread Joe Smith

Well more on links:
Because cygwin does use windows shortcuts as symbolic links, it will 
automaticly dereference windows links. If the link has a unix path in the 
description field cygwin will use that (or at least I think it uses it, it 
puts it there on  its own links). Otherwise it uses the path information in 
the shortcut, and converts it to a unix path.


Now a comment on relative linking and etc.
There are two sections in a shortcut that that descibe where the target file 
is. One is optional (strictly both are, but such a shorcut would be 
useless). It is known as shellidlist. The other is a simple windows path. 
Shellidlist is always absolute. The path can be a relative path. Windows 
will use the shell id list if available falling back on the path. Therefore 
relative symbolic links are not relative (as far as windows cares) unless 
they lack the shellidlist section. The lack of the shelidlist is also what 
makes the lists uneditable in explorer.exe (as I alluded to in my previous 
message.)


Now for some reason it seems that cygwin will sometimes create shortcuts 
with shellidlist, and othertimes without. (This may be system dependent, OS 
dependent, or perhaps a change between cygwin.dll versions.


It really does not matter though. What we have right now works, and lets 
cygwin resolve shortcuts, and windows resolve cygwin's symbolic links, so 
just leave it alone. 




--
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: RFE: removing symbolic link / windows shortcut duality

2005-08-13 Thread Joe Smith
IIRC Cygwin *is* currently using windows shortcuts for symbolic links. Some 
simple checks confirm this.
The shortcut files are sometimes fully formed such that they are editable by 
right clicking on them, others are only partially formed.


Windows will resolve them, however symbolic links to executables using 
implicit '.exe' or symbolic links to symbolic links does not work correctly.
Those are *not* things that can be fixed because for example the link may 
have originally pointed to file, which was later replaced by another link. 
Cygwin should not scan the drive for all links and update them, for that 
would be absurd.


Besides those two cases, the links work just fine as windows shortcuts. 




--
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: Does Cygwin support System V Message Queues?

2005-08-04 Thread Joe Smith

cygserver?  Is it

additional software we must install?

Users Guide
http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html#using-cygserver




Matt,
Basically to use cygwin's  XSI IPC Message Queues, XSI IPC Semaphores, or 
XSI IPC Shared Memory, you need to do a few simple things. (Assuming Windows 
NT 4.0/2000/XP/2003)


#1. Run  /usr/bin/cygserver-config
#2. Then you might want to edit /etc/cygserver.conf Where you can set some 
IPC related maximums.

#4. reboot
#5. Be certain that the environment variable CYGWIN is set to 'server', do 
this in any way you wish (your POSIX background should make this simple) 
before running your companies programs. Good Luck.






If I knew a way to describe which version of cygwin (.dll?) is installed,


"cygcheck -svr" output as explained at
http://cygwin.com/problems.html

Brian





--
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: Uninstall Cygwin

2005-08-04 Thread Joe Smith



If, one day, I want to uninstall Cygwin. How can I do that? No icon in
Add/remove programs list, no start menu icon... I know there are values 
in the registry, but I don't know what values, so I cannot delete thes 
values. Is there one or more command to uninstall Cygwin?
Else, what can I do? Let it on my disk without using it because I can't 
uninstall it so loose more 1 GO and a half?


Simply remove C:\Cygwin (if that's where you stored it). There are some 
registry entries that can be ignored or use RegEdit to seek and destroy 
entries with Cygnus in them.


Or better than that would be to use setup.exe to uninstall. Then delete 
C:\cygwin 




--
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: ps -p

2005-07-31 Thread Joe Smith



if [ -d c:/ ]
then
  {Cygwin stuff}
else
  {Unix equivalent}
fi


More common (AFAICT) is:
case `uname` in
*CYGWIN* ) {Cygwin stuff};;
*) {Unix equivalent};;
esac



--
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: which command returns incomplete paths that don't work with all commands

2005-07-31 Thread Joe Smith


Is there is a really good reason why the which command should return a 
path

that only cygwin programs can recognize?

F:/ style notation would screw up many shell scripts that curently work just 
fine. 




--
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: problem with starting programs via ssh / cannot see environment variable

2005-07-31 Thread Joe Smith
Are the missing environment variables defined in XP under 'System 
Environment Variables', or only in the environment variables for the 
specific users? 




--
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: Cannot write files if they are hidden

2005-07-22 Thread Joe Smith
I seccond the motion that the windows hidden attribute be ignored. I suspect 
that nearly every user on the list has Explorer.exe set to show hidden 
files. Sice Cygwin is very useful for system administrators, and they almost 
always leave hidden files visable, it makes no sense to treat these files in 
any special way. (Assming that cygwin does). 




--
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: Brief, simple guide to cygwin

2005-07-20 Thread Joe Smith



If someone does have time to correct the misleading things I would be
most grateful, as obviously I do not wish to spread misinformation!


rxvt - this is a 'terminal client' or an alternative to that dos box 
popup. You need it to display various programs (vim, mutt etc.) 
correctly.


I think this can be done using the default dos box, although rxvt is very 
nice because it works well OTOB.


The ISC Bind tools are extremely useful for DNS related queries. Among 
them are "dig", "nslookup", "host".


IIRC Windows comes with an nslookup by default.

I don't personally see anything else wrong, but I probably missed some. 




--
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/