5 temi per il Desktop LXQt
Mi sto cimentando nei file .qss dei temi, ecco i primi cinque risultati.
Per installare tutti insieme si può usare questo script:
#!/bin/bash
#check if root
if [ “$(id -u)” != “0” ]; then
echo “This script must be run as root” 1>&2
exit 1
fi
#check for git
hash git &> /dev/null
if [ $? -eq 1 ]; then
echo >&2 “Please install git to use this script”
exit 1
else
echo “Found git – ok”
fi
cd /tmp
for i in \
archlinux-dark \
silver \
black-red \
black-green \
icedo
echo “Downloading $i theme ………”
git clone -q https://github.com/stefonarch/$i
rm -rf $i/.gitcp -a $i /usr/share/lxqt/themes/
echo “LXQt theme ‘$i’ installed”
echo “+++++++++++++”
#cleanup
rm -rf $i
doneecho “Install finished”
Articoli correlati:
LXQt: servicemenu in Pcmanfm-qt
Nel percorso ~/.local/share/file-manager/actions si possono salvare azioni disponibili dal tasto destro, chiamati anche servicemenu (KDE), in relazione al tipo MIME del file (converti con soundkonverter è visibile solo con file audio ecc ecc)
Oggi avevo voglio di giocare e ho messo a punto quattro, partendo in alcuni casi di quelli di KDE ein altri da qui:
allega-thunderbird.desktop
[Desktop Entry]
Type=Action
Name=Attach to Thunderbird Mail
Name[it]=Allega a E-mail con Thunderbird
Name[es]=Enviar adjunto con Thunderbird
Name[de]=Als Anhang mit Thunderbird verschicken
Name[pt]=Anexar ao Thunderbird E-mail
Name[pt_BR]=Enviar arquivo(s) como anexo(s)
Name[fr]=Envoyer avec Thunderbird
Name[nl]=Voeg toe als bijlage aan Thunderbird
Name[pl]=Wyślij jako załącznik Thunderbirda
Name[ru]=Отправить с помощью Thunderbird
Name[cz]=Odeslat jako přílohu Thunderbirdem# For 64 bit systems use:
Icon=thunderbird
#Icon=/usr/lib64/thunderbird-3.0.7/chrome/icons/default/default16.png# For 32 bit systems use:
#Icon=/usr/lib/thunderbird/chrome/icons/default/default16.pngProfiles=profile-zero;
[X-Action-Profile profile-zero]
# This one works for some systems (don’t know exactly why).
# Exec=thunderbird -compose “attachment=’file:///$(echo %F | sed ‘s/\\ \\//,file:\\/\\//g’)'”
#Exec=thunderbird -compose “attachment=’file://$(echo %F | sed ‘s/\\ \\//,file:\\/\\//g’)'”# This one worked well for a Gentoo user
#Exec=thunderbird -compose \”attachment=\’file://`echo %F | sed \’s/\\\\ \\\\//,file:\\\\/\\\\/\\\\//g\’`\’\”# This one was tested for Mandriva 2011 and LinuxMint Olivia:
#Exec=thunderbird -compose “attachment=’$(echo %F | sed ‘s/\\ \\//,\\/\\//g’)'”
#This one works on arch
Exec=thunderbird -compose “attachment=’file://%U'”
Name=Default profile
convert_soundkonverter.desktop
[Desktop Entry]
Type=Action
Name=Converti con soundKonverter
Icon=soundkonverter
Profiles=profile-zero;[X-Action-Profile profile-zero]
MimeTypes=audio/*;
Exec=soundkonverter %F
Name=Default profile
edit_as_txt.desktop
[Desktop Entry]
Type=Action
Icon=accessories-text-editor
Name=Open as Text
Name[ca]=Obre com a text
Name[cs]=Otevřít jako Text
Name[de]=Als Textdatei bearbeiten
Name[el]=Άνοιγμα σαν Κείμενο
Name[es]=Abrir como texto
Name[fi]=Avaa tekstinä
Name[fr]=Ouvrir comme texte
Name[gl]=Abrir coma texto
Name[hu]=Megnyitás szövegként
Name[it]=Apri come testo
Name[lt]=Atverti kaip tekstą
Name[nb]=Rediger
Name[nl]=Openen als tekst
Name[nn]=Rediger
Name[pl]=Otwórz jako tekst
Name[pt]=Editar como Texto
Name[pt_BR]=Abrir como Texto
Name[pt_PT]=Editar como Texto
Name[ru]=Открыть как текст
Name[sl]=Odpri kot besedilo
Name[sr]=Отвори као текст
Name[sr@latin]=Otvori kao tekst
Name[sv]=RedigeraProfiles=profile-zero;
[X-Action-Profile profile-zero]
Exec=juffed %F
Name=Default profile
rootedit.desktop
[Desktop Entry]
Type=Action
Name=Modifica come root
Icon=dialog-password
Profiles=profile-zero;[X-Action-Profile profile-zero]
MimeTypes=text/plain;
Exec=lxsudo juffed %f
wallpaper.desktop
[Desktop Entry]
Type=Action
Name=Usa come sfondo
Icon=user-desktop
Profiles=profile-zero;[X-Action-Profile profile-zero]
MimeTypes=image/*;
Exec=pcmanfm-qt -w %f
Name=Default profile
Articoli correlati:
Ottimizzare SSD su un Mini PC
Ho preso questo minipc che consuma quasi nulla direttamente dalla Cina. Aggiunto un SS rimosso la scheda wireless e montato il vecchio disco fisso criptato con LUKS. Prima sorpresa: la tastiera usb non viene riconosciuto nel momento del passwd per il disco, risolto con un keyfile.
Altro problemino: si riavvia quando entra in sospensione, colpa della tastiera.
Attivato rc-local.service:
$ cat /etc/rc.local
#!/bin/bash
echo XHC > /proc/acpi/wakeup
exit 0
Molti modifiche per ottimizzare il SSD ho preso da qui.
$ cat /etc/fstab
LABEL=sistemassd / ext4 rw,noatime 0 1
/dev/mapper/main-var /var ext4 rw,relatime,data=ordered 0 2
/dev/mapper/main-home /home ext4 rw,relatime,data=ordered 0 2
/dev/mapper/main-swap none swap defaults 0 0
LABEL=ssd /home/stef/musica ext4 rw,noatime 0 2
##RAMDISK##
tmpfs /home/stef/.local/tmp tmpfs mode=1777,noatime 0 0
/var e swap e /home sul disco fisso /dev/sdb, il sistema (e la musica) sul SSD /dev/sda.
$ cat /sys/block/sda/queue/scheduler
noop [deadline] cfq
Installato profile-sync-daemon che carica i profili di browser in RAM:
$ psd p
Profile-sync-daemon v6.10 on Arch LinuxSystemd service is currently active.
Systemd resync-timer is currently active.
Overlayfs technology is currently inactive.Psd will manage the following per /home/stef/.config/psd/psd.conf:
browser/psname: chromium/chromium
owner/group id: stef/100
sync target: /home/stef/.config/chromium
tmpfs dir: /run/user/1000/stef-chromium
profile size: 27M
recovery dirs: nonebrowser/psname: firefox/firefox
owner/group id: stef/100
sync target: /home/stef/.mozilla/firefox/uj5ht294.linux
tmpfs dir: /run/user/1000/stef-firefox-uj5ht294.linux
profile size: 95M
recovery dirs: 1 <- delete with the c option dir path/size: /home/stef/.mozilla/firefox/uj5ht294.linux-backup-crashrecovery-20150922_170004 (213M) browser/psname: firefox/firefox owner/group id: stef/100 sync target: /home/stef/.mozilla/firefox/dz787k24.dev-edition-default tmpfs dir: /run/user/1000/stef-firefox-dz787k24.dev-edition-default profile size: 0 recovery dirs: 1 <- delete with the c option dir path/size: /home/stef/.mozilla/firefox/dz787k24.dev-edition-default-backup-crashrecovery-20150922_170017 (15M) browser/psname: icecat/icecat owner/group id: stef/100 sync target: /home/stef/.mozilla/icecat/52l6x0ss.ste tmpfs dir: /run/user/1000/stef-icecat-52l6x0ss.ste profile size: 18M recovery dirs: none browser/psname: otter-browser/otter-browser owner/group id: stef/100 sync target: /home/stef/.config/otter tmpfs dir: /run/user/1000/stef-otter-browser profile size: 88K recovery dirs: none browser/psname: qupzilla/qupzilla owner/group id: stef/100 sync target: /home/stef/.config/qupzilla tmpfs dir: /run/user/1000/stef-qupzilla profile size: 209M recovery dirs: 1 <- delete with the c option dir path/size: /home/stef/.config/qupzilla-backup-crashrecovery-20150929_131440 (122M)
Per montare la /home,/var e swap rimasti sul disco criptato con LUKS e LVM (viene chiesto il passw durante il boot):
# cat /etc/crypttab
main /dev/sdb2
Articoli correlati:
Come escludere definitivamente un tipo di file in digikam
Impostazioni > Tipo MIME : inserire -pef o -gif o quel che non si vuole mai vedere in digikam e premere ok in fondo (non il ricarica!pulisci verde a destra).
Articoli correlati:
Verificare manomissione MBR e partizione /boot
Questo è per i paranoici o per chi ha veramente bisogno di essere sicuro che nessuna ha manipolato (per esempio installando un keylogger) la partizione di /boot o il MBR (avendo accesso fisico alla macchina) e ha già tutto il disco criptato. Il primo script crea i due checksum per il MBR e della partizione /boot.
Per sicurezza la partizione /boot non dovrebbe essere anche mai montato all’avvio ma solo quando si aggiorna il kernel.
Ovviamente va eseguito nuovamente dopo ogni aggiornamento dei kernel. Sostituire il nome del utente in entrambi e eseguire il primo da root o con sudo.
##Boot_Integrity_Update.sh #Controllo filesystem di /boot umount /boot e2fsck /dev/sda1 # creazione della directory per gli shasums mkdir -p /home/utente/.boot_integrity # creazione di immagine del settore boot dd if=/dev/sda of=/home/utente/.boot_integrity/bootsectorimage bs=512 count=1 #salva shasum del settore boot in ~/.boot_integrity shasum /home/utente/.boot_integrity/bootsectorimage > /home/utente/.boot_integrity/bootsector #pulizia rm /home/utente/.boot_integrity/bootsectorimage #salva shasum della partizione boot in ~/.boot_integrity shasum /dev/sda1 > /home/utente/.boot_integrity/bootpartition
Il secondo script paragona i valori salvati in precedenza con quelli attuali. Ogni modifica dell’initramd o del kernel o altre modifiche fatte in /boot o nel MBR vengono segnalati con un avviso.
#! /bin/bash xmessage -c -timeout 2 "Controllo modifiche file di boot.." # creazione hash 512 B boot sector mkdir -p /tmp/booted dd if=/dev/sda of=/tmp/booted/bootsectorimage bs=512 count=1 shasum /tmp/booted/bootsectorimage > /tmp/booted/bootsector rm /tmp/booted/bootsectorimage # creazione hash per partizione /boot shasum /dev/sda1 > /tmp/booted/bootpartition # Imposta variabili per i hash SECTORIMAGE=$(head -c 32 /tmp/booted/bootsector) PARTITION=$(head -c 32 /tmp/booted/bootpartition) # Imposta variabili per hash "buoni" KNOWNSECTORIMAGE=$(head -c 32 /home/utente/.boot_integrity/bootsector) KNOWNPARTITION=$(head -c 32 /home/utente/.boot_integrity/bootpartition) # Paragona i hash if test $SECTORIMAGE != $KNOWNSECTORIMAGE ; then xmessage -c “WARNING-BOOT SECTOR HASH MISMATCH-a password logger may be present in boot loader “ else xmessage -c -timeout 2 "MBR SECTOR CHECK OK" fi if test $PARTITION != $KNOWNPARTITION; then xmessage -c "WARNING-BOOT PARTITION HASH MISMATCH-a password logger may be present in bootloader stages, kernel or initramfs" else xmessage -c -timeout 2 "PARTZIONE BOOT CHECK OK" fi exit 0
[da qui]
Articoli correlati:
Potenziare la ricerca nella history di bash
Per chi usa spesso il terminale volendo riusare comandi già dati è frequente. Il primo passo è usare la freccia insù che ripassa una dopo l’altro, il secondo magari usare comandi tipo
history |grep mount
il terzo usare cltr+r e digitare qualche lettera ma il massimo forse è la BASH History Suggest Box, comando: hh.
Si installa su arch da AUR, su *ubuntu inserendo il ppa (di solo questo software quindi senza rischi)
sudo add-apt-repository ppa:ultradvorka/ppa
sudo apt-get update
sudo apt-get install hh
Digitare per filtrare, sù/giù per selezionare, TAB per usare/modificare il comando selezionato o invio per ridarlo direttamente, Canc per toglierlo dalla history.
Per usare ctrl+r per attivare hh basta modificare :
hh –show-configuration >> ~/.bashrc
Questo aumenta tra altro anche da 500 a 10’000 le voci memorizzate.
Articoli correlati:
Passare da Photoshop a Gimp
Per chi è abituato a photoshop e le sue scorciatoie e modo di fare: un bel tutorial come rendere facile il passaggio.