Debian Notes

From Aktivix
Revision as of 00:52, 24 November 2010 by Upyxyjujynu (Talk | contribs)

Jump to: navigation, search

Some notes on customising Debian.


This is a outgoing mail application that can be used with mutt to sent email to a remote smtp server, eg

See the Esmtp_Riseup page for detailed notes on how to set up up to use for outgoing email.

apt-get install msmtp


dpkg -r exim4
apt-get install -y postfix

Then create a new pricate key, using and this shell script:

cd /root
mkdir bin
cd bin
chmod 700
cd ~

Then move the key to /etc/ssl/private/ and the cert to /etc/ssl/certs/

Then edit /etc/postfix/ and change the path to the keys:


Install the CAcert root:

cd /etc/ssl/
wget -O cacert.pem

And add this to /etc/postfix/

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/

# postgrey
smtpd_recipient_restrictions =
  check_policy_service inet:


dbndns is a Debian fork of djbdns:

apt-get install dnscache-run dnscache-run


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" \

The section part makes it appear in the root of the menu.

Then run:



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


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:

auth    requisite
auth    required readenv=1
auth    required readenv=1 envfile=/etc/default/locale
@include pam-ssh-auth
@include common-auth
auth    optional
@include common-account
session required
@include common-session
session optional auto_start
@include pam-ssh-session
@include common-password

See also

USB G3 Dongle

Huawei E1550

See the Huawei E1550 on Debian guide and and the HUAWEI E1550 on Debian, the second of these seems to be the most promising...

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

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:

<syntaxhighlight lang="bash"> [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 </syntaxhighlight>

Then start the connection with wvdial and Ctrl-C to end it:

<syntaxhighlight lang="bash">


--> 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 --> pppd: 6[7f] --> primary DNS address --> pppd: 6[7f] --> secondary DNS address --> pppd: 6[7f] </syntaxhighlight>

Check the data transfer allowance and the SMS messages on the phone using Gammu, first create ~/.gammurc and add this to it:

<syntaxhighlight lang="bash"> [gammu] port = /dev/ttyUSB0 model = connection = at19200 synchronizetime = yes logfile = logformat = nothing use_locking = gammuloc = </syntaxhighlight>


<syntaxhighlight lang="bash"> gammu --sendsms TEXT 789789 Enter message text and press ^D: BALANCE Sending SMS 1/1....waiting for network answer..OK, message reference=0 </syntaxhighlight>

<syntaxhighlight lang="bash"> 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 </syntaxhighlight>

<syntaxhighlight lang="bash"> 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.