ipod touch(IPT) and MobileCast

March 7, 2008

I bought an ipod touch recently. I used to listen to a podcast with a laptop through wifi in bed before I sleep. Now I can do this with IPT!
Even better, I found MobileCast. I can download a podcast through a wifi at work and listen to it on my way home.

Since I get busy, I have no time to download the podcast on a pc and then to plug the ipod to it to transfer the mp3 files to the ipod. This is especially annoying for a news program.

The next thing is to import a podcast list. Typing the feed address in IPT is not fun. I find a good way.

Edit a simple “opml” file with a list of my favorite podcast and save it to a web server. MobileCast can import it. Here is the opml file.

<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<opml version=”1.0″>
<head>
<dateCreated>07-Mar-2008</dateCreated>
</head>
<body>
<outline text=”NewsPod” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/radio/newspod/rss.xml”/>
<outline text=”Business Daily” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/worldservice/bizdaily/rss.xml”/>
<outline text=”Global News” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/worldservice/globalnews/rss.xml”/>
<outline text=”World Business” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/radio/worldbiz/rss.xml”/>
<outline text=”Science in Action” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/worldservice/scia/rss.xml”/>
<outline text=”Digital Planet” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml”/>
<outline text=”606 Football Phone-in” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/fivelive/606/rss.xml”/>
<outline text=”From Our Own Correspondent” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/radio4/fooc/rss.xml”/>
<outline text=”In Our Time With Melvyn Bragg” type=”rss” xmlUrl=”http://downloads.bbc.co.uk/podcasts/radio4/iot/rss.xml”/>
</body>
</opml>

“Close the lid” = “Suspend to memory” on thinkpad x40 and Ubuntu Gutsy

November 26, 2007

Having used debian Sarge, Etch, Lenny for three years on my thinkpad x40 laptop, I have recently switched to Ubuntu Gutsy because things (acpi and gui fails for users other than root due to permission issues on /dev/null etc) were broken when I upgrade from Etch to Lenny. This turns out to be a good move. More things worked out of the box. E.g. no need to recompile madwifi for the atheros WiFi chip.

The suspend-to-memory(F4) and suspend-to-disk(F12) also worked well. However, when I close the lid, it does not do suspend-to-memory. It does /etc/acpi/lid.sh which still consumes a lot of energy. This default behaviour drives me nuts. Now there is a simple solution:

cat /etc/acpi/events/lidbtn

I get

# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid

event=button[ /]lid
action=/etc/acpi/lid.sh

Simply replace the last line with

action=/etc/acpi/sleepbtn.sh

Done!

I would also hope to skip the password check after resuming since this protection does not make sense for a personal laptop. It was suggested to uncomment

LOCK_SCREEN=true

in /etc/default/acpi-support. But it does not work on x40. I will keep looking.

Set up chinese fonts using Microsoft’s simsun.ttf in Ubuntu 7.1 (Gutsy)

November 25, 2007

Mostly, I follow http://www.fwolf.com/blog/post/170, but that is old (for Ubuntu dapper). They suggested modifying /etc/fonts/fonts.conf which is bad in case of upgrading since fonts.conf will be overwritten. A better way is to add /etc/fonst/local.conf

1) My laptop has XP/Ubuntu Gutsy dual boot. The XP partition is mounted on /c.

mkdir /home/xgwang/win-fonts
cd /home/xgwang/win-fonts
cp /c/WINDOWS/Fonts/simsun.ttc simsun.ttf
cp /c/WINDOWS/Fonts/simhei.ttf .
cp /c/WINDOWS/Fonts/tahoma.ttf .
cp /c/WINDOWS/Fonts/tahomabd.ttf .
cp /c/WINDOWS/Fonts/verdana.ttf .
cp /c/WINDOWS/Fonts/verdanab.ttf .
cp /c/WINDOWS/Fonts/verdanai.ttf .
cp /c/WINDOWS/Fonts/verdanaz.ttf .
chmod 644 *

2)
cd /usr/share/fonts/truetype
ln -s /home/xgwang/win-fonts/ win-fonts
cd win-fonts
mkfontscale
mkfontdir

3)
fc-cache

4)Edit two files (due to Feisty and Gutsy’s new way of mananaging /etc/fonts/)
/etc/fonts/conf.avail/40-generic.conf
/etc/fonts/conf.avail/60-latin.conf
append
<family>Simsun</family>
after
<family>Bitstream Vera Serif</family>
in fields of ‘serif’, ‘sans-serif’, ‘monospace’

5)do the same in a new file, /etc/fonts/local.conf
(For a starting local.conf, copy http://www.gnome.org/fonts/local.conf)
append
<family>Simsun</family>
after
<family>Bitstream Vera Serif</family>
in ‘serif’, ‘sans-serif’, ‘monospace’

4) and 5) may not be needed both. Any one to confirm ?

Missing “Show Desktop” quick launch icon in XP

May 21, 2007

To recreate it :

  • Click Start->Run
  • In the “open” box, type “notepad” (without the quotes)
  • Click ok
  • Copy the following lines in your new notepad window :

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

  • Click “File” in the notepad menu and select “Save As”
  • Save the file to your desktop as “Show Desktop.scf”
  • Drag the new icon from your desktop to your Quick Launch toobar and select “Move here”

XGW’s note: this tip is copied from http://www.windows-help-central.com/show-desktop-icon-in-xp-missing.html

Today I configured pine to read and send gmail. Cool.

January 16, 2007

create a file .pinerc.gmail with the following contents

smtp-server=smtp.gmail.com/user=USERID@gmail.com/ssl

inbox-path={pop.gmail.com/pop3/ssl/user=USERID@gmail.com}inbox

Then,

pine -p .pinerc.gmail

The first time you run it, pine will insert other configuration stuff into .pinerc.gmail. This is fine. This is the simplest way.


Follow

Get every new post delivered to your Inbox.