Post n°61 pubblicato il 24 Gennaio 2018 da taichung
The current hplip version in Debian 9.3 is oblosete and doesn't support the HP Laserjet Pro MFP M26nw. Hplip 3.7.11 does, but unfortunately installing the package from https://developers.hp.com/hp-linux-imaging-and-printing I'm getting troubles with the dependencies. The most problematic packages are pyqt4 and pyqt4-dbus; the hplip installer requires them, but already since Debian 8.7 (or maybe before), those packages have been renamed to python-qt4 and python-qt4-dbus. It can be that while trying to install hplip 3.7.11 some more dependencies are missing, but you can easily install them in the usual way, through you package manager or apt. Anyway, after struggling for some days, I've found a very useful post on Launchpad, which has helped me in finding the solution: https://answers.launchpad.net/hplip/+question/452076 First, download hplip-3.17.11.run from https://developers.hp.com/hp-linux-imaging-and-printing Enter in the folder where you've downloaded it, and make it executable with: sudo chmod a+x hplip-3.17.11.run Mind that you should install this package as a normal user, not as root. If there's no such user on your computer, create it and also his home directory, because later the installer will create some files in the home directory of the user, It's not really needed, but it'll avoid the installer to throw out some error. Before everything, uninstall the older version of hplip, if it's installed (btw, the new installer should also ask you about that). Once done, run the installer: ./hplip-3.17.11.run The installer will try to go on as long as possible, asking you different questions about the version of your operating system, dependencies and so on. Try to go on as long as possible, to get an idea about what to expect later, and especially try to solve the other missed dependencies, which could be related to python packages, cups, etc. p, li { white-space: pre-wrap; } When the installer will stop, complaining that pyqt4 and pyqt4-dbus are missing and can't be installed, it'll be your turn! The installer has created a folder, hplip-3.17.11. You now have to edit the file hplip-3.17.11/installer/core_install.py with your favorite editor (vi, nano, emacs, leafpad...) In that file locate the following: 'pyqt4-dbus' : (True, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), and change it into: 'python-qt4-dbus' : (True, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), Note that pyqt4-dbus must be changed in python-qt4-dbus. Then locate: 'pyqt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x ) and change it into: 'python-qt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x ) Here we have changed pyqt4 into python-qt4. Save the file and close it. Now you have to edit the file hplip-3.17.11/installer/distros.dat to add the compatibility with Debian 9.3. Around line 4717 you'll find the following: [debian] index=2 versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,9.1 display_name=Debian You need to add the version's number 9.3 (and 9.2) at the end of that line which begins with the word version as the following: versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,9.1,9.2,9.3 Once done, around line 6102 of the same file, there's the configuration section for the last supported Debian version, code number 9.1. Basically you have to copy it and change the code number from 9.1 to 9.3 for all the recurrencies. To be clean, you should add 2 sections, one for Debian 9.2 and one for Debian 9.3, where the only difference is the code number of the version. I personally didn't add the section for 9.2, the installer has shown an error about that but then went on. Let's see how to do: at the end of the section for Debian 9.1, around line 6102, as previously written, add the following text: [debian:9.3] code_name=Stretch supported=1 scan_supported=1 fax_supported=1 pcard_supported=1 network_supported=1 parallel_supported=1 usb_supported=1 packaged_version=3.17.10 release_date=22/07/2017 notes=NOTE: Disable the CD Sources in your apt sources.list or the install will fail and hang. ppd_install=drv udev_mode_fix=1 ppd_dir=/usr/share/ppd/HP fix_ppd_symlink=0 drv_dir=/usr/share/cups/drv/HP ui_toolkit=qt5 native_cups=1 policykit=0 # This libdir_path will be used only for 64 bit machine. libdir_path=/usr/lib/x86_64-linux-gnu [debian:9.3:cups] packages=cups,libcups2 [debian:9.3:cups-devel] packages=libcups2-dev,cups-bsd,cups-client [debian:9.3:gcc] packages=g++ [debian:9.3:gs] packages=ghostscript,ghostscript-cups,ghostscript-x [debian:9.3:libcrypto] packages=libssl-dev [debian:9.3:libjpeg] packages=libjpeg62-turbo-dev [debian:9.3:libnetsnmp-devel] packages=libsnmp-dev,snmp [debian:9.3:libpthread] packages=libc6 [debian:9.3:libtool] packages=libtool,libtool-bin [debian:9.3:libusb] packages=libusb-1.0.0-dev [debian:9.3:make] packages=make [debian:9.3:pil] packages=python-imaging [debian:9.3:ppdev] packages= commands=su -c "modprobe ppdev",su -c cp -f /etc/modules /etc/modules.hplip,echo ppdev | su -c tee -a /etc/modules [debian:9.3:pyqt] packages=python-qt3 [debian:9.3:python-devel] packages=python-dev [debian:9.3:pyqt4] packages=python-qt4 [debian:9.3:pyqt4-dbus] packages=python-qt4-dbus [debian:9.3:python23] packages=python [debian:9.3:python2X] packages=python [debian:9.3:reportlab] packages=python-reportlab [debian:9.3:sane] packages=sane [debian:9.3:sane-devel] packages=libsane-dev [debian:9.3:scanimage] packages=sane-utils [debian:9.3:xsane] packages=xsane [debian:9.3:cups-ddk] packages= [debian:9.3:python-dbus] packages=python-dbus,python-gobject [debian:9.3:dbus] packages=libdbus-1-dev [debian:9.3:python-ctypes] packages=python-ctypes [debian:9.3:cups-image] packages=libcupsimage2,libcupsimage2-dev [debian:9.3:policykit] packages=policykit-1,policykit-1-gnome [debian:9.3:python-notify] packages=python-notify [debian:9.3:network] packages=wget [debian:9.3:avahi-utils] packages=avahi-utils [debian:9.3:gtk] packages=libcanberra-gtk-module [debian:9.3:python3-notify2] packages=python3-notify2 [debian:9.3:python3-pyqt4-dbus] packages=python3-dbus.mainloop.qt [debian:9.3:python3-pyqt4] packages=python3-pyqt4,gtk2-engines-pixbuf [debian:9.3:python3-dbus] packages=python3-dbus,python3-gi [debian:9.3:python3-xml] packages=python3-lxml [debian:9.3:python3-devel] packages=python3-dev [debian:9.3:python3-pil] packages=python3-pil [debian:9.3:python3-reportlab] packages=python3-reportlab [debian:9.3:python3-pyqt5-dbus] packages=python3-dbus.mainloop.pyqt5 [debian:9.3:python3-pyqt5] packages=python3-pyqt5,gtk2-engines-pixbuf [debian:9.3:pyqt5] packages=gtk2-engines-pixbuf,python-pyqt5 [debian:9.3:pyqt5-dbus] packages=python-dbus.mainloop.pyqt5 [debian:9.3:automake] packages=automake1.11 [debian:9.3:epm] packages=epm That's it! Save the file, close it and then re-run the installer ./hplip-3.17.11.run which now should work. Once finished, you'll eventually need to reboot and run again hp-setup to install the printer, if it can't be detected at the first try. Good luck!
Post n°60 pubblicato il 29 Novembre 2017 da taichung
Su Linux utilizzare dei temi del desktop con colori scuri causa spesso problemi con il browser Firefox. Nel tempo ho provato ad adottare dei temi di colori per il mio desktop KDE, e relativa controparte gtk, che non andassero a cozzare coi colori di Firefox, ma senza risultato. Per avendo tentato di regolare le impostazioni all'interno del browser, il risultato non cambiava: area per l'immissione di testo in grigio scuro e testo nero, oppure sfondo bianco e testo in grigio chiarissimo... Per fortuna c'è un sistema che funziona. Bisogna impostare i colori all'interno di un file css (foglio di stile) appositamente creato. La soluzione l'ho trovata su https://superuser.com/questions/632980/firefox-input-field-color in pratica si deve creare ed editare un file all'interno della propria home directory:
dove YOUR-PROFILE è ovviamente la cartella che contiene il profilo di Firefox in uso, e che solitamente ha un nome strambo, che comunque potete trovare all'interno del file ~/.mozilla/firefox/profiles.ini Comunque, in ~/.mozilla/firefox/YOUR-PROFILE/chrome/userContent.css dovete scrivere quanto segue, per ottenere testo di colore nero e sfondo bianco:
In questo modo qualunque altro foglio di stile con tali istruzioni verrà sovrascritto dal vostro. Ovviamente nulla vieta di cambiare i colori a vostro piacimento od aggiungere altri stili. Nelle impostazioni dei colori di Firefox, io ho impostato testo di colore nero e sfondo bianco, tolto il flag all'opzione Usa i colori di sistema, e sotto Sostituisci i colori specificati nella pagina con quelli selezionati ho scelto l'opzione "mai" Salvate e riavviate Firefox affinché le modifiche abbiano effetto. Può essere che su alcuni siti ora vi ritroviate qualche oggetto (pulsanti, aree di testo) bianco anziché colorato, ma ne avrete sicuramente guadagnato in usabilità e leggibilità. PS: le suddette impostazioni si riflettono anche sugli editor WYSIWYG, nel caso li usiate...
Post n°59 pubblicato il 10 Settembre 2017 da taichung
Tag: exiftool
Exiftool è disponibile per tutte le maggiori distribuzioni Linux. Esso permette di rimuovere uono o più metadati di una fotografia, come la data, li tipo di apparecchio fotografico, la geolocalizzazione, l'uso del flash, l'apertura focale ecc. Per cancellarli tutti si usa il comando: # exiftool -all= /nomedirectory/nomefile.jpg Ovviamente si può utilizzare anche con immagini di formato diverso, png, raw, ecc. Di seguito alcuni esempi tratti dal sito http://owl.phy.queensu.ca/~phil/exiftool/examples.html : 0) Extract information from a file exiftool a.jpg A basic command to extract all metadata from a file named a.jpg.
1) Basic write example exiftool -artist=me a.jpg Writes Artist tag to a.jpg. Since no group is specified, EXIF:Artist will be written and all other existing Artist tags will be updated with the new value ("me").
2) Write multiple files exiftool -artist=me a.jpg b.jpg c.jpg Writes Artist tag to three image files.
3) Write to all files in a directory exiftool -artist=me /tmp/images Writes Artist tag to all files in directory /tmp/images.
4) Write multiple tags exiftool -artist="Phil Harvey" -copyright="2011 Phil Harvey" a.jpg Writes two tags to a.jpg.
5) Extracting duplicate tags exiftool -a -u -g1 a.jpg Print all meta information in an image, including duplicate and unknown tags, sorted by group (for family 1).
6) undefined exiftool -common dir Print common meta information for all images in dir.
7) undefined exiftool -T -createdate -aperture -shutterspeed -iso DIR > out.txt List meta information in tab-delimited column form for all images in directory DIR to an output text file named "out.txt".
8) undefined exiftool -s -ImageSize -ExposureTime b.jpg Print ImageSize and ExposureTime tag names and values.
9) undefined exiftool -l -canon c.jpg d.jpg Print standard Canon information from two image files.
10) undefined exiftool -r -w .txt -common pictures Recursively extract common meta information from files in C directory, writing text output into files with the same names but with a C<.txt> extension.
11) undefined exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg Save thumbnail image from C to a file called C.
12) undefined exiftool -b -JpgFromRaw -w _JFR.JPG -ext CRW -r . Recursively extract JPG image from all Canon CRW files in the current directory, adding C<_JFR.JPG> for the name of the output JPG files.
13) undefined exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg Print formatted date/time for all JPG files in the current directory.
14) undefined exiftool -IFD1:XResolution -IFD1:YResolution image.jpg Extract image resolution from EXIF IFD1 information (thumbnail image IFD).
15) undefined exiftool "-*resolution*" image.jpg Extract all tags with names containing the word "Resolution" from an image.
16) undefined exiftool -xmp:author:all -a image.jpg Extract all author-related XMP information from an image.
17) undefined exiftool -xmp -b a.jpg > out.xmp Extract complete XMP data record intact from a.jpg and write it to out.xmp using the special XMP tag (see the Extra Tags).
19) undefined exiftool -p '$filename has date $dateTimeOriginal' -q -f dir Print one line of output containing the file name and DateTimeOriginal for each image in directory dir.
21) undefined exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts Extract all GPS positions from an AVCHD video.
22) undefined exiftool -icc_profile -b -w icc image.jpg Save complete ICC_Profile from an image to an output file with the same name and an extension of C<.icc>.
23) undefined
exiftool -htmldump -w tmp/%f_%e.html t/images Generate HTML pages from a hex dump of EXIF information in all images from the C directory. The output HTML files are written to the C directory (which is created if it didn't exist), with names of the form "FILENAME_EXT.html"
Post n°58 pubblicato il 07 Settembre 2017 da taichung
In Linux per estrarre i sottotitoli contenuti in un file video Matroska, quelli con estensione mkv per intenderci, si fa ricorso alla suite di programmi mkvtoolnix. Essa sui sistemi simil Debian si installa col solito: # apt-get install mkvtoolnix Supponendo di avere un file video chiamato foobar.mkv da cui vogliamo estrarre i sottotitoli, dobbiamo innanzitutto individuare la traccia del file che li contiene. Ci avvaliamo a tale scopo del programma mkvmerge: # mkvmerge -i foobar.mkv Nella vostra finestra di terminale apparirà l'elenco delle tracce e fra queste il numero della traccia contenente i sottotitoli. Nel caso fossero presenti più tracce di sottotitoli, perché le lingue sottotitolate sono più di una, la fase seguente va ripetuta, modificando ogni volta il numero di traccia ed ovviamente il nome del sottotitolo, altrimenti lo sovrascrivereste: # mkvextract tracks foobar.mkv <num. traccia>:foobar.srt Ovviamente a <num. traccia> dovete sostituire il numero della traccia contenente i sottotitoli, ed a foobar il nome del vostro file video.
Post n°57 pubblicato il 07 Settembre 2017 da taichung
È possibile estarre le immagini contenute in un file pdf attraverso uno dei tool contenuti nella suite imagemagick, che deve quindi essere stata preventivamente installata. Si fa uso del programma convert, in essa contenuta. La sintassi è: # convert nomefile.pdf -append nomeimmagine%d.png Ciò creerà una serie di file del tipo nomeimmagine-0.png, nomeimmagine-1.png... Per ulteriori possibili opzioni, come sempre # man convert Ovviamente non è indispensabile utilizzare il formato png per le immagini risultanti, si può sceglierne anche un altro, JPG per esempio. La conversione dovrebbe funzionare anche con i file di tipo Post Script (.ps), ma non ho provato.
|
||||||||||||
|
Inviato da: cassetta2
il 23/08/2019 alle 12:59