Flex Builder Linux Alpha 2 on Debian Etch
I went to the Flex User Group http://ria.meetup.com/7/calendar/6862191/?a=wm1_rsvp yesterday because AIR is one of the technologies I’m most excited about at the moment. I was slightly surprised by the demographic, I think I was expecting a crowd of open source developers, much like you’d find at a hack day or geek event but somehow they didn’t seem as excited about the technologies Adobe are beginning to open up as I did. I wonder whether this is because most of the people who use Adobe products are less technical than the average person you might see at other events and therefore less interested in the new coding opportunities Flex and Air bring.
I got the slight impression that some people were just there for the free beer provided by Adobe (although maybe that’s just because I was sitting near the back by the bar) and others (including myself probably) had a feeling of "why should I do Adobe the favour of switching to flex". I think Adobe’s answer might be along the lines of "we’re doing enoughm just look at the numbers and if you don’t want to take advantage of it that’s up to you" so some of the questions seemed slightly hostile, but maybe I’m reading too much into it and applying my views to my impression of everyone else’s!
I was also slightly surprised by some of the attitudes of the speakers who made frequent references to a designer/developer divide saying things like "you’ll only be impressed with that if you are a developer". Maybe the audience for Adobe products does feature this divide but it surprised me nonetheless and I was surprised it was something the speakers wanted to encourage.
Anyway, despite the above observations I did find the event very interesting and am pleased Adobe are moving towards being more open. One question I asked in the Q&A section was "What are the timescales for AIR on Linux". The answer I got back was "soon" and it appears James Ward is as keen to get AIR on Linux as I am as it is his primary desktop too. Still, I pointed out that if Adobe wants to attract open source developers a Linux port would be pretty essential. Let’s hope it happens "soon" as James promised because developing AIR on FlexBuilder on VMWare is very painful! James also suggested I try the Flex Builder Alpha for Linux so here goes…
First install Java. To do this you’ll need to edit your apt sources list to use the non-free repository:
sudo vim /etc/apt/sources.list
Mine looks like this:
deb http://ftp.uk.debian.org/debian/ etch main non-free deb-src http://ftp.uk.debian.org/debian/ etch main non-free deb http://security.debian.org/ etch/updates main contrib deb-src http://security.debian.org/ etch/updates main contrib
Next install Java 5:
sudo apt-get update sudo apt-get install sun-java5-jdk
(You can probably get away with the JRE if you prefer, in which case install sun-java5-jre instead).
You’ll have to agree to the license:
Package configuration
┌───────────────────────┤ Configuring sun-java5-bin ├───────────────────────┐
│ │
│ Operating System Distributor License for Java v1.1 (DLJ) ↑
│ ▮
│ Operating System Distributor License for Java version 1.1 (DLJ) ▒
│ ▒
│ SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE JAVA PLATFORM ▒
│ STANDARD EDITION DEVELOPER KIT ("JDK" - THE "SOFTWARE") TO YOU ONLY UPON ▒
│ THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE ▒
│ AGREEMENT (THE "AGREEMENT"). PLEASE READ THE AGREEMENT CAREFULLY. BY ▒
│ INSTALLING, USING, OR DISTRIBUTING THIS SOFTWARE, YOU ACCEPT ALL OF THE ▒
│ TERMS OF THE AGREEMENT. ▒
│ ▒
│ 1. DEFINITIONS. "Software" means the code identified above in binary ▒
│ form, any other machine readable materials including, but not ▒
│ limited to, libraries, source files, header files, and data files), ↓
│
│ <Ok>
│ │
└───────────────────────────────────────────────────────────────────────────┘
Test Java is working by typing java -version at the command line. You should see something like this:
$ java -version java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
Next you’ll need Eclipse 3.3 or higher. Go to http://www.eclipse.org and download the Linux version (I chose Eclipse IDE for Java EE Developers). Extract the files and launch the program:
tar zxfv eclipse-jee-europa-fall2-linux-gtk.tar.gz cd eclipse ./eclipse
You’ll be asked where you want to create a workspace. I stuck with the default of /home/james/workspace. Eventually Eclipse loads. Once you are happy it is working you should exit it and you can finally you can get around to actually installing Flex Builder.
Download the alpha 2 from the Adobe website: http://labs.adobe.com/downloads/flexbuilder_linux.html then run these commands:
chmod 755 flexbuilder_linux_install_a2_121807.bin ./flexbuilder_linux_install_a2_121807.bin
You’ll see the following output:
Preparing to install... Extracting the installation resources from the installer archive... Configuring the installer for this system's environment... Launching installer...
Then the installer launches and after a few screens you are asked to choose your eclipse folder. This will be the location of the eclipse folder you just extracted. You’ll also be asked to install Flash Player 9 and you should choose to do so, even if you already have it because this version has debugging built-in.
The installation finishes with some errors which aren’t displayed. Instead you are asked to view the installation log but not told where this is and I couldn’t find it! The installer doesn’t tell you how to launch Flex Builder either, but it turns out you just load Eclipse again and Choose Help->Flex Builder whereupon you are asked to enter a license key and told you only have 65 days remaining. After all that effort it would have been nice to know this was only a 65 day trial if it really is. After clicking OK nothing happened (didn’t seem to be able to connect to flexstart.adobe.com) so I exited and tried again.
To get started you need to create a new project. Chose Project… from the File menu and choose a Flex Builder project. There is no support for AIR or BlazeDS so you can only create Flex applications targeting Flash Player 9 but this seems like a good start.
Here’s a screenshot:
http://jimmyg.org/wp-content/uploads/2008/01/flex_builder_running.png
So I think we can add Debian Etch to the list of platforms where Flex Builder works. Good work Adobe and keep it up!
P.S. Was that Evan Davis I spotted at the event? P.P.S Submit bugs!
gOS 2.0 Rocket Review
gOS Rocket is the second release of Good OS LLC’s operating system nicknamed the Google OS because rather than relying on traditional desktop applications, gOS is set up for you to work online instead and has icons launching many of Google’s applications placed directly on the desktop.
Many tech sites are making a big deal of this talking about how gOS allows the user to move their applications into the cloud, a name used for applications which run over many servers on the internet. In reality gOS is nothing more than a copy of Ubuntu with a customised enlightenment install instead of Gnome, and released under a more restrictive license than the original Ubuntu. Despite this obvious fact I can’t help but get very excited gOS myself because the fact gPCs are selling in large quantities means this OS does mark a significant shift in the way ordinary consumers of technology are thinking about what an application is.
Here’s a quick overview of the install as well as a few screenshots. I’d encourage you to download and burn it yourself if you are interested though. Installation is easy enough. You use bittorrent to download an ISO image which you burn to CD. After rebooting gOS live loads which lets you try the operating system without installing it and without it changing any settings on your computer.
As gOS boots you see a green screen with the gOS logo and a bar moving from left to right. A nice touch is that the bar moves with sinusoidal motion, slowing down as it reaches each end as if you are actually watching it side on as it moves around in a circle. You can see this release is still a bit rough around the edges though because after the previous screen disappears lots of usage messages are printed for each line of text output during the boot because some command is being used with the wrong arguments.
After a minute or two gOS finishes loading (it would be a lot quicker if you installed it rather than running from CD-ROM) and without clicking any buttons or having to sign in you arrive at the desktop:
The first thing you notice is the new application launcher at the bottom of the screen. This now resembles the Mac OS X Tiger dock even more closely with the icons growing larger as you move the mouse over them and extra applications you lauch appearing on the left of the bar. It does feel rather slick.
Here I’ve got my mouse over Google news and have both Firefox and the Gimp running (their icons are on the right).
The icons on the dock are:
Firefox Web Browser
GMail
GTalk
Google Calendar
Google Docs and Spreadsheets
Google Reader
Google Maps
Google News
Google Finance
Google Product Search
gBooth
YouTube
Blogger
Facebook
Wikipedia
Meebo
Skype
Xine Movie Player
Rhythmbox Music Player
Box.net
Tech Support
The gOS-specific applications you may not have heard of are gBooth, Box.net and Tech Support. gBooth is supposed to let you use a web cam but clicking the icon gives this error page on a Plesk-hosted website which hasn’t been configured yet. So that doesn’t work at all (not too great a start):
The Tech Support icon loads faqly.com in Firefox which you can visit from any browser and is just a simple question and answer site which isn’t too interesting.
The box.net icon is more interesting and loads this in Firefox:
When you click register as individual you are asked to edit your credit card details but it states you will only be charged the $7.95 per month after the 14 day trial period. You have to remember to cancel your trial or you will be charged.
Box.net is a nice service but there is no integration with the rest of the gOS desktop so there is no advantage of using it with gOS rather than on any operating system with a web browser.
One of the main features of this 2.0 version of gOS was supposed to be the inclusion of Google Gears to enable offline access to certain web applications. This isn’t actually installed for you when you load Firefox you are shown the screen below for you to install gears yourself. The other link (supposed to be a list of gears applications) just shows an untitled blank page at the moment.
Although the gears installation routine all completes successfully and the Google Gears Settings option appears on the Tools menu, gears doesn’t actually work. I’ve tried re-installing twice so I’d consider this a bug. SInce it was supposed to be a major feature of this release it is a bit disappointing.
Until gOS actually integrates features into the desktop it will be nothing more than a slightly flaky Linux install with some links to web pages. The concept is a good one but the implementation doesn’t live up to the hype. Perhaps the most impressive thing about gOS isn’t gOS itself, but rather the fact that the free web applications it relies on have evolved to the stage where they genuinely can be used to replace desktop applications.
Despite the slightly negative comments about the beta so far I’m still going to be watching the releases with interest as gOS really does represent the future and it won’t be too many years before I am using it or something similar as my main desktop.
Skype 1.4 (Beta) on Debian Linux
First install some dependencies:
$ sudo apt-get install libqt4-core libqt4-gui
Then download Skype from http://www.skype.com/download/skype/linux/ and install it like this:
$ sudo dpkg --install skype-debian_1.4.0.99-1_i386.deb
If all goes well you can run Skype like this:
$ skype
You’ll see a license agreement which you have to accept and then the Skype application.
If you don’t have an account you’ll need to sign up, otherwise enter your username and password and you are good to go.
If you have any problems check the terminal window you loaded Skype in for error messages. It is also worth loading the Gnome Sound Recorder and trying to record from the microphone to check your system is correctly recording and playing back sounds:
$ gnome-sound-recorder
Again, check the terminal window for any error messages. If sound recording isn’t working you should load the Gnome Volume Control application to ensure that your microphone is on and that the volume on it is turned up. You can load it with Applications->Sound and Video->Volume Control.
I found I had to change devices to use the OSS mixer before Skype worked. You do this in the Volume Control application’s menu. Chose File->Change Device.
Once sound is working correctly in Gnome, it is likely to work in Skype.
Converting Word RTF to PDF on Debian
This is actually very easy. First install Ted, an old UNIX text editor with this command:
$ sudo apt-get install ted
You’ll also need Ghostscript but this is probably already installed, if not run:
$ sudo apt-get install gs-afpl
Then download the rtf2pdf.sh script from ftp://ftp.nluug.nl/pub/editors/ted/rtf2pdf.sh and run this command:
$ sh rtf2pdf.sh file.rtf output.pdf
and that’s it, very easy and it actually works. I’ve attached a text version of the rtf2pdf.sh script here as well.
Here’s a very short program which uses this from Python:
import os
def convert(rtf, pdf):
pipe = os.popen("sh rtf2pdf.sh %s %s"%(rtf, pdf), "r")
error = pipe.read()
if error:
print "ERROR. An error occurred here is the description..."
print
print error
if __name__ == '__main__':
convert('test.rtf', 'test.pdf')
Orange GPRS via Samsung Bluetooth on Debian
I have a Samsung SHG-E250 mobile phone on Orange pay as you go in the UK. I’ve also got a Belkin USB bluetooth dongle model F8T013xx1 and I wanted to be able to access the internet from my Debian laptop over GPRS. This article is a working solution but there is a lot about the intricacies of what’s going on that I don’t understand so whilst I hope this is useful, I make no guarantees!
Paying a Provider
The first challenge is the cost. Standard tariffs is £4 per MB which is frankly outrageous. There is a handy trick you can use if you want to use GPRS on Orange. If you have Pay As You Go in the UK you get unlimited GPRS data until midnight that day for just £1. It is called an “Orange Extra” and you and rather than internet access it is called “Orange World”. From your phone dial 450 free. Then choose options 3111 followed by:
1 - Unlimited data until midnight for £1
2 - 4Mb total valid for 30 days for £4
3 - A week’s unlimited access for £5
The amount is taken off your Pay As You Go Balance immediately and you are asked to hold until the service has gone through and you are sent a txt after a few seconds confirming you can start using the service. You can check your remaining balance, including the Orange World access you just bought by dialing 453. You can use the unlimited data for £1 extra each day if you like.
Setting up Bluetooth on the Desktop
Once the financial side is sorted out you need to set up your connection. If you have installed the standard Gnome desktop then the “bluez” Bluetooth stack will already be set up. Just plug the dongle in and you can start pairing the devices. Right click the Bluetooth icon on the gnome panel which appears when you plug in the Bluetooth dongle. Choose preferences, give your computer a sensible name and choose “Visible and connectable for other devices”. My computer is called dirac-0 which you’ll see in some of the output later on.
On your phone turn on Bluetooth and select scan for devices to pair with the computer. You’ll be asked to enter a 4 digit pin. Choose something memorable. A message box will pop up on the desktop. Click it, enter the PIN and the devices will be bonded. That’s the easy bit, now time to test the connection.
Playing with Bluetooth
Scan for devices:
james@dirac:~$ sudo hcitool scan
Scanning …
00:1A:8A:86:6D:CE SGH-E250
Find out about a device:
james@dirac:~$ sudo hciconfig -a
hci0: Type: USB
BD Address: 00:0A:3A:7A:E6:53 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN
RX bytes:10237 acl:210 sco:0 events:217 errors:0
TX bytes:4609 acl:210 sco:0 commands:71 errors:0
Features: 0xff 0xff 0×8d 0xfe 0×9b 0xf9 0×00 0×80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: ‘dirac-0′
Class: 0×3e0100
Service Classes: Networking, Rendering, Capturing, Object Transfer, Audio
Device Class: Computer, Uncategorized
HCI Ver: 2.0 (0×3) HCI Rev: 0×4102 LMP Ver: 2.0 (0×3) LMP Subver: 0×430e
Manufacturer: Broadcom Corporation (15)
Ping a device:
james@dirac:~$ sudo l2ping 00:1A:8A:86:6D:CE
Ping: 00:1A:8A:86:6D:CE from 00:0A:3A:7A:E6:53 (data size 44) …
44 bytes from 00:1A:8A:86:6D:CE id 0 time 37.50ms
44 bytes from 00:1A:8A:86:6D:CE id 1 time 75.61ms
44 bytes from 00:1A:8A:86:6D:CE id 2 time 66.62ms
3 sent, 3 received, 0% loss
Connecting for Dial Up Networking
Once all that is working nicely it is time to search for a device with Dial Up Networking:
james@dirac:~$ sdptool search DUN
Inquiring …
Searching for DUN on 00:1A:8A:86:6D:CE …
Service Name: Dial-up Networking
Service RecHandle: 0×10002
Service Class ID List:
”Dialup Networking” (0×1103)
Protocol Descriptor List:
”L2CAP” (0×0100)
”RFCOMM” (0×0003)
Channel: 3
Profile Descriptor List:
”Dialup Networking” (0×1103)
Version: 0×0100
As you can see the device 00:1A:8A:86:6D:CE (which you know is an SGH-E250 phone from the sudo hcitool scan command you ran above) supports RFCOMM and on channel 3. It is important to make a note of the channel because you’ll need it for the next command:
james@dirac:~$ sudo rfcomm bind 0 00:1A:8A:86:6D:CE 3
james@dirac:~$ sudo rfcomm show 0
rfcomm0: 00:1A:8A:86:6D:CE channel 3 clean
This tells you that you now have your Bluetooth phone connected on /dev/rfcomm0. If you leave it too long after binding before trying the show command you might see this:
james@dirac:~$ sudo rfcomm show 0
rfcomm0: 03:00:00:00:00:00 channel 1 closed
In which case release and then bind again:
james@dirac:~$ sudo rfcomm release 0
james@dirac:~$ sudo rfcomm bind 0 00:1A:8A:86:6D:CE 3
james@dirac:~$ sudo rfcomm show 0
rfcomm0: 00:1A:8A:86:6D:CE channel 3 clean
Now you have a Bluetooth connection you are ready to set up your GPRS connection.
Testing Your Connection Settings
If you already know all the settings you need to use you can skip this bit and go straight to setting up the GPRS connection via PPP. Installing and playing with minicom isn’t strictly necessary, it will just help you track down problems more quickly.
First you’ll need a tool such as minicom.
james@dirac:~$ sudo apt-get install minicom
You need to add your user to the dialout group to use minicom as a non-root user.
Then create a configuration file:
sudo minicom -s
You get shown an options screen. In the “Serial port setup“ screen choose “A“ to make the
A - Serial Device : /dev/rfcomm0
Then choose “E“ to change the “Bps/Par/Bits“ to “57600 8N1“. You do this by pressing “H“ and “Q“. You can try 115200 later if 57600 works. Press “
To use your new configuration type:
minicom bluetooth.dfl
If you have any problems it is worth running “sudo rfcomm show 0“ again to check you still have a clean connection. If not, release the connection and bind to the channel again first.
When you run this command for the first time the phone will ask you something like: “DUN connect with dirac-0″. Choose yes.
Once you are connected you’ll see a screen like the one below. Type the following to initialise GPRS:
at
ate1
at+cgdcont=1,”IP”,”orangeinternet”,”",0,0
atdt*99#
After each line you should see an OK message except after the last line when you should see a CONNECT as shown below.
If you were able to connect successfully, great. If not you might need to search on the internet for the correct settings for your provider and phone. In particular the atdt*99# line might need changing.
Setting up PPP
If you want your phone to bind automatically you can edit your /etc/bluetooth/rfcomm.conf so it looks like this:
#
# RFCOMM configuration file.
#
rfcomm0 {
bind yes;
device 00:1A:8A:86:6D:CE;
channel 3;
comment “Bluetooth PPP Connection”;
}
Obviously you’ll need to enter the correct channel and device for your phone based on the output you received earlier from running sdptool search DUN. You’ll then need to restart Bluetooth with:
/etc/init.d/bluetooth restart
I chose not to add the lines to rfcomm.conf because I want to always manually connect my phone to avoid the chance of running up any unwanted bills (of course just binding to the device doesn’t mean I am connected to the internet but I’m just being paranoid).
If you want to bind manually you should do so now:
james@dirac:~$ sudo rfcomm bind 0 00:1A:8A:86:6D:CE 3
james@dirac:~$ sudo rfcomm show 0
rfcomm0: 00:1A:8A:86:6D:CE channel 3 clean
Next create the file /etc/ppp/peers/bluetooth and add the following content. I had to play around with this for a long time so if it doesn’t work for you, take a look at other examples for your phone/provider and mix and match commands from different configurations until it does. This example is based on the one from here.
# File:
# gprs
#
# Description:
# Serial cable, IrDA, Bluetooth and USB pppd options for GPRS phones.
# Keep pppd attached to the terminal:
# Comment this to get daemon mode pppd
nodetach
# Debug info from pppd:
# Comment this off, if you don’t need more info
debug
# Show password in debug messages
show-password
# Connect script:
connect ‘/usr/sbin/chat -v -f /etc/chatscripts/bluetooth’
# Disconnect script:
# AT commands used to ‘hangup’ the GPRS connection.
disconnect /etc/ppp/peers/gprs-disconnect-chat
# Serial device to which the GPRS phone is connected:
# /dev/ttyS0 for serial port (COM1 in Windows),
# /dev/ircomm0 for IrDA,
# /dev/ttyUB0 for Bluetooth (Bluez with rfcomm running) and
# /dev/ttyUSB0 for USB
#/dev/ttyS0 # serial port one
#/dev/ttyS1 # serial port two
#/dev/ircomm0 # IrDA serial port one
/dev/rfcomm0 # Bluetooth serial port one
#/dev/ttyUSB0 # USB serial device, for example Orange SPV
# Serial port line speed
115200 # fast enough
#57600 # perhaps usefull with IrDA
# Hardware flow control:
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
crtscts # serial cable, Bluetooth and USB
#nocrtscts # IrDA
# Ignore carrier detect signal from the modem:
local
# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else
:10.0.0.1
# pppd must not propose any IP address to the peer!
noipdefault
# Accept peers idea of our local address
ipcp-accept-local
# Add the ppp interface as default route to the IP routing table
defaultroute
# DNS servers from the phone:
# some phones support this, some don’t.
usepeerdns
# ppp compression:
# ppp compression may be used between the phone and the pppd, but the
# serial connection is usually not the bottleneck in GPRS, so the
# compression is useless (and with some phones need to disabled before
# the LCP negotiations succeed).
#novj
#nobsdcomp
#novjccomp
#nopcomp
#noaccomp
# The phone is not required to authenticate:
noauth
# Username and password:
# If username and password are required by the APN, put here the username
# and put the username-password combination to the secrets file:
# /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP
# authentication. See pppd man pages for details.
# Example, Radiolinja operator pap-secrets:
# “rlnet” * “internet” *
#user “rlnet”
#user “Orange”
# Asyncmap:
# some phones may require this option.
#asyncmap 0xa0000
# No magic:
# some phones may require this option.
nomagic
# Require PAP authentication:
# some phones may require this option.
#require-pap
Now you’ll need to create the /etc/chatscripts/bluetooth referenced in the file above:
TIMEOUT 35
ECHO ON
ABORT ‘\nBUSY\r’
ABORT ‘\nERROR\r’
ABORT ‘\nNO ANSWER\r’
ABORT ‘\nNO CARRIER\r’
ABORT ‘\nNO DIALTONE\r’
ABORT ‘\nRINGING\r\n\r\nRINGING\r’
” \rAT
OK ‘AT+CGDCONT=1,”IP”,”orangeinternet”,”",0,0′
OK ‘ATD*99#’
CONNECT “”
and also the /etc/ppp/peers/gprs-disconnect-chat script:
#!/bin/sh
#
# File:
# gprs-disconnect-chat
#
# send break
exec /usr/sbin/chat -V -s -S \
ABORT “BUSY” \
ABORT “ERROR” \
ABORT “NO DIALTONE” \
SAY “\nSending break to the modem\n” \
“” “\K” \
“” “+++ATH” \
SAY “\nPDP context detached\n”
You’ll need to make this one executable otherwise it won’t be able to be executed when you disconnect (not that it seems to be a huge problem).
Finally, update /etc/resolve.conf to use the Orange nameservers:
nameserver 193.35.133.10
nameserver 193.35.134.10
That’s pretty much it. Now bring down any other interfaces you have connected such as wirless or LAN connections so that when you connect over GPRS your routing tables will be set up correctly:
sudo ifdown eth0
Now check you are bound, cross your fingers and connect:
james@dirac:~$ sudo rfcomm bind 0 00:1A:8A:86:6D:CE 3
james@dirac:~$ sudo rfcomm show 0
rfcomm0: 00:1A:8A:86:6D:CE channel 3 clean
james@dirac:~$ sudo pon bluetooth
The final line is what does the connecting. A message should pop up on your phone asking for permission to start DUN. Choose yes and a load of messages should fly by and you should find yourself connected!
james@dirac:~$ sudo pon bluetooth
AT
OK
AT+CGDCONT=1,”IP”,”orangeinternet”,”",0,0
OK
ATD*99#
CONNECT
Serial connection established.
using channel 3
Using interface ppp0
Connect: ppp0 <--> /dev/rfcomm0
sent [LCP ConfReq id=0×1
rcvd [LCP ConfReq id=0×1
sent [LCP ConfAck id=0×1
rcvd [LCP ConfRej id=0×1
sent [LCP ConfReq id=0×2
rcvd [LCP ConfAck id=0×2
sent [LCP EchoReq id=0×0 magic=0×0]
sent [PAP AuthReq id=0×1 user=”dirac” password=”"]
rcvd [LCP EchoRep id=0×0 magic=0×0]
rcvd [PAP AuthAck id=0×1 “Login OK”]
Remote message: Login OK
PAP authentication succeeded
sent [CCP ConfReq id=0×1
sent [IPCP ConfReq id=0×1
rcvd [LCP ProtRej id=0×2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for ‘Compression Control Protocol’ (0×80fd) received
rcvd [IPCP ConfRej id=0×1
sent [IPCP ConfReq id=0×2
sent [IPCP ConfReq id=0×2
rcvd [IPCP ConfReq id=0×1
sent [IPCP ConfNak id=0×1
rcvd [IPCP ConfNak id=0×2
sent [IPCP ConfReq id=0×3
rcvd [IPCP ConfReq id=0×2
sent [IPCP ConfNak id=0×2
rcvd [IPCP ConfAck id=0×3
rcvd [IPCP ConfReq id=0×3
sent [IPCP ConfNak id=0×3
rcvd [IPCP ConfReq id=0×4
sent [IPCP ConfNak id=0×4
rcvd [IPCP ConfReq id=0×5
sent [IPCP ConfNak id=0×5
rcvd [IPCP ConfReq id=0×6
sent [IPCP ConfRej id=0×6
rcvd [IPCP ConfReq id=0×7
sent [IPCP ConfRej id=0×7
rcvd [IPCP ConfReq id=0×8]
sent [IPCP ConfAck id=0×8]
Cannot determine ethernet address for proxy ARP
local IP address 10.34.152.3
remote IP address 10.0.0.1
primary DNS address 193.35.133.10
secondary DNS address 193.35.134.10
Script /etc/ppp/ip-up started (pid 7253)
Script /etc/ppp/ip-up finished (pid 7253), status = 0×0
Disconnect by pressing Ctrl+C or as a last resort, turning off Bluetooth on your phone.
Terminating on signal 2
Connect time 2.2 minutes.
Sent 29700 bytes, received 2104 bytes.
Script /etc/ppp/ip-down started (pid 7324)
sent [LCP TermReq id=0×3 “User request”]
Script /etc/ppp/ip-down finished (pid 7324), status = 0×0
rcvd [LCP TermAck id=0×3]
Connection terminated.
Garbled time
Sending break to the modem
PDP context detached
Serial link disconnected.
james@dirac:~$
You can then connect again if you want to with:
james@dirac:~$ sudo pon bluetooth.
If things don’t work out first time my advice is to either try to work out properly what all the options mean in the PPP configuration or just use a bit of trial and error from other examples which have been written for your mobile provider, phone model or operating system. By the way, I’m using GPRS to write and save this blog entry now so it does work!
Update If you don’t set the nameservers in /etc/resolve.conf they get set for you automatically and if you comment out the :10.0.0.1 line in the /etc/ppp/peers/bluetooth line it still all works.
Gnome File and Program Associations in Debian
One niggle I’ve had with Gnome for a while is that when I click a link in Icedove (Debian’s name for the Thunderbird mail program) it loads the page in Epiphany, the Gnome browser, instead of Iceweasel (Debian’s version of Firefox). Also I use gVim as my text editor but text files load in gEdit by default.
I initially thought the “Preferred Applications” program would be the place to make the change, then I thought there might be a file associations program to handle my preferences but there didn’t appear to be. The reason for my problem was that I didn’t understand how Debian handles preferred applications.
Program associations are handled via the update-alternatives program which must be run as root. In Debian, programs register themselves as alternatives to perform the same actions. Debain will choose an alternative by default but if you want to change it you can use the command line program.
For example, to make Iceweasel my default browser I run this command:
james@dirac:~$ sudo update-alternatives --config x-www-browser
Here is the output:
There are 2 alternatives which provide `x-www-browser'.
Selection Alternative
———————————————–
*+ 1 /usr/bin/epiphany
2 /usr/bin/iceweasel
Press enter to keep the default[*], or type selection number: 2
Using `/usr/bin/iceweasel’ to provide `x-www-browser’.
Incidentally, the current choice is marked with a ’*’ and the choice with the highest priority with a ’+’.
Iceweasel is now the default alternative to handle any browser related actions throughout Gnome and indeed Debain. Handy eh?
Rather pleased with this I decided to change some other associations but needed to know what group name to use. You can see a list of all the alternatives with this command but you should never manually edit files in this directory. Use the update-alternatives program to do that.
ls -l /etc/alternatives/
Part of the output looks like this:
lrwxrwxrwx 1 root root 18 2007-07-21 11:57 x-www-browser -> /usr/bin/iceweasel
lrwxrwxrwx 1 root root 34 2007-07-21 11:57 x-www-browser.1.gz -> /usr/share/man /man1/iceweasel.1.gz
As you can see x-www-browser now points to /usr/bin/iceweasel but what is interesting is that the man page has also been updated as a dependency so that you don’t get a man page for a different browser when trying to access the help.
Well, that’s how to choose preferred applications, now for changing which applications are associated with which file types. I haven’t worked out how to do this on the command line so if anyone knows I’d like to hear but you can do it via the Gnome GUI.
Right click on a text file, choose Properties then click the Open With tab. The tab presents a list of alternatives for the particular file type. Simply choose the application you prefer and click OK. Those file types will now be associated with the application you’ve chosen.
Virused
I’ve managed to avoid a Windows Virus the entire time I’ve been using Windows but on Friday I finally made a mistake. I was copying files from my brother’s digital camera and inside the usual fuji_100 directory was another fuji_100 directory which I double clicked on. In fact it as an .exe file with an icon to look like a folder and the reason I didn’t spot it was that Windows was hiding the extension (even though I’ve told it not to).
I knew it was a virus the second the folder didn’t open but by then it was too late. The virus checker didn’t pick it up and it had already infected key Windows executables for logging in and shutting down. Running msconfig just turned off the computer so there was no hope of a simple repair. The really irritating thing was that this virus is probably fairly harmless since it must have been on my brother’s computer for at least 4 months (the last time he used his camera) but because I use my computer on other people’s netowrks I had no choice but to wipe the entire hard disk and restore Windows. To make matters worse, the restore disk also required me to wipe my Debian installation!
So, I’ve now reinstalled Windows, created a VMWare image from it, wiped the drive again and installed Debian over the top which will be my only operating system I use from now on with occasional use of a VMWare Windows image when it is really needed. Wish me luck with the switch!
Safari 3 Beta for Windows
Apple have announced a Safari 3 beta for Windows. The download is 8Mb and should make it easier for people like me to develop websites that work on the Mac version of Safari. I’ve already noticed the 3aims.com site doesn’t render correctly on Safari 3 so that is something I’ll look into.
What’s interesting is that the default install also includes Bonjour (Apple’s network discovery tool) and the Apple Software Update program. Does this mark a new trend of Apple is trying to launch core components on the PC?
It looks like the browser tries to use the Mac fonts but the rendering doesn’t look quite right to me.
Update: Sadly it seems to crash every time I exit with an error “The memory cannot be read”
Thunderbird 2
Thunderbird 2 has just been released and I’m pleased to see it includes a feature I’ve been waiting quite a long time for, namely the ability to tag messages. This is something I find much more natural than using folders to arrange email because often the same message should appear in more than one folder. Whilst it isn’t possible to place the same message in multiple folders without copying them it is possible to tag each message with multiple tags.
