… | |
… | |
533 | |
533 | |
534 | # now communicate with rxvt |
534 | # now communicate with rxvt |
535 | my $slave = $pty->slave; |
535 | my $slave = $pty->slave; |
536 | while (<$slave>) { print $slave "got <$_>\n" } |
536 | while (<$slave>) { print $slave "got <$_>\n" } |
537 | |
537 | |
|
|
538 | Note that, despite what the name might imply, the file descriptor does not |
|
|
539 | need to be a pty, it can be a bi-directional pipe as well (e.g. a unix |
|
|
540 | domain or tcp socket). While tty operations cannot be done in this case, |
|
|
541 | B<@@RXVT_NAME@@> can still be remote controlled with it: |
|
|
542 | |
|
|
543 | use Socket; |
|
|
544 | use Fcntl; |
|
|
545 | |
|
|
546 | socketpair my $URXVT, my $slave, Socket::AF_UNIX, Socket::SOCK_STREAM, Socket::PF_UNSPEC; |
|
|
547 | fcntl $slave, Fcntl::F_SETFD, 0; |
|
|
548 | system "exec @@RXVT_NAME|| -pty-fd " . (fileno $slave) . " &"; |
|
|
549 | close $slave; |
|
|
550 | |
|
|
551 | syswrite $URXVT, "Type a secret password: "; |
|
|
552 | my $secret = do { local $/ = "\r"; <$URXVT> }; |
|
|
553 | print "No so secret anymore: $secret\n"; |
|
|
554 | |
538 | =item B<-pe> I<string> |
555 | =item B<-pe> I<string> |
539 | |
556 | |
540 | Comma-separated list of perl extension scripts to use (or not to use) in |
557 | Comma-separated list of perl extension scripts to use (or not to use) in |
541 | this terminal instance. See resource B<perl-ext> for details. |
558 | this terminal instance. See resource B<perl-ext> for details. |
542 | |
559 | |
… | |
… | |
1287 | =item B<perl-ext>: I<string> |
1304 | =item B<perl-ext>: I<string> |
1288 | |
1305 | |
1289 | Comma-separated list(s) of perl extension scripts (default: C<default>) to |
1306 | Comma-separated list(s) of perl extension scripts (default: C<default>) to |
1290 | use in this terminal instance; option B<-pe>. |
1307 | use in this terminal instance; option B<-pe>. |
1291 | |
1308 | |
1292 | Extension names can be prefixed with a C<-> sign to prohibit using |
1309 | Extension names can be prefixed with a C<-> sign to remove them again, in |
1293 | them. This can be useful to selectively disable some extensions loaded |
1310 | case they had been specified earlier. This can be useful to selectively |
1294 | by default, or specified via the C<perl-ext-common> resource. For |
1311 | disable some extensions loaded by default, or specified via the |
1295 | example, C<default,-selection> will use all the default extensions except |
1312 | C<perl-ext-common> resource. For example, C<default,-selection> will use |
1296 | C<selection>. |
1313 | all the default extensions except C<selection>. |
|
|
1314 | |
|
|
1315 | To prohibit autoloading of extensions, you can prefix them with C</>, |
|
|
1316 | which will make urxvt refuse to automatically load them (this can be |
|
|
1317 | overriden, however, by specifying the extension name again without a |
|
|
1318 | prefix, though). This does not prohibit extensions themselves loading |
|
|
1319 | other extensions. For example, C<default,/background> will keep the |
|
|
1320 | C<background> extension from being loaded when a background OSC sequence |
|
|
1321 | is received. |
1297 | |
1322 | |
1298 | The default set includes the C<selection>, C<option-popup>, |
1323 | The default set includes the C<selection>, C<option-popup>, |
1299 | C<selection-popup>, C<readline> and C<searchable-scrollback> |
1324 | C<selection-popup>, C<readline>, C<searchable-scrollback> and |
1300 | extensions, and extensions which are mentioned in B<keysym> resources. |
1325 | C<confirm-paste> extensions, as well as any extensions which are mentioned |
|
|
1326 | in B<keysym> resources. |
1301 | |
1327 | |
1302 | Any extension such that a corresponding resource is given on the |
1328 | Any extension such that a corresponding resource is given on the |
1303 | command line is automatically appended to B<perl-ext>. |
1329 | command line is automatically appended to B<perl-ext>. |
1304 | |
1330 | |
1305 | Each extension is looked up in the library directories, loaded if |
1331 | Each extension is looked up in the library directories, loaded if |