experimenting with sending processes to backround

Sometimes I run tasks over ssh without starting screen first. I tend to regret that. So started experimenting with detaching running processes from the shell. (I'm using zsh btw. so this might not work with other shells)

Note this is just experimental, don't expect this to work. And never trust this for keeping critical processes alive.

# press [CRTL+Z] for putting a already running prozess in background

# display a list of jobs

# make a process run in background
bg %1

# keep the process running even when the termianl (ssh connection) quits
# in bash this should be: disown -h %1
disown %1

# find pids of disowned processes:
ps aux | grep commandName

# bring a disowned process to the foreground:
reptyr 1234

source: http://serverfault.com/questions/55880/moving-an-already-running-process-to-screen

install epson l355 on debian/ubuntu

get the dep here: http://www.openprinting.org/printer/Epson/Epson-L355_Series

install it

wget http://download.ebz.epson.net/dsc/op/stable/debian/dists/lsb3.2/main/binary-amd64/epson-inkjet-printer-201207w_1.0.0-1lsb3.2_amd64.deb
sudo dpkg -i epson-inkjet-printer-201207w_1.0.0-1lsb3.2_amd64.deb
sudo apt --fix-broken install

use cups interface to install printer:

resources: http://www.linuxquestions.org/questions/linux-hardware-18/cups-what-driver-to-use-for-an-epson-l355-printer-4175495655/

hash passwords for postfix and dovecot

I always have to look this up, so I guess I should write this down:

# hashing / encrypting passwords for dovecot + postfix email users
doveadm pw -s CRYPT

install Brother DCP-7030 on Ubuntu

This printer might not work on usb3 ports, disabling usb3 in bios setup could helps thou:

# download scanner driver from
# http://support.brother.com/g/s/id/linux/en/download_scn.html

# install scanner driver
sudo apt-get install brscan3-0.2.11-5.amd64.deb

# link missing files (if required)
sudo ln -s /usr/lib64/libbrscandec3.so /usr/lib/libbrscandec3.so

Edit libsane udev rules. eg: sudo gedit /lib/udev/rules.d/40-libsane.rules

Add the following 2 lines before "LABEL="libsane_rules_end"".

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

samba server share on debian 7

# install samba
sudo apt-get install samba

# add fileshare configuration to
# samba config file
# manipulate this to fit your needs
cat << EOF | sudo bash -c 'cat >> /etc/samba/smb.conf'
   comment = Some useful files
   read only = no
   locking = no
   path = /media/sharename
   guest ok = no

# optional, create new user for samba
#sudo adduser sambauser

# enable unix user for samba authentication
sudo smbpasswd -a sambauser

# restart samba
sudo service samba restart

resources: https://wiki.debian.org/SambaServerSimple

allow sudo for debian 7 user

# install sudo if not installed already
su -c 'apt-get install sudo'

# grant sudo privileges
su -c 'adduser <yourusername> sudo'

replace with the name of the use who will be given sudo rights.