arch: pacman automatic download

This little post explains how to enable download for packages of pacman. It uses a systemd service.

Create the download service (note the option -w for just downloading the packages):

$ sudo vim /etc/systemd/system/pacman-downloader.service
[Unit]
 Description=Automatic Update
 After=network-online.target 

[Service]
 Type=simple
 ExecStart=/usr/bin/pacman -Syuwq --noconfirm
 TimeoutStopSec=180
 KillMode=process
 KillSignal=SIGINT

[Install]
 WantedBy=multi-user.target

Create a timer service to launch the downloader:

$ sudo vim /etc/systemd/system/pacman-downloader.timer
[Unit]
 Description=Automatic Update when booted up after 5 minutes then check the system for updates every 60 minutes

[Timer]
 OnBootSec=5min
 OnUnitActiveSec=60min
 Unit=pacman-downloader.service

[Install]
 WantedBy=multi-user.target

Enable and start the service using systemctl.


Source-link: www.techrapid.co.uk

Advertisements

posting source code on wordpress.com

wordpress.com as an included feature/plugin for posting source code.
just check out: wordpress.com

notable options in an example:

language=bash collapse=true highlight=1,5,8 padlinenumbers=true/false title=(string)

edit zsh prompt

  1. append to .zshrc in home folder to import file:
    $ vim ~/.zshrc
    ...
    source .zshrc-prompt
  2. create .zshrc-prompt in home dir:
    $ cat .zshrc-prompt 
    # Prompt format: [USER@MACHINE:DIRECTORY] [TIME] \n →;
    
    # create bold fonting+color
    PROMPT="%{$terminfo[bold]$fg[green]%}[%{$fg[yellow]%}"
    
    # username@MACHINE:
    # %n username
    # %M machine
    PROMPT="$PROMPT%n@%M:"
    
    # directory
    # %~ directory and $HOME is repalced by ~
    PROMPT="$PROMPT$fg[blue]%}%~"
    
    # color stuff
    PROMPT="$PROMPT%{$fg[green]%}]%{$reset_color%}"
    
    # add time
    PROMPT="$PROMPT%{$terminfo[bold]$fg[black]%} [%*]"
    
    # add 2nd line
    PROMPT="$PROMPT
    %{$terminfo[bold]$fg[white]%}→ %{$reset_color%}"
    
  3. do same for root (same as (1)):
    $ vim /root/.zshrc
    ...
    source .zshrc-prompt
  4. similar to (2):
    $ cat /root/.zshrc-prompt 
    # Prompt format: [USER@MACHINE:DIRECTORY] [TIME] \n #;
    
    # create bold fonting+color
    PROMPT="%{$terminfo[bold]$fg[green]%}[%{$fg[red]%}"
    
    # username@MACHINE:
    # %n username
    # %M machine
    PROMPT="$PROMPT%n@%M:"
    
    # directory
    # %~ directory and $HOME is repalced by ~
    PROMPT="$PROMPT$fg[blue]%}%~"
    
    # color stuff
    PROMPT="$PROMPT%{$fg[green]%}]%{$reset_color%}"
    
    # add time
    PROMPT="$PROMPT%{$terminfo[bold]$fg[black]%} [%*]"
    
    # add 2nd line
    PROMPT="$PROMPT
    %{$terminfo[bold]$fg[red]%}# %{$reset_color%}"
    

FAHO printer

  1. install samba + smbclient (arch wiki)
  2. install cups + hplip (arch wiki)
  3. install printers:
    1. choose samba printers
    2. set path: smb://<name>:<pw>@sylvester/{hp4100,hp3525}
    3. install drivers: pcl3 NOT postscript
      • color hp3525:
        • official name: HP Color LaserJet CP3525 Printer
        • driver name: HP -> Color LaserJet cp3525 -> HP Color LaserJet CP3525 pcl3
        • duplex: installed
      • black-white hp4100:
        • official name: HP LaserJet 4100
        • driver: HP LaserJet 4100 pcl3
        • duplex: installed

Install Tipp10 under debian-based distros

Install the 10-finger practice-typing program “Tipp10”. It features addaptive lessons concerning indiviual typing errors, and much more..

  1. install 32-bit libraries:
    $ sudo apt-get install  libXcursor1:i386  libsm6:i386  libxrandr2:i386  libxi6:i386   libxinerama1:i386  libfreetype6:i386  libfontconfig1:i386  libglib2.0-0:i386  libstdc++6:i386
  2. download current version from their website: https://www.tipp10.com/en/download/getfile/5/
  3. install:
    $ sudo dpkg -i <Path/to/file.deb>

    Source:

    https://wiki.ubuntuusers.de/Schreibtrainer/

Install Firefox-Next (beta) on Mint, Ubuntu, Debian, etc…

  1. Add mozilla ppa:
    $ sudo add-apt-repository ppa:mozillateam/firefox-next
  2. get the ppa’s origin name (bold):
    $ apt-cache policy
    ...
     500 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu/ trusty/main Translation-en
     500 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu/ trusty/main i386 Packages
         release v=14.04,o=LP-PPA-mozillateam-firefox-next,a=trusty,n=trusty,l=Official PPA for Firefox Beta,c=main
         origin ppa.launchpad.net
     500 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu/ trusty/main amd64 Packages
         release v=14.04,o=LP-PPA-mozillateam-firefox-next,a=trusty,n=trusty,l=Official PPA for Firefox Beta,c=main
         origin ppa.launchpad.net
    ...
  3. Pinn the mozilla ppa for higher priority:
    $ cat /etc/apt/preferences.d/firefox-beta-pin-800
    Package:  *
    Pin: release o=LP-PPA-mozillateam-firefox-next
    Pin-Priority: 800
    
  4. update/upgrade:
    $ sudo apt update && sudo apt upgrade

    Sources:

http://www.webupd8.org/2011/05/firefox-5-beta-channel-ubuntu-ppa.html

http://askubuntu.com/questions/170235/how-do-i-cherry-pick-packages-from-a-ppa