App-USBKeyCopyCon

 view release on metacpan or  search on metacpan

bin/usb-key-copy-con  view on Meta::CPAN


=head1 DESCRIPTION

This program provides a GUI console for managing the process of bulk-copying
USB flash drives ('keys').  Launch the program and then:

=over 4

=item 1

insert a 'master' USB key when prompted - the contents of the key will be
copied into a temporary directory on the hard drive, after which the key can be
removed

=item 2

insert blank keys into all available USB ports - the app will detect when each
new key is inserted, start the copy process and alert the user on completion

=item 3

lib/App/USBKeyCopyCon.pm  view on Meta::CPAN

This module implements an application for bulk copying USB flash drives
(storage devices).  The application was developed to run on Linux and is
probably not particularly portable to other platforms.

From a user's perspective the operation is simple:

=over 4

=item 1

insert a 'master' USB key when prompted - the contents of the key will be
copied into a temporary directory on the hard drive, after which the key can be
removed

=item 2

insert blank keys into all available USB ports - the app will detect when each
new key is inserted, start the copy process and alert the user on completion

=item 3

lib/App/USBKeyCopyCon.pm  view on Meta::CPAN

Called from C<hal_device_added> to fork off a 'reader' process to slurp in the
contents of the master key.

=head2 sudo_wrap ( command env-var-names )

If the script is run by a non-root user and sudo is available and the
C<--no-root-check> option was not specified, this method will return a command
string which wraps the supplied command in a call to either C<gksudo> or
C<sudo>.  For all other cases, C<command> is returned unmodified.

The C<gksudo> command is preferred since it gives the user a GUI prompt window
if it is necessary to prompt for a password.  This method handles the different
semantics required to pass environment variables through C<gksudo> and C<sudo>.

=head2 tick ( )

This timer event handler is used to take the child process exit status values
collected by the SIGCHLD handler and pass them to C<master_copy_finished> or
C<copy_finished> as appropriate.

=head2 update_key_progress ( udi, status )

lib/App/USBKeyCopyCon/TroubleShooting.pod  view on Meta::CPAN

It is safest to run C<usb-key-copy-con> when only one user is logged on to your
workstation.  If you log in one user and then 'switch users' to log in a second
user, the desktop of the first user may continue to respond to USB device
add/remove events and cause conflicts with the copying process.

=head2 Root Privileges / Sudo

The C<usb-key-copy-con> program needs root privileges to format and
mount/unmount devices.  If the program is run by a non-root user then it will
use either gksudo or sudo to run the sub-commands that need privilege.  If
gksudo is installed then password prompts should appear in a graphical window,
if not, they may appear in the console window where the command was originally
run.  You may wish to configure sudo so that no password prompt is needed.

You can run the whole C<usb-key-copy-con> program as root:

  sudo usb-key-copy-con

However in this mode it will not be able to access the original user's GConf
settings to disable media-automount so you will need to do that manually.

=head2 Environment Variables



( run in 0.746 second using v1.01-cache-2.11-cpan-0b5f733616e )