Debian Notes
Some notes on customising Debian.
msmtp
This is a outgoing mail application that can be used with mutt to sent email to a remote smtp server, eg riseup.net.
See the Esmtp_Riseup page for detailed notes on how to set up up to use riseup.net for outgoing email.
apt-get install msmtp
Postfix
dpkg -r exim4 apt-get install -y postfix
Then create a new pricate key, using http://cacert.org/ and this shell script: http://wiki.cacert.org/wiki/VhostTaskForce#ShellScript
cd /root mkdir bin cd bin wget http://guillaume.romagny.free.fr/evaldo/csr.sh chmod 700 csr.sh cd ~ ./bin/csr.sh
Then move the key to /etc/ssl/private/ and the cert to /etc/ssl/certs/
Then edit /etc/postfix/main.cf and change the path to the keys:
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
Install the CAcert root:
cd /etc/ssl/ wget http://www.cacert.org/cacert.crt -O cacert.pem
And add this to /etc/postfix/main.cf:
smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes
smtp_use_tls = yes smtp_enforce_tls = no smtp_tls_key_file =/etc/ssl/private/server-name_privatekey.pem smtp_tls_cert_file =/etc/ssl/certs/server-name_server.pem smtp_tls_CAfile =/etc/ssl/cacert.pem smtp_tls_loglevel = 1
Then install postgrey and add the following to /etc/postfix/main.cf:
# postgrey smtpd_recipient_restrictions = reject_non_fqdn_sender, reject_non_fqdn_recipient, permit_mynetworks, reject_unknown_sender_domain, reject_unauth_destination, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client smtp.dnsbl.sorbs.net, check_policy_service inet:127.0.0.1:60000 permit
DNS
dbndns is a Debian fork of djbdns:
apt-get install dnscache-run dnscache-run
Menu
To make UXTerm appear at the root of the menu in WindowMaker (and other window managers) create a ~/.menu/ directory and add this to it:
?package(xterm): \ needs="x11" \ section="/" \ longtitle="XTerm: terminal emulator for X with Unicode support" \ title="XTerm (Unicode)" \ icon="/usr/share/pixmaps/xterm-color_32x32.xpm" \ command="uxterm"
The section part makes it appear in the root of the menu.
Then run:
update-menus
UXterm
To make UXterm start with a large font size edit /etc/X11/app-defaults/UXTerm
*VT100.font1: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1 *VT100.font2: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 *VT100.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1 *VT100.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1 *VT100.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 *VT100.font: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
Flash Player
http://forums.debian.net/viewtopic.php?t=28572
libpam-ssh
Login with your ssh passphrase.
apt-get install pam-ssh
Then check the instructions in /usr/share/doc/libpam-ssh/README.Debian and edit /etc/pam.d/gdm to:
#%PAM-1.0 auth requisite pam_nologin.so auth required pam_env.so readenv=1 auth required pam_env.so readenv=1 envfile=/etc/default/locale @include pam-ssh-auth @include common-auth auth optional pam_gnome_keyring.so @include common-account session required pam_limits.so @include common-session session optional pam_gnome_keyring.so auto_start @include pam-ssh-session @include common-password
See also http://pam-ssh.sourceforge.net/
USB G3 Dongle
Huawei E1550
See the Huawei E1550 on Debian guide and Three.co.uk and the HUAWEI E1550 on Debian, the second of these seems to be the most promising...
wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.5.tar.bz2 bunzip2 usb_modeswitch-1.0.5.tar.bz2 tar -xvf usb_modeswitch-1.0.5.tar cd usb_modeswitch-1.0.5 gcc -l usb -o usb_modeswitch usb_modeswitch.c sudo make install cd /etc sudo wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.conf
Huawei E160
Notes about using a Huawei E160, which costs £5 per month with 1Gb data transfer from Virgin.
Edit /etc/wvdial.conf and change it to:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
Username = ;
New PPPD = yes
Password = ;
Phone = *99#
Modem = /dev/ttyUSB0
Baud = 460800
Then start the connection with wvdial and Ctrl-C to end it:
wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Wed Jul 15 11:05:51 2009
--> Pid of pppd: 7061
--> Using interface ppp0
--> pppd: 6[7f]
--> pppd: 6[7f]
--> pppd: 6[7f]
--> pppd: 6[7f]
--> pppd: 6[7f]
--> pppd: 6[7f]
--> pppd: 6[7f]
--> local IP address 10.190.XXX.XXX
--> pppd: 6[7f]
--> remote IP address 10.64.64.64
--> pppd: 6[7f]
--> primary DNS address 149.254.192.126
--> pppd: 6[7f]
--> secondary DNS address 149.254.201.126
--> pppd: 6[7f]
Check the data transfer allowance and the SMS messages on the phone using Gammu, first create ~/.gammurc and add this to it:
[gammu]
port = /dev/ttyUSB0
model =
connection = at19200
synchronizetime = yes
logfile =
logformat = nothing
use_locking =
gammuloc =
Then:
gammu --sendsms TEXT 789789
Enter message text and press ^D:
BALANCE
Sending SMS 1/1....waiting for network answer..OK, message reference=0
gammu getsmsfolders
1. " Inbox", SIM memory, Inbox folder
2. " Outbox", SIM memory, Outbox folder
3. " Inbox", phone memory, Inbox folder
4. " Outbox", phone memory, Outbox folder
gammu --getsms folder 1
Location 1, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+44XXXXXXXXXXX"
Sent : Wed 15 Jul 2009 11:32:56 GMT +0100
Coding : Default GSM alphabet (no compression)
Remote number : "789789"
Status : UnRead
You have 1043610 Data Allowance left.