From: root Date: Thu, 7 Jul 2005 19:37:46 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=9c35198287fcca21788c34c505be1dab32a2d87c;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index dc3fba6d..e3d9baad 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ +TODO: Make change? [y... flood freezes until outputter is being killed TODO: do font request caching, might help rxvtd on some machines TODO: safer command: keymap processing. TODO: "slow" rendering mode for bidi and scripts @@ -11,6 +12,9 @@ WISH: OnTheSpot editing, or maybe switch to miiiiiiif WISH: tabbed windows (hey, just use screen...) WISH: just for fun, do shade and tint with XRender. + - implement some useful (hopefully) options for rxvtd. + - seperate and improved rxvtc(1) and rxvtd(1) manpages. + 5.6 Sun Jun 26 22:11:13 CEST 2005 - R_SB_RXVT bitset value was 0, so rxvt scrollbar was initialised every time resulting in display errors (original rxvt also affected). diff --git a/MANIFEST b/MANIFEST index 7ba7b6a8..01dfe5a5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -32,13 +32,20 @@ doc/changes.txt doc/podtbl doc/rxvt.1.pod doc/rxvt.7.pod +doc/rxvtc.1.pod +doc/rxvtd.1.pod doc/rxvt.1.man.in doc/rxvt.7.man.in +doc/rxvtc.1.man.in +doc/rxvtd.1.man.in doc/rxvt.1.html doc/rxvt.7.html +doc/rxvtc.1.html +doc/rxvtd.1.html doc/rxvt.1.txt doc/rxvt.7.txt -doc/rxvtc.1 +doc/rxvtc.1.txt +doc/rxvtd.1.txt doc/rxvt-unicode.spec autoconf/.cvsignore diff --git a/doc/Makefile.in b/doc/Makefile.in index 878f0878..47a748bf 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -42,14 +42,21 @@ SEDREPLACE = -e 's%@@RXVT_VERSION@@%$(VERSION)%g;'\ tags allbin: -alldoc: rxvt.1.man.in rxvt.7.man.in rxvt.1.html rxvt.7.html rxvt.1.txt rxvt.7.txt ../README.configure ../README.FAQ +alldoc: rxvt.1.man.in rxvt.7.man.in rxvtc.1.man.in rxvtd.1.man.in \ + rxvt.1.txt rxvt.7.txt rxvtc.1.txt rxvtd.1.txt \ + rxvt.1.html rxvt.7.html rxvtc.1.html rxvtd.1.html \ + ../README.configure ../README.FAQ infocmp -C rxvt-unicode >etc/rxvt-unicode.termcap clean: $(RMF) *~ realclean: clean - $(RMF) tags rxvt.1.man.in rxvt.7.man.in rxvt.1.html rxvt.7.html rxvt.1.txt rxvt.7.txt ../README.configure ../README.FAQ + $(RMF) tags ../README.configure ../README.FAQ + $(RMF) rxvt.1.man.in rxvt.7.man.in rxvtc.1.man.in rxvtd.1.man.in + $(RMF) rxvt.1.man rxvt.7.man rxvtc.1.man rxvtd.1.man + $(RMF) rxvt.1.txt rxvt.7.txt rxvtc.1.txt rxvtd.1.txt + $(RMF) rxvt.1.html rxvt.7.html rxvtc.1.html rxvtd.1.html cleandir: realclean @@ -62,8 +69,10 @@ install: $(INSTALL_DATA) rxvt.1.man $(DESTDIR)$(man1dir)/$(RXVTNAME).$(man1ext) $(SED) $(SEDREPLACE) < rxvt.7.man.in >rxvt.7.man $(INSTALL_DATA) rxvt.7.man $(DESTDIR)$(man7dir)/$(RXVTNAME).$(man7ext) - $(INSTALL_DATA) rxvtc.1 $(DESTDIR)$(man1dir)/$(RXVTNAME)c.$(man1ext) - $(INSTALL_DATA) rxvtc.1 $(DESTDIR)$(man1dir)/$(RXVTNAME)d.$(man1ext) + $(SED) $(SEDREPLACE) < rxvtc.1.man.in >rxvtc.1.man + $(INSTALL_DATA) rxvtc.1.man $(DESTDIR)$(man1dir)/$(RXVTNAME)c.$(man1ext) + $(SED) $(SEDREPLACE) < rxvtd.1.man.in >rxvtd.1.man + $(INSTALL_DATA) rxvtd.1.man $(DESTDIR)$(man1dir)/$(RXVTNAME)d.$(man1ext) if test -x "@TIC@"; then if test -n "@TIC@"; then @TIC@ etc/rxvt-unicode.terminfo; fi; fi uninstall: diff --git a/doc/rxvt-tabbed b/doc/rxvt-tabbed index dabd965b..3b67baa7 100755 --- a/doc/rxvt-tabbed +++ b/doc/rxvt-tabbed @@ -1,6 +1,6 @@ #!/usr/bin/perl -# I tried to write this with Tk, as it uses elss memory and is +# I tried to write this with Tk, as it uses less memory and is # more widely available. Alas, Tk is rather broken with respect to embedding. # on debian, do: diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html index a38c4c44..7fae9443 100644 --- a/doc/rxvt.1.html +++ b/doc/rxvt.1.html @@ -49,7 +49,7 @@


DESCRIPTION

-

rxvt-unicode, version 5.5, is a colour vt102 terminal +

rxvt-unicode, version 5.6, is a colour vt102 terminal emulator intended as an xterm(1) replacement for users who do not require features such as Tektronix 4014 emulation and toolkit-style configurability. As a result, rxvt-unicode uses much less swap space -- @@ -950,6 +950,20 @@ Specify a command pipe for vt100 printer [default lpr(1)]. Use Print to initiate a screen dump to the printer and Ctrl-Print or Shift-Print to include the scrollback as well. +

+

The string will be interpreted as if typed into the shell as-is.

+
+
+

Example:

+
+
+
+   URxvt*print-pipe: cat > $(TMPDIR=$HOME mktemp urxvt.XXXXXX)
+
+
+

This creates a new file in your home directory with the screen contents +everytime you hit Print.

+

scrollBar: boolean
@@ -1583,7 +1597,7 @@ The unix domain socket path used by rxvtc(1) and rxvtd(1).
-

Default $HOME/.rxvt-unicode-<nodename.

+

Default $HOME/.rxvt-unicode-<nodename >>>.

HOME
@@ -1622,7 +1636,7 @@ Color names.


SEE ALSO

-

rxvt(7), xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5)

+

rxvt(7), rxvtc(1), rxvtd(1), xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5)


diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in index 73c62b29..f91a3955 100644 --- a/doc/rxvt.1.man.in +++ b/doc/rxvt.1.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 1" -.TH rxvt 1 "2005-06-18" "5.5" "RXVT-UNICODE" +.TH rxvt 1 "2005-07-07" "5.6" "RXVT-UNICODE" .SH "NAME" rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system) .SH "SYNOPSIS" @@ -760,6 +760,17 @@ option \fB\-ut\fR. \fBFalse\fR: write record into the system log file \fButmp\fR Specify a command pipe for vt100 printer [default \fI\fIlpr\fI\|(1)\fR]. Use \&\fBPrint\fR to initiate a screen dump to the printer and \fBCtrl-Print\fR or \&\fBShift-Print\fR to include the scrollback as well. +.Sp +The string will be interpreted as if typed into the shell as\-is. +.Sp +Example: +.Sp +.Vb 1 +\& URxvt*print-pipe: cat > $(TMPDIR=$HOME mktemp urxvt.XXXXXX) +.Ve +.Sp +This creates a new file in your home directory with the screen contents +everytime you hit \f(CW\*(C`Print\*(C'\fR. .IP "\fBscrollBar:\fR \fIboolean\fR" 4 .IX Item "scrollBar: boolean" \&\fBTrue\fR: enable the scrollbar [default]; option \fB\-sb\fR. \fBFalse\fR: @@ -1226,7 +1237,7 @@ Used in the same way as \f(CW\*(C`RXVTPATH\*(C'\fR. The unix domain socket path used by @@RXVT_NAME@@c(1) and @@RXVT_NAME@@d(1). .Sp -Default \f(CW\*(C`$HOME/.rxvt\-unicode\-. The unix domain socket path used by @@RXVT_NAME@@c(1) and @@RXVT_NAME@@d(1). -Default C<< $HOME/.rxvt-unicode->. +Default F<<< $HOME/.rxvt-unicode-I<< > >>>. =item B @@ -1280,7 +1280,7 @@ Color names. =head1 SEE ALSO -@@RXVT_NAME@@(7), xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5) +@@RXVT_NAME@@(7), @@RXVT_NAME@@c(1), @@RXVT_NAME@@d(1), xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5) =head1 BUGS diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt index 16e38a74..86ab46b4 100644 --- a/doc/rxvt.1.txt +++ b/doc/rxvt.1.txt @@ -6,7 +6,7 @@ SYNOPSIS rxvt [options] [-e command [ args ]] DESCRIPTION - rxvt-unicode, version 5.5, is a colour vt102 terminal emulator intended + rxvt-unicode, version 5.6, is a colour vt102 terminal emulator intended as an *xterm*(1) replacement for users who do not require features such as Tektronix 4014 emulation and toolkit-style configurability. As a result, rxvt-unicode uses much less swap space -- a significant @@ -614,6 +614,15 @@ RESOURCES (available also as long-options) Print to initiate a screen dump to the printer and Ctrl-Print or Shift-Print to include the scrollback as well. + The string will be interpreted as if typed into the shell as-is. + + Example: + + URxvt*print-pipe: cat > $(TMPDIR=$HOME mktemp urxvt.XXXXXX) + + This creates a new file in your home directory with the screen + contents everytime you hit "Print". + scrollBar: *boolean* True: enable the scrollbar [default]; option -sb. False: disable the scrollbar; option +sb. @@ -1064,7 +1073,7 @@ ENVIRONMENT RXVT_SOCKET The unix domain socket path used by rxvtc(1) and rxvtd(1). - Default "$HOME/.rxvt-unicode-" is used. -.PP -\fBrxvtc\fP is the client program of this duo. It connects to the -\fBrxvtd\fP daemon and requests a new terminal window. It -takes the same arguments as the \fBrxvt\fP program. The environment will -also be respected. Currently, it always returns immediately after contacting -the daemon. -.PP -The positive aspect of this client-server solution is faster creation -time for terminal windows and a lot of saved memory. The negative side is a -possible impact on stability - if the main program crashes, all -processes in the terminal windows are terminated. -.PP -.PP -.SH "SEE ALSO" -.PP -\fIrxvt\fP(1), \fIsh\fP(1), \fI/usr/share/doc/rxvt\-unicode/README.unicode\fP - diff --git a/doc/rxvtc.1.html b/doc/rxvtc.1.html new file mode 100644 index 00000000..2f98be1a --- /dev/null +++ b/doc/rxvtc.1.html @@ -0,0 +1,76 @@ + + + +rxvtc - control the rxvtd daemon + + + + + +

+ + + + + +
+

+

+

NAME

+

rxvtc - control the rxvtd daemon

+

+

+
+

SYNOPSIS

+

rxvtc [same options as for rxvt]

+

+

+
+

DESCRIPTION

+

This manpage describes the rxvtc client program. It connects +to the rxvtd daemon and requests a new terminal window. It +takes the same arguments as the rxvt program. The environment +will also be respected. Currently, it always returns immediately after +contacting the daemon.

+

+

+
+

OPTIONS

+

All options that are valid for rxvt are valid for +rxvtc, too. Please note that all options are currently +interpreted in the context of the daemon process, which makes a difference +for options that specify a file descriptor (such as -pty-fd).

+

+

+
+

ENVIRONMENT

+

All environment variables of the current process will be made available +to the new instance, and will be interpreted as if rxvt were +started directly.

+
+
RXVT_SOCKET
+
+
+Both rxvtc and rxvtd use the environment variable +RXVT_SOCKET to create a listening socket and to contact +the rxvtd, respectively. If the variable is missing, +$HOME/.rxvt-unicode-<nodename > >>> is used. +
+

+

+

+
+

SEE ALSO

+

rxvt(7), rxvtd(1)

+ + + + diff --git a/doc/rxvtc.1.man.in b/doc/rxvtc.1.man.in new file mode 100644 index 00000000..d12bf965 --- /dev/null +++ b/doc/rxvtc.1.man.in @@ -0,0 +1,164 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "rxvt 1" +.TH rxvt 1 "2005-07-07" "5.6" "RXVT-UNICODE" +.SH "NAME" +@@RXVT_NAME@@c \- control the @@RXVT_NAME@@d daemon +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fB@@RXVT_NAME@@c\fR [same options as for @@RXVT_NAME@@] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This manpage describes the \fB@@RXVT_NAME@@c\fR client program. It connects +to the \fB@@RXVT_NAME@@d\fR daemon and requests a new terminal window. It +takes the same arguments as the \fB@@RXVT_NAME@@\fR program. The environment +will also be respected. Currently, it always returns immediately after +contacting the daemon. +.SH "OPTIONS" +.IX Header "OPTIONS" +All options that are valid for \fB@@RXVT_NAME@@\fR are valid for +\&\fB@@RXVT_NAME@@c\fR, too. Please note that all options are currently +interpreted in the context of the daemon process, which makes a difference +for options that specify a file descriptor (such as \fB\-pty\-fd\fR). +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +All environment variables of the current process will be made available +to the new instance, and will be interpreted as if \fB@@RXVT_NAME@@\fR were +started directly. +.IP "\fB\s-1RXVT_SOCKET\s0\fR" 4 +.IX Item "RXVT_SOCKET" +Both @@RXVT_NAME@@c and @@RXVT_NAME@@d use the environment variable +\&\fI\s-1RXVT_SOCKET\s0\fR to create a listening socket and to contact +the @@RXVT_NAME@@d, respectively. If the variable is missing, +\&\fI$HOME/.rxvt\-unicode\-\fI\fI\fR is used. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +@@RXVT_NAME@@(7), @@RXVT_NAME@@d(1) diff --git a/doc/rxvtc.1.pod b/doc/rxvtc.1.pod new file mode 100644 index 00000000..f0ead4c3 --- /dev/null +++ b/doc/rxvtc.1.pod @@ -0,0 +1,44 @@ +=head1 NAME + +@@RXVT_NAME@@c - control the @@RXVT_NAME@@d daemon + +=head1 SYNOPSIS + +B<@@RXVT_NAME@@c> [same options as for @@RXVT_NAME@@] + +=head1 DESCRIPTION + +This manpage describes the B<@@RXVT_NAME@@c> client program. It connects +to the B<@@RXVT_NAME@@d> daemon and requests a new terminal window. It +takes the same arguments as the B<@@RXVT_NAME@@> program. The environment +will also be respected. Currently, it always returns immediately after +contacting the daemon. + +=head1 OPTIONS + +All options that are valid for B<@@RXVT_NAME@@> are valid for +B<@@RXVT_NAME@@c>, too. Please note that all options are currently +interpreted in the context of the daemon process, which makes a difference +for options that specify a file descriptor (such as B<-pty-fd>). + +=head1 ENVIRONMENT + +All environment variables of the current process will be made available +to the new instance, and will be interpreted as if B<@@RXVT_NAME@@> were +started directly. + +=over 4 + +=item B + +Both @@RXVT_NAME@@c and @@RXVT_NAME@@d use the environment variable +F to create a listening socket and to contact +the @@RXVT_NAME@@d, respectively. If the variable is missing, +F<<< $HOME/.rxvt-unicode-I<< >> >>> is used. + +=back + +=head1 SEE ALSO + +@@RXVT_NAME@@(7), @@RXVT_NAME@@d(1) + diff --git a/doc/rxvtc.1.txt b/doc/rxvtc.1.txt new file mode 100644 index 00000000..a2b697ab --- /dev/null +++ b/doc/rxvtc.1.txt @@ -0,0 +1,31 @@ +NAME + rxvtc - control the rxvtd daemon + +SYNOPSIS + rxvtc [same options as for rxvt] + +DESCRIPTION + This manpage describes the rxvtc client program. It connects to the + rxvtd daemon and requests a new terminal window. It takes the same + arguments as the rxvt program. The environment will also be respected. + Currently, it always returns immediately after contacting the daemon. + +OPTIONS + All options that are valid for rxvt are valid for rxvtc, too. Please + note that all options are currently interpreted in the context of the + daemon process, which makes a difference for options that specify a file + descriptor (such as -pty-fd). + +ENVIRONMENT + All environment variables of the current process will be made available + to the new instance, and will be interpreted as if rxvt were started + directly. + + RXVT_SOCKET + Both rxvtc and rxvtd use the environment variable RXVT_SOCKET to + create a listening socket and to contact the rxvtd, respectively. If + the variable is missing, $HOME/.rxvt-unicode-** is used. + +SEE ALSO + rxvt(7), rxvtd(1) + diff --git a/doc/rxvtd.1.html b/doc/rxvtd.1.html new file mode 100644 index 00000000..01b4c388 --- /dev/null +++ b/doc/rxvtd.1.html @@ -0,0 +1,126 @@ + + + +rxvtd - rxvt terminal daemon + + + + + +

+ + + + + +
+

+

+

NAME

+

rxvtd - rxvt terminal daemon

+

+

+
+

SYNOPSIS

+

rxvtd [-q|--quiet] [-o|--opendisplay] [-f|--fork]

+

+

+
+

DESCRIPTION

+

This manpage describes the rxvtd daemon, which is the same vt102 +terminal emulator as rxvt, but runs as a daemon that can open +multiple terminal windows within the same process.

+

You can run it from your X startup scripts, for example, although it is +not dependent on a working DISPLAY and, in fact, can open windows on +multiple X displays on the same time.

+

Advantages of running a rxvt daemon include faster creation time +for terminal windows and a lot of saved memory.

+

The disadvantage is a possible impact on stability - if the +main program crashes, all processes in the terminal windows are +terminated. For example, as there is no way to cleanly react to abnormal +connection closes, xkill and server resets/restarts will kill the +rxvtd instance including all windows it has opened.

+

+

+
+

OPTIONS

+

rxvtd currently understands a few options only. Bundling of +options is not yet supported.

+
+
-q, --quiet
+
+
+Normally, rxvtd outputs the message rxvt-unicode daemon +listening on <path> after binding to its control socket. This option +will suppress this message (errors and warnings will still be output). +
+

+
-o, --opendisplay
+
+
+This forces rxvtd to open a connection to the current +$DISPLAY and keep it open. +
+
+

This is useful if you want to bind an instance of rxvtd to +the lifetime of a specific display/server. If the server does a reset, +rxvtd will be killed automatically.

+
+

+
-f, --fork
+
+
+This makes rxvtd fork after it has bound itself to its control +socket. +
+

+

+

+
+

EXAMPLES

+

This is a useful invocation of rxvtd in a .xsession-style +script:

+
+   B<rxvtd> -q -f -o
+

This waits till the control socket is available, opens the current display +and forks into the background. When you log-out, the server is reset and +rxvtd is killed.

+

+

+
+

ENVIRONMENT

+
+
RXVT_SOCKET
+
+
+Both rxvtc and rxvtd use the environment variable +RXVT_SOCKET to create a listening socket and to contact +the rxvtd, respectively. If the variable is missing, +$HOME/.rxvt-unicode-<nodename > >>> is used. +
+

+
DISPLAY
+
+
+Only used when the --opendisplay option is specified. Must contain a +valid X display name. +
+
+

+

+
+

SEE ALSO

+

rxvt(7), rxvtc(1)

+ + + + diff --git a/doc/rxvtd.1.man.in b/doc/rxvtd.1.man.in new file mode 100644 index 00000000..dde9c3b8 --- /dev/null +++ b/doc/rxvtd.1.man.in @@ -0,0 +1,205 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "rxvt 1" +.TH rxvt 1 "2005-07-07" "5.6" "RXVT-UNICODE" +.SH "NAME" +@@RXVT_NAME@@d \- @@RXVT_NAME@@ terminal daemon +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fB@@RXVT_NAME@@d\fR [\-q|\-\-quiet] [\-o|\-\-opendisplay] [\-f|\-\-fork] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This manpage describes the @@RXVT_NAME@@d daemon, which is the same vt102 +terminal emulator as @@RXVT_NAME@@, but runs as a daemon that can open +multiple terminal windows within the same process. +.PP +You can run it from your X startup scripts, for example, although it is +not dependent on a working \s-1DISPLAY\s0 and, in fact, can open windows on +multiple X displays on the same time. +.PP +Advantages of running a @@RXVT_NAME@@ daemon include faster creation time +for terminal windows and a lot of saved memory. +.PP +The disadvantage is a possible impact on stability \- if the +main program crashes, all processes in the terminal windows are +terminated. For example, as there is no way to cleanly react to abnormal +connection closes, \f(CW\*(C`xkill\*(C'\fR and server resets/restarts will kill the +\&\fB@@RXVT_NAME@@d\fR instance including all windows it has opened. +.SH "OPTIONS" +.IX Header "OPTIONS" +\&\fB@@RXVT_NAME@@d\fR currently understands a few options only. Bundling of +options is not yet supported. +.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 +.IX Item "-q, --quiet" +Normally, \fB@@RXVT_NAME@@d\fR outputs the message \f(CW\*(C`rxvt\-unicode daemon +listening on \*(C'\fR after binding to its control socket. This option +will suppress this message (errors and warnings will still be output). +.IP "\fB\-o\fR, \fB\-\-opendisplay\fR" 4 +.IX Item "-o, --opendisplay" +This forces \fB@@RXVT_NAME@@d\fR to open a connection to the current +\&\f(CW$DISPLAY\fR and keep it open. +.Sp +This is useful if you want to bind an instance of \fB@@RXVT_NAME@@d\fR to +the lifetime of a specific display/server. If the server does a reset, +\&\fB@@RXVT_NAME@@d\fR will be killed automatically. +.IP "\fB\-f\fR, \fB\-\-fork\fR" 4 +.IX Item "-f, --fork" +This makes \fB@@RXVT_NAME@@d\fR fork after it has bound itself to its control +socket. +.SH "EXAMPLES" +.IX Header "EXAMPLES" +This is a useful invocation of \fB@@RXVT_NAME@@d\fR in a \fI.xsession\fR\-style +script: +.PP +.Vb 1 +\& B<@@RXVT_NAME@@d> -q -f -o +.Ve +.PP +This waits till the control socket is available, opens the current display +and forks into the background. When you log\-out, the server is reset and +\&\fB@@RXVT_NAME@@d\fR is killed. +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +.IP "\fB\s-1RXVT_SOCKET\s0\fR" 4 +.IX Item "RXVT_SOCKET" +Both \fB@@RXVT_NAME@@c\fR and \fB@@RXVT_NAME@@d\fR use the environment variable +\&\fI\s-1RXVT_SOCKET\s0\fR to create a listening socket and to contact +the @@RXVT_NAME@@d, respectively. If the variable is missing, +\&\fI$HOME/.rxvt\-unicode\-\fI\fI\fR is used. +.IP "\fB\s-1DISPLAY\s0\fR" 4 +.IX Item "DISPLAY" +Only used when the \f(CW\*(C`\-\-opendisplay\*(C'\fR option is specified. Must contain a +valid X display name. +.RS 4 +.SH "SEE ALSO" +.IX Header "SEE ALSO" +.RS 4 +@@RXVT_NAME@@(7), @@RXVT_NAME@@c(1) diff --git a/doc/rxvtd.1.pod b/doc/rxvtd.1.pod new file mode 100644 index 00000000..a66a0996 --- /dev/null +++ b/doc/rxvtd.1.pod @@ -0,0 +1,88 @@ +=head1 NAME + +@@RXVT_NAME@@d - @@RXVT_NAME@@ terminal daemon + +=head1 SYNOPSIS + +B<@@RXVT_NAME@@d> [-q|--quiet] [-o|--opendisplay] [-f|--fork] + +=head1 DESCRIPTION + +This manpage describes the @@RXVT_NAME@@d daemon, which is the same vt102 +terminal emulator as @@RXVT_NAME@@, but runs as a daemon that can open +multiple terminal windows within the same process. + +You can run it from your X startup scripts, for example, although it is +not dependent on a working DISPLAY and, in fact, can open windows on +multiple X displays on the same time. + +Advantages of running a @@RXVT_NAME@@ daemon include faster creation time +for terminal windows and a lot of saved memory. + +The disadvantage is a possible impact on stability - if the +main program crashes, all processes in the terminal windows are +terminated. For example, as there is no way to cleanly react to abnormal +connection closes, C and server resets/restarts will kill the +B<@@RXVT_NAME@@d> instance including all windows it has opened. + +=head1 OPTIONS + +B<@@RXVT_NAME@@d> currently understands a few options only. Bundling of +options is not yet supported. + +=over 4 + +=item B<-q>, B<--quiet> + +Normally, B<@@RXVT_NAME@@d> outputs the message C<< rxvt-unicode daemon +listening on >> after binding to its control socket. This option +will suppress this message (errors and warnings will still be logged). + +=item B<-o>, B<--opendisplay> + +This forces B<@@RXVT_NAME@@d> to open a connection to the current +C<$DISPLAY> and keep it open. + +This is useful if you want to bind an instance of B<@@RXVT_NAME@@d> to +the lifetime of a specific display/server. If the server does a reset, +B<@@RXVT_NAME@@d> will be killed automatically. + +=item B<-f>, B<--fork> + +This makes B<@@RXVT_NAME@@d> fork after it has bound itself to its control +socket. + +=back + +=head1 EXAMPLES + +This is a useful invocation of B<@@RXVT_NAME@@d> in a F<.xsession>-style +script: + + B<@@RXVT_NAME@@d> -q -f -o + +This waits till the control socket is available, opens the current display +and forks into the background. When you log-out, the server is reset and +B<@@RXVT_NAME@@d> is killed. + +=head1 ENVIRONMENT + +=over 4 + +=item B + +Both B<@@RXVT_NAME@@c> and B<@@RXVT_NAME@@d> use the environment variable +F to create a listening socket and to contact +the @@RXVT_NAME@@d, respectively. If the variable is missing, +F<<< $HOME/.rxvt-unicode-I<< >> >>> is used. + +=item B + +Only used when the C<--opendisplay> option is specified. Must contain a +valid X display name. + +=over + +=head1 SEE ALSO + +@@RXVT_NAME@@(7), @@RXVT_NAME@@c(1) diff --git a/doc/rxvtd.1.txt b/doc/rxvtd.1.txt new file mode 100644 index 00000000..d907bb0b --- /dev/null +++ b/doc/rxvtd.1.txt @@ -0,0 +1,67 @@ +NAME + rxvtd - rxvt terminal daemon + +SYNOPSIS + rxvtd [-q|--quiet] [-o|--opendisplay] [-f|--fork] + +DESCRIPTION + This manpage describes the rxvtd daemon, which is the same vt102 + terminal emulator as rxvt, but runs as a daemon that can open multiple + terminal windows within the same process. + + You can run it from your X startup scripts, for example, although it is + not dependent on a working DISPLAY and, in fact, can open windows on + multiple X displays on the same time. + + Advantages of running a rxvt daemon include faster creation time for + terminal windows and a lot of saved memory. + + The disadvantage is a possible impact on stability - if the main program + crashes, all processes in the terminal windows are terminated. For + example, as there is no way to cleanly react to abnormal connection + closes, "xkill" and server resets/restarts will kill the rxvtd instance + including all windows it has opened. + +OPTIONS + rxvtd currently understands a few options only. Bundling of options is + not yet supported. + + -q, --quiet + Normally, rxvtd outputs the message "rxvt-unicode daemon listening + on " after binding to its control socket. This option will + suppress this message (errors and warnings will still be output). + + -o, --opendisplay + This forces rxvtd to open a connection to the current $DISPLAY and + keep it open. + + This is useful if you want to bind an instance of rxvtd to the + lifetime of a specific display/server. If the server does a reset, + rxvtd will be killed automatically. + + -f, --fork + This makes rxvtd fork after it has bound itself to its control + socket. + +EXAMPLES + This is a useful invocation of rxvtd in a .xsession-style script: + + B -q -f -o + + This waits till the control socket is available, opens the current + display and forks into the background. When you log-out, the server is + reset and rxvtd is killed. + +ENVIRONMENT + RXVT_SOCKET + Both rxvtc and rxvtd use the environment variable RXVT_SOCKET to + create a listening socket and to contact the rxvtd, respectively. If + the variable is missing, $HOME/.rxvt-unicode-** is used. + + DISPLAY + Only used when the "--opendisplay" option is specified. Must contain + a valid X display name. + +SEE ALSO + rxvt(7), rxvtc(1) + diff --git a/src/init.C b/src/init.C index 203551fc..51a7fb2a 100644 --- a/src/init.C +++ b/src/init.C @@ -346,19 +346,7 @@ rxvt_term::init_resources (int argc, const char *const *argv) get_options (r_argc, r_argv); -#ifdef LOCAL_X_IS_UNIX - if (rs[Rs_display_name][0] == ':') - { - val = rxvt_malloc (5 + strlen (rs[Rs_display_name])); - strcpy (val, "unix"); - strcat (val, rs[Rs_display_name]); - display = displays.get (val); - free (val); - } -#endif - - if (!display - && ! (display = displays.get (rs[Rs_display_name]))) + if (!(display = displays.get (rs[Rs_display_name]))) rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); extract_resources (); diff --git a/src/rxvtd.C b/src/rxvtd.C index 6c56f4b2..7bd89af5 100644 --- a/src/rxvtd.C +++ b/src/rxvtd.C @@ -211,19 +211,57 @@ void server::read_cb (io_watcher &w, short revents) return err (); } +int opt_fork, opt_opendisplay, opt_quiet; + int main (int argc, const char *const *argv) { + for (int i = 1; i < argc; i++) + { + if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) + opt_fork = 1; + else if (!strcmp (argv [i], "-o") || !strcmp (argv [i], "--opendisplay")) + opt_opendisplay = 1; + else if (!strcmp (argv [i], "-q") || !strcmp (argv [i], "--quiet")) + opt_quiet = 1; + else + { + rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); + return EXIT_FAILURE; + } + } + rxvt_init (); chdir ("/"); + if (opt_opendisplay) + displays.get (getenv ("DISPLAY")); // open display and never release it + char *sockname = rxvt_connection::unix_sockname (); unix_listener l (sockname); - printf ("rxvt-unicode daemon listening on %s.\n", sockname); - fflush (stdout); + + if (!opt_quiet) + { + printf ("rxvt-unicode daemon listening on %s.\n", sockname); + fflush (stdout); + } + free (sockname); + if (opt_fork) + { + pid_t pid = fork (); + + if (pid < 0) + { + rxvt_log ("unable to fork daemon, aborting.\n"); + return EXIT_FAILURE; + } + else if (pid > 0) + _exit (EXIT_SUCCESS); + } + io_manager::loop (); return EXIT_SUCCESS; diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index d04b5060..306149cc 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -145,7 +145,21 @@ rxvt_display::rxvt_display (const char *id) bool rxvt_display::init () { - display = XOpenDisplay (id); +#ifdef LOCAL_X_IS_UNIX + if (id[0] == ':') + { + val = rxvt_malloc (5 + strlen (id) + 1); + strcpy (val, "unix/"); + strcat (val, id); + display = XOpenDisplay (val); + free (val); + } + else + display = 0; +#endif + + if (!display) + display = XOpenDisplay (id); if (!display) return false;