debian/0000775000000000000000000000000012206747764007207 5ustar debian/xtv.10000664000000000000000000000131511460253766010105 0ustar .TH XTV 1 .SH NAME xtv \- Grabs the screen of a remote X display .SH SYNOPSIS .B xtv .I "[options]" .br .SH "DESCRIPTION" .BR xtv grabs the screen of a remote X display to which you have access. It can then continual refresh that screen grab, making a "TV" out of that display. .PP .SH OPTIONS .TP .B \-h Prints out the usage .TP .B \-s refresh_timeout How often to update the screen grab. .TP .B \-d display The display to grab the screen from. .SH BUGS You can't grab the screen from a display of differing bit-depth. Due to the nature of X and what not, this would be particularly difficult to fix. .SH AUTHOR rancurel@capmedia.fr .PP This manual page was written by Jay Kominek , for Debian. debian/xtv.manpages0000664000000000000000000000001511460253766011534 0ustar debian/xtv.1 debian/xtv.docs0000664000000000000000000000000711460253766010672 0ustar README debian/patches/0000755000000000000000000000000012206747764010634 5ustar debian/patches/debian-changes0000644000000000000000000002342412206747764013414 0ustar Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . xtv (1.1-14) unstable; urgency=low . * debian/copyright GPL (closes: #718683) Author: Barak A. Pearlmutter Bug-Debian: http://bugs.debian.org/718683 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- xtv-1.1.orig/XmtdsI.h +++ xtv-1.1/XmtdsI.h @@ -1,9 +1,9 @@ /* ** XmtdsI.h for Xmtds -** +** ** Made by MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr) ** Login -** +** ** Started on Thu Jan 12 23:27:08 1995 mtds ** Last update Thu Jan 12 23:37:46 1995 mtds */ @@ -17,26 +17,26 @@ void *malloc(); void *realloc(); -#define EXIT_FAILURE exit(255) +#define EXIT_FAIL exit(255) #define EXIT_SUCCEED exit(0) #define BUF_SIZE 512 #define SYSCALL_ERROR(syscall) {perror(syscall);fprintf(stderr,"%s %d\n",\ __FILE__,__LINE__);\ - EXIT_FAILURE;} + EXIT_FAIL;} #define MALLOC(ptr,size,comm) {if (((ptr) = malloc(size)) == NULL)\ {perror("malloc");\ printf("File %s Line %d : %s\n",\ __FILE__,__LINE__,comm);\ - EXIT_FAILURE;}} + EXIT_FAIL;}} #define REALLOC(ptr,size,comm) {if (((ptr) = realloc((ptr),(size))) == NULL)\ {perror("realloc");\ printf("File %s Line %d : %s\n",\ __FILE__,__LINE__,comm);\ - EXIT_FAILURE;}} + EXIT_FAIL;}} /* Xlib */ #define LOOKUP_STRING_BUFSIZ 512 --- xtv-1.1.orig/Grab.c +++ xtv-1.1/Grab.c @@ -1,9 +1,9 @@ /* ** Grab.c for XmtdsGrab widget in . -** +** ** Made by MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr ** Login -** +** ** Started on Mon May 16 22:24:08 1994 vr ** Last update Tue Apr 4 02:31:06 1995 mtds */ @@ -11,6 +11,7 @@ #include #include #include +#include #include "XmtdsI.h" #include "GrabP.h" @@ -38,36 +39,36 @@ XmtdsGrabClassRec xmtdsGrabClassRec = { /* core */ (WidgetClass)&widgetClassRec, /* superclass */ "XmtdsGrab", /* class name */ - sizeof(XmtdsGrabRec), /* size */ - NULL, /* class initialize */ - NULL, /* class_part_init */ - FALSE, /* class_inited */ - Initialize, /* initialize */ - NULL, /* initialize_hook */ - XtInheritRealize, /* realize */ - NULL, /* actions */ - 0, /* num_actions */ - resources, /* resources */ - XtNumber(resources), /* resource_count */ - NULLQUARK, /* xrm_class */ - TRUE, /* compress_motion */ - TRUE, /* compress_exposure */ - TRUE, /* compress_enterleave */ - FALSE, /* visible_interest */ - Destroy, /* destroy */ - NULL, /* resize */ - Redisplay, /* expose */ - NULL, /* set_values */ - NULL, /* set_values_hook */ - XtInheritSetValuesAlmost, /* set_values_almost */ - NULL, /* get_values_hook */ - NULL, /* accept_focus */ - XtVersion, /* version */ - NULL, /* callback_private */ - NULL, /* tm_table */ - XtInheritQueryGeometry, /* query_geometry */ - XtInheritDisplayAccelerator, /* display_accelerator */ - NULL, /* extension */ + sizeof(XmtdsGrabRec), /* size */ + NULL, /* class initialize */ + NULL, /* class_part_init */ + FALSE, /* class_inited */ + Initialize, /* initialize */ + NULL, /* initialize_hook */ + XtInheritRealize, /* realize */ + NULL, /* actions */ + 0, /* num_actions */ + resources, /* resources */ + XtNumber(resources), /* resource_count */ + NULLQUARK, /* xrm_class */ + TRUE, /* compress_motion */ + TRUE, /* compress_exposure */ + TRUE, /* compress_enterleave */ + FALSE, /* visible_interest */ + Destroy, /* destroy */ + NULL, /* resize */ + Redisplay, /* expose */ + NULL, /* set_values */ + NULL, /* set_values_hook */ + XtInheritSetValuesAlmost, /* set_values_almost */ + NULL, /* get_values_hook */ + NULL, /* accept_focus */ + XtVersion, /* version */ + NULL, /* callback_private */ + NULL, /* tm_table */ + XtInheritQueryGeometry, /* query_geometry */ + XtInheritDisplayAccelerator, /* display_accelerator */ + NULL, /* extension */ }, /* xmtds_grab */ { @@ -84,9 +85,9 @@ ArgList args; Cardinal *num_args; { XGCValues xgcv; - + if ((NEW_GRAB.display = - XOpenDisplay((unsigned char *)NEW_GRAB.display_name)) == NULL) + XOpenDisplay((char *)NEW_GRAB.display_name)) == NULL) { XtWarning("can't open display"); exit(-1); @@ -138,7 +139,7 @@ XtIntervalId *id; { Dimension width; Dimension height; - + #ifdef SYNC XSync(XtDisplay(w),FALSE); #endif /* SYNC */ @@ -146,7 +147,7 @@ XtIntervalId *id; XtNwidth, &width, XtNheight, &height, NULL); - copy(w,ABS(CORE.x),ABS(CORE.y),width,height); + copy(w,ABS(CORE.x),ABS(CORE.y),width,height); GRAB.xt_interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w), GRAB.interval, @@ -164,7 +165,7 @@ Dimension height; XImage *image; Dimension dpy_width; Dimension dpy_height; - + dpy_width = DisplayWidth(GRAB.display,DefaultScreen(GRAB.display)); dpy_height = DisplayHeight(GRAB.display,DefaultScreen(GRAB.display)); if ((x + width) > dpy_width) @@ -189,7 +190,6 @@ Dimension height; x, y, width, - height); + height); XDestroyImage(image); } - --- xtv-1.1.orig/Imakefile +++ xtv-1.1/Imakefile @@ -1,23 +1,8 @@ -# -# Imakefile for xtetris in . -# -# Made by MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr -# Login -# -# Started on Sat Jun 25 15:43:45 1994 vr -# Last update Tue Apr 4 02:11:36 1995 mtds -# +# Imakefile for xtv. - SRCS = xtv.c Grab.c +SRCS = xtv.c Grab.c +OBJS = xtv.o Grab.o - OBJS = xtv.o Grab.o - - CDEBUGFLAGS = -g - DEPLIBS = - - - DEFINES = -LOCAL_LIBRARIES = -lXaw -lXext -lXmu -lXt -lX11 +LOCAL_LIBRARIES = -lXaw -lXt -lX11 ComplexProgramTarget(xtv) -InstallAppDefaults(XTv) --- /dev/null +++ xtv-1.1/README @@ -0,0 +1,41 @@ +Assuming you want to display on $DISPLAY what is on the display +$VICTIM, then you go + + xtv -d $VICTIM + +NOTE: you must have appropriate permissions. You can test with + + xlsclient -display $VICTIM + +To deal with permissions, assuming $VHOST is the host on which the +$VICTIM display resides, and ~vic is the home directory of the victim, +you can do this: + + ssh -X -a root@$VHOST + export VICTIM=:0.0 # or whatever + xauth add `xauth -f ~vic/.Xauthority list $VICTIM` + xtv -d $VICTIM + +Other potentially less secure methods would include editing +/etc/X11/xinit/xserverrc on $VHOST to remove "-nolisten tcp", +restarting the X server there, and doing an "xhost + $DISPLAYHOST" + +One use for xtv aside from spying on people without their knowledge, +is so students in a computer classroom can see everything on the +instructor's screen on their own, which can be much easier on the eyes +than a distant fuzzy projector. + + WARNING: be careful with "xhost + host-evil-person-can-log-onto" + because you leave $VICTIM open to various attacks. It is equivalent + to letting anyone who can log onto host-evil-person-can-log-onto sit + at the $VICTIM display and type whatever they want unobserved. This + is of particular relevance in an academic setting, where a nasty + person could remotely log onto student-machine, so if you've done an + "xhost + student-machine" be aware that people other than the person + actually sitting at that machine can potentially do nasties through + it. + +The "right" way to let students see your display is to give each of +them access to an account on your machine (can be shared) using a +secure mechanism, and using xauth commands of the sort shown above to +let people who "ssh -X" into that account access its :0.0 display. --- xtv-1.1.orig/xtv.c +++ xtv-1.1/xtv.c @@ -1,14 +1,16 @@ /* ** xtv.c for Mtds in . ** -** Made by MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr +** Made by MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr) ** Login ** ** Started on Tue May 3 23:29:35 1994 mtds -** Last update Tue Apr 4 02:19:53 1995 mtds +** Updated on Tue Apr 4 02:19:53 1995 mtds +** Minor mods Sun Oct 7 13:42:49 MDT 2001 bap@cs.unm.edu */ #include +#include #include #include #include @@ -29,9 +31,13 @@ static XrmOptionDescRec options[] = XrmoptionSepArg, NULL} }; -int main(argc,argv) -int argc; -char **argv; +void usage() +{ + fprintf(stderr,"usage: xtv [-s refresh_timeout] [-d display]\n"); + exit(255); +} + +int main(int argc, char **argv) { appl app; Widget viewport; @@ -64,10 +70,5 @@ char **argv; XtManageChild(viewport); XtRealizeWidget(app.toplevel); XtAppMainLoop(app.app_context); -} - -int usage() -{ - fprintf(stderr,"usage: xtv [-s refresh_timeout] [-d display]\n"); - exit(255); + return 0; } debian/patches/series0000644000000000000000000000001712206747764012047 0ustar debian-changes debian/source/0000775000000000000000000000000012206747401010473 5ustar debian/source/format0000664000000000000000000000001411460253766011710 0ustar 3.0 (quilt) debian/control0000664000000000000000000000111612206747654010607 0ustar Source: xtv Section: x11 Priority: extra Maintainer: Barak A. Pearlmutter Standards-Version: 3.9.4 Build-Depends: debhelper (>= 9), xutils-dev, libxt-dev, libxaw7-dev Vcs-Git: git://anonscm.debian.org/collab-maint/xtv.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/xtv.git Package: xtv Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: View the screen of a remote X11 display View a remote X11 display in a window on your own display, in a continuously updating fashion. Just like watching the remote display on television! debian/changelog0000664000000000000000000000516612206747401011055 0ustar xtv (1.1-14) unstable; urgency=low * debian/copyright GPL (closes: #718683) -- Barak A. Pearlmutter Mon, 26 Aug 2013 20:58:34 +0100 xtv (1.1-13) unstable; urgency=low * bump standards version (debian/control) * dh --parallel * dh 9 -- Barak A. Pearlmutter Wed, 16 Jan 2013 12:34:15 +0000 xtv (1.1-12) unstable; urgency=low * bump debian standards * Switch to dpkg-source 3.0 (quilt) format -- Barak A. Pearlmutter Thu, 25 Mar 2010 18:56:42 +0000 xtv (1.1-11) unstable; urgency=low * rev deb policy * shrink/modernize debian/rules * update man page section, from xtv(1x) to xtv(1) * standard debian/README.Debian format and name * stop dynamic linking unnecessary libraries * add git repo location to debian/control -- Barak A. Pearlmutter Mon, 02 Nov 2009 21:38:36 -0500 xtv (1.1-10) unstable; urgency=low * rev deb policy, dh, dependencies, copyright -- Barak A. Pearlmutter Tue, 19 Aug 2008 12:31:37 +0100 xtv (1.1-9) unstable; urgency=low * rev deb policy, stop ignoring cleaning errors -- Barak A. Pearlmutter Sun, 23 Dec 2007 18:31:00 +0100 xtv (1.1-8) unstable; urgency=low * policy updates, broken (apart) xlibs -- Barak A. Pearlmutter Thu, 29 Dec 2005 01:37:46 +0000 xtv (1.1-7) unstable; urgency=low * add README * policy updates -- Barak A. Pearlmutter Tue, 2 Nov 2004 20:47:19 +0000 xtv (1.1-6) unstable; urgency=low * Updates for new X library names and debian packaging changes (closes: #170210) -- Barak A. Pearlmutter Thu, 20 Feb 2003 21:06:47 -0700 xtv (1.1-5) unstable; urgency=low * Updates for new X: build dependencies, subvert xmkmf's new all::man -- Barak Pearlmutter Sun, 7 Oct 2001 14:49:03 -0600 xtv (1.1-4) unstable; urgency=low * New Debian maintainer. * Add build dependencies. * Update installation directories to FHS. * Remove Makefile from sources as it is derived. * Tickle things to use gcc -Wall. -- Barak Pearlmutter Sun, 7 Oct 2001 13:31:31 -0600 xtv (1.1-3) unstable; urgency=low * Converted to use of debhelper, which properly compressed the Debian changelog. * Minor changes to text of the man page and README. -- Jay Kominek Mon, 9 Mar 1998 16:03:03 -0500 xtv (1.1-2) unstable; urgency=low * Compiled for Libc6 -- Jay Kominek Fri, 7 Nov 1997 23:51:34 -0500 xtv (1.1-1) unstable; urgency=low * Initial Release. -- Jay Kominek Tue, 16 Sep 1997 17:14:36 -0400 debian/copyright0000664000000000000000000000240612206747401011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Xtv Upstream-Contact: MaxTheDogSays Source: http://sunsite.unc.edu/pub/Linux/X11/xutils/ Files: * Copyright: 1994-1995 MaxTheDogSays (dubray_f@epita.fr && rancur_v@epita.fr) License: GPL Files: debian/* Copyright: 1997-1998 Jay Kominek 2001-2013 Barak A. Pearlmutter License: GPL License: GPL This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 1 can be found in the file `/usr/share/common-licenses/GPL-1'. debian/compat0000664000000000000000000000000212206747401010371 0ustar 9 debian/README.Debian0000664000000000000000000000113411460253766011242 0ustar _ __ _| |___ __ \ \/ / __\ \ / / > <| |_ \ V / /_/\_\\__| \_/ for Debian! Warning: Both displays have to be of equal bit depth for this to work. Otherwise, you get a messy error and its just Not Fun. -- Jay Kominek Maintenance taken over by Barak Pearlmutter. Feel free to take it over from me - I'm only doing it because I sometime use xtv and no one else has volunteered. -- Barak A. Pearlmutter , Mon, 2 Nov 2009 21:18:39 -0500 debian/rules0000775000000000000000000000031012206747401010245 0ustar #!/usr/bin/make -f %: dh $@ --parallel override_dh_auto_configure: xmkmf dh_auto_configure override_dh_auto_build: dh_auto_build -- EXTRA_LIBRARIES="$(shell dpkg-buildflags --get LDFLAGS)" xtv