public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: cygwin-xfree@cygwin.com, haisam@ido.org
Subject: Re: window image capture how
Date: Wed, 14 Jan 2004 16:14:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.56.0401131432370.2663@slinky.cs.nyu.edu> (raw)
In-Reply-To: <59624.164.86.99.3.1074021735.squirrel@ido.org>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1537 bytes --]

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

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2300 bytes --]

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


  parent reply	other threads:[~2004-01-14 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13 12:25 Haisam K. Ido
2004-01-13 14:01 ` Alexander Gottwald
2004-01-13 14:48 ` Haisam K. Ido
2004-01-13 15:21   ` Alexander Gottwald
2004-01-13 19:28     ` Haisam K. Ido
2004-01-14 12:21       ` Alexander Gottwald
2004-01-14 16:14       ` Igor Pechtchanski [this message]
2004-01-13 14:59 ` Igor Pechtchanski
2004-01-13 14:24 Dawson, David W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.56.0401131432370.2663@slinky.cs.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin-xfree@cygwin.com \
    --cc=haisam@ido.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).