window image capture how

Igor Pechtchanski pechtcha@cs.nyu.edu
Wed Jan 14 16:14:00 GMT 2004


Haisam,

/dev is a virtual directory in Cygwin (as Alexander already pointed out).
You may not see it in "ls /", but try "ls /dev/clipboard", and it'll be
there.  A while ago I posted a script to the cygwin list that would create
a real directory and files to allow listing and tab-completion in the
virtual one.  It seemed at the time that the script would soon become
obsolete (once Cygwin had true mkdev), but that's still some way off at
the moment.  So, I'm attaching a new version of this script.  Simply run
it, and then you'll be able to do "ls /dev" and see the device files.
HTH,
	Igor

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> I don't have /dev directory at all!!!!
>
> I wasn't very clear, how do I copy this to WinXP's clipboard?
>
> > On Tue, 13 Jan 2004, Haisam K. Ido wrote:
> >
> >> > How can one capture an image of cygwin window into a winxp
> >> > clipboard and then print/edit etc?
> >>
> >> I'm able to do this (using netpbm) but can I pipe to a clipboard area?
> >>
> >> xwd | xwdtopnm | pnmtopng > /cygdrive/d/TEMP/screen.png
> >
> > /dev/clipboard is available but can not handle images.
> >
> > bye
> >       ago

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton
-------------- next part --------------
#!/bin/sh
# Create devices
# Author: Igor Pechtchanski <pechtcha@cs.nyu.edu>
# Version: 1.0 
#

# Number of devices of a certain type to be created - change if more needed
CREATEDEV=32
# Parameters end here -- you shouldn't have to change anything below this line

# Actual /dev directory
DEVDIR="$(cygpath -au "C:/$(cygpath -aw /dev)" | sed 's,/c/\(.\):/,/\1/,')"
# Sequence of services to generate
ALL="$(seq -s " " 0 $(expr $CREATEDEV - 1))"

error() { echo "$@" && exit 1; }

[ -e "$DEVDIR" -a ! -d "$DEVDIR" ] && \
   error "$DEVDIR exists and is not a directory"
[ ! -e "$DEVDIR" ] && \
   (mkdir "$DEVDIR" || error "Unable to create $DEVDIR")
[ -w "$DEVDIR" ] || error "$DEVDIR exists, but isn't writeable"
cd "$DEVDIR" || error "Unable to cd to $DEVDIR"

# - console (1,*)
for i in conin conout tty; do touch ./"$i"; done
# - tty master (4,*)
for i in ttym; do touch ./"$i"; done
# - tty (5,*)
for i in $ALL; do touch ./"tty$i"; done
# - pty master (6,*)
for i in ptmx; do touch ./"$i"; done
# - serial (7,*)
for i in $ALL; do touch ./"ttyS$i"; done
#   TODO: should we do com* as well?
# - windows (12,*)
for i in windows; do touch ./"$i"; done

# - floppy (17,0..15)
for i in 0 1 2; do touch ./"fd$i"; done
# - cdrom (17,16..31)
for i in 0 1 2; do touch ./"scd$i"; done
# - hard disks (17,32..223)
for j in a b c; do for i in "" 1 2; do touch ./"sd$j$i"; done; done
# - tape [rewind] (18,0..127)
for i in 0 1 2; do touch ./"st$i"; done
# - tape [norewind] (18,128..255)
for i in 0 1 2; do touch ./"nst$i"; done

# - null (19,*)
for i in null; do touch ./"$i"; done
# - zero (20,*)
for i in zero; do touch ./"$i"; done
# - random (21,*)
for i in random urandom; do touch ./"$i"; done
# - mem (22,*)
for i in mem port; do touch ./"$i"; done
# - clipboard (23,*)
for i in clipboard; do touch ./"$i"; done
# - dsp (24,*)
for i in dsp; do touch ./"$i"; done

# Create pipes
for i in pipe piper pipew; do touch ./"$i"; done
# Create sockets
for i in tcp udp streamsocket dgsocket; do touch ./"$i"; done

# Create symbolic links
[ ! -e console ] && ln -s tty ./console
[ ! -e floppy ]  && ln -s fd0 ./floppy
[ ! -e cdrom ]   && ln -s scd0 ./cdrom
[ ! -e tape ]    && ln -s st0 ./tape
[ ! -e audio ]   && ln -s dsp ./audio



More information about the Cygwin-xfree mailing list