Commit 4ae2b993 authored by Martin Klimes (k11m1)'s avatar Martin Klimes (k11m1)
Browse files

better readme and language

parent 6cd16e2d
#+TITLE: Readme
* Fi printers - Install script for printers under Linux with samba
* FI printers
Script for installing fi printers on Linux via Samba print server.
** Advantages:
+ Pure IPP printing allows only printing via Ethernet cable. This restriction does not apply to samba.
+ You can use your current cups settings and just add fi printers. (For example if you use your laptop you don't have to switch cups configuration)
+ Printing is not bound to your username on your computer.
** Files/Folders:
| File | Description |
|--------------------------+--------------------------------------------------|
| ~install.pl~ | The main install script |
| ~filters~ | folder with filters for cups |
| ~ppds~ | folder with ppds for cups |
| ~PyPDF2~ and ~reportlab~ | folder with python 2 dependencies for ~TA5007ci~ |
+ You can print on WiFi with Samba. (Pure IPP printing allows only printing via Ethernet cable)
+ You can add a FI printer to your existing cups instance. This way, you don't have to switch configurations.
+ You don't need to have the same login on your computer as your faculty login.
** Pre-requirements:
+ root access (or sudo)
+ Local print server (~cups~)
+ samba (~smbclient~)
+ running local [[https://www.cups.org/][CUPS]] print server
+ samba client (~smbclient~)
+ for ~TA5007ci~ python2
*** Note
If you have previously used pure IPP printing, you might want to cancel printing from you machine.
If you have previously have used pure IPP printing before, you might want to cancel printing from your machine.
If that is the case, send a request to unix@fi.muni.cz.
**** Warning
if you are using cups with IPP printing or Kerberos printing you are using cups with ~/etc/cups/client.conf~.
This makes it impossible to print via samba.
If you are printing with pure IPP or Kerberos, you will have to remove client configuration for cups, which is located at ~/etc/cups/client.conf~.
** Usage
usage: ~./install.pl <printer-name>~
where ~<printer-name>~ is valid printer name:
Usage: ~./install.pl <printer-name>~ , where ~<printer-name>~ is valid printer name.
For example to install printer ~lj2b~ run
#+begin_src bash
./install.pl lj2b
#+end_src
After running the script, you will be prompted for you faculty login.
Available printers:
| Printer name | Model | Location |
|--------------+-------------+----------------------------------------------|
......@@ -47,9 +48,10 @@ where ~<printer-name>~ is valid printer name:
| lj5c | hplj-600 | Building C, 5th floor, next to copy |
* Current status:
- [X] hp laserjet 600
- [X] HP LaserJet P4515x
- [X] HP LaserJet P4015x
- [X] TA 4505ci
- [X] TA 5007ci
** Repo structure:
| File | Description |
|--------------------------+--------------------------------------------------|
| ~install.pl~ | main install script |
| ~filters~ | folder with filters for cups |
| ~ppds~ | folder with ppds for cups |
| ~PyPDF2~ and ~reportlab~ | folder with python 2 dependencies for ~TA5007ci~ |
......@@ -195,12 +195,12 @@ sub print_printers() {
}
sub usage() {
say "Script to install FI printers on linux. ";
say "Script for installing FI printers on linux.";
say "Requires local CUPS server running and SAMBA client installed.";
say "usage: $0 <printer-name>";
say "Must be run as root.";
say "Triumph-Adler 50007ci needs Python 2.7 as a dependency ";
say "and will install 2 python modules automatically.";
say "Triumph-Adler 50007ci needs Python 2.7 as a dependency";
say "and will install 2 additional python modules automatically.";
print "\n\n";
print_printers();
......@@ -216,13 +216,11 @@ sub check_python {
return "python ";
}
# TODO FIXME ADD python2
say "[ERROR] Python 2.7 is not present";
# TRY python2 command
my $s_output = qx/python2 -V 2>&1/;
if ( $? == 0 && $s_output =~ $regex ) {
say "[OK] Python 2.7 is present as python2"; # TODO OTESTOVAT
say "[OK] Python 2.7 is present as python2";
return "python2 ";
}
......@@ -232,10 +230,10 @@ sub check_python {
sub python_package {
( my $package_name, my $python ) = @_;
say "[INFO] Installing $package_name";
say "[INFO] Installing $package_name...";
my $status = chdir "$package_name";
if ( $status == 0 ) {
die "[ERROR] folder $package_name is not present";
die "[ERROR] folder $package_name is not present!";
}
my $output = system("${python} setup.py install");
if ( $? != 0 ) {
......@@ -243,7 +241,7 @@ sub python_package {
}
$status = chdir '..';
if ( $status == 0 ) {
die "[ERROR] Could not return to the working directory";
die "[ERROR] Could not return to the working directory!";
}
return;
}
......@@ -299,7 +297,4 @@ for my $filter ( @{ ( $models->{$model} // {} )->{filters} // [] } ) {
install_printer("$printer_name");
say "[INFO] Installation is completed";
say "You may alter the printer settings in cups interface."; # NOTE usefull?
# hp_laserjet_600($printer_name);
say "[INFO] Installation is completed.";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment