X11::Terminal - Create customised X11 terminal windows
This module provides a baseclass for launching terminal windows on your desktop. You would normally instantiate subclass rather than using this class directly.
For example:
use X11::Terminal::XTerm; # Create an xterm window, logged in to a remote server my $term = X11::Terminal::XTerm->new(host => "remotehost"); $term->launch();
Each of the following attributes provide an accessor method, but they can also be set in the constructor.
The following attributes define the shell command to be run within the terminal window.
If set, the terminal window will ssh to that host. Otherwise, it will just run a bash shell.
If set, the ssh command will enable X11 forwarding. Requires "host".
If set, the ssh command will enable agent forwarding. Requires "host".
The following attributes are implemented in the various subclasses and depending on the subclass involved they may have no effect. For example, a GnomeTerminal subclass can't set the font as gnome-terminals utilise a profile setting for that bahaviour.
GnomeTerminal
Calculates (and returns) the command that will launch your terminal program. The exact content of the command will depend on which subclass is calling the command, and the attributes that have been specified.
It also runs that command in a child process - unless $debug is specified.
Returns the shell command that should be run within the terminal window. There should be no need to call this method directly.
Returns the name of the program that will be run to provide the terminal window. There should be no need to call this method directly.
Copyright 2010-2011 Evan Giles.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install X11::Terminal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm X11::Terminal
CPAN shell
perl -MCPAN -e shell install X11::Terminal
For more information on module installation, please visit the detailed CPAN module installation guide.