Search This Blog

Sunday 31 January 2010

Real Audio to MP3

Taken from here

Download the Audio Stream into a File

The easiest way to convert Real Audio streams to MP3 format is via MPlayer, the incredibly wonderfully marvelous multimedia player for Linux. If you install it correctly, i.e. with the correct Real Audio libraries, the process is as simple as:

mplayer -playlist file.ram -ao pcm -aofile file.wav -vc dummy -vo null

where file.ram is the file containing the actual URL of the Real Audio file. An example URL from the always interesting New Sounds radio show is:

pnm://66.150.15.101:7070/realimpact/wnyc/rans/newsounds2073.ra?cloakport=80,554,7070

You can usually obtain the files containing the URLs by shift clicking on the desired Real Audio stream file rather than just clicking on it. This will allow you to save the URL to a file that will replace the file.ram placeholder file in the mplayer command. It's a good idea to replace file in the string file.wav with the same thing you used to replace it in file.ram. And by the way, there's nothing sacred about the ram suffix. You can use any file name you want for the URL file, with or without a suffix. It's a good idea, though, to retain the wav suffix since it's a WAV file you're going to create and that's a standard suffix for such things.

Converting to MP3

Once you've obtained your desired URL file and run the above command, mplayer will download the Real Audio file in real time, i.e. if the Real Audio file is an hour long it will take an hour, and convert it on the fly into WAV format. After the file's been completely downloaded - and these can get pretty big, e.g. 600 or more megabytes for a hour-long show - you can convert the WAV file to an MP3 file via the usual procedure, e.g.

lame file.wav file.mp3

It's just that easy.

del.icio.us

This is a great resource, as the inconvenience of not quite remembering URLs is a thing of the past.

The danger is that the links become out of date (though that equally applies to conventional bookmarking) and that everything is stored and "can't see the wood for the trees".

Anything, therefore, with "tips" and the like, I will post on the blog so it's all in one place. And try to prune del.icio.us down a little.

Adding Directory to a Path

Pre and Post Pathing

Linux determines the executable search path with the $PATH environment variable. To add directory /data/myscripts to the beginning of the $PATH environment variable, use the following:

PATH=/data/myscripts:$PATH

To add that directory to the end of the path, use the following command:

PATH=$PATH:/data/myscripts

Monday 25 January 2010

Mac OS X restart Finder

COMMAND-ALT-ESCAPE

Ubuntu available space

df -h

Ubuntu Clear Log Files

Re: How do I clear my log files?

Deleting the log files should be safe, though it contains subdirectories that also need to be recreated if you remove it with rm -r. Instead, use find to only remove the files.

Code:

sudo find /var/log -type f

will list all files under /var/log. Adding -delete behind that command will delete those files (i.e sudo find /var/log -type f - delete)

Sunday 24 January 2010

Stupid questions... and helpful answers

One of the joys of the Internet is the amount of people who are willing to share their knowledge and expertise, with great patience and humour.

Having not grown up with the Internet, and only seeing the beginnings of it when I was well into my 20's, it still wows me that this huge repository of knowledge is available so readily.

My early interactions were sending text only emails to the IMDB to pull information from their database. Along with that, I remember subscribing to the Pink Floyd "Echoes" mailing list and being enlightened by their FAQs.

At this time, I had no connectivity at home. My employer used a mainframe based email system, but with a bit of research it was possible to establish how to make my ID into an external email address (all of which had an @IBMMAIL domain), and this gave limited access to the outside world, although of course finding others with the ability to communicate was a struggle.

Fast forward a couple of years, and a new employer, and we had a dedicated PC that could access the web. I set myself up with a usa.net email address, which seemed to attract any spam that was going. This was around 1996. Alta Vista was the search engine of choice. We were using a Microsoft Mail package internally, but still no outside contact for us.

1998, though, found me working at a subsidiary of a major bank, and for the first time I was using an Exchange server and could begin to communicate more freely.

I also got my first second hand PC at this time, and was using dial-up connections via a number of different ISPs to try and take advantage of the free elements of their packages that were available. Things like 60 minutes of free time, at which point you had to log off and back on again.

Napster honed into view. Wow. Free music. What a great idea.

October 2000 I bought my first "new" PC - a Gateway running Win 98, which I ultimately updated to XP, dual booted, etc, etc.

I was ISP'd up with Tiscali, and then ventured into broadband. But then I realised the more I knew, the more I needed (well, wanted) to know. And that is where forums came in. What an amazing thing these were - there were people asking questions, and others willing to patiently help them (well, most times).

So I plunged in, using forums like DVD+RW, vcdhelp, Windows forums, then into Libranet, and finally into more general Linux and Ubuntu forums, and then to Mac OS X.

This blog is really a way for me to store lots of memories, tips, guides, etc; in one place so - should the originating sites disappear - I can still go back to the tips I used initially. And this is particularly the intent with this post, which will be a bunch of links to the original sites, along with the relevant text extracts. I'll start with those from the Ubuntu Forums.


[SOLVED] USB Mouse and Screen Display issues on new Dell install

Extract:

Having already satisfactorily installed Ubuntu on my own ageing Gateway, I decided at the weekend to do the same on my son's new (3 month old) Dell.

Install didn't proceed too smoothly at first - kept sticking at partitioning stage. Then I read some forum posts following a Google search, one of which recommended a defrag first, and once I'd done that it was fine.

However, even when going through install, I noticed screen display was strange - the interactive map where you choose your locale was effectively scrolling down the screen in a very jerky manner.

The same now happens that the install is complete - particularly noticeable on Firefox, but even on text files. I did a search and this seems to be connected to screen resolution, but what do I need to set it at? And is there a way that this can be done so there is one defined screen resolution for Ubuntu, and another for Win XP (it's dual boot, and I don't have the same issues on Win)

The mouse is also strange - keeps freezing, and can only be resolved by unplugging mouse and plugging it in again. Again, a search seems to suggest this is a known bug, but is there a cure?

Response:

I did some searches on Google on how to solve this, and came across this thread - http://ubuntuforums.org/showthread.php?t=279626&page=9&highlight=e521http://ubuntuforums.org/showthread.php?t=279626&page=9&highlight=e521 - which suggested installing new Dell drivers here - http://support.dell.com/support/down...&fileid=190570http://support.dell.com/support/downloads/download.aspx?c=us&cs=04&l=en&s=bsd&releaseid=R142795&SystemID=DIM_P4_C521&os=WW1&osl=en&deviceid=308&devlib=0&typecnt=1&vercnt=4&formatcnt=1&libid=1&fileid=190570

I did that, it took a couple of minutes or so, and then rebooted in WinXP to check all OK (it was) and then in Ubuntu as well (also fine)

No mouse freeze-ups since, and scrolling issue gone too!

[SOLVED] Checking Cron is working?

Extract:

I have two Cron related questions. I'm using KCron as I still like the comfort of a GUI!

What I'd like to know is:

- Do I need to do anything to make sure Cron is running at startup? Is it defaulted to that and how can I doublecheck it's still set up that way?
- Is there a way to make a terminal window appear so I can see the Cron job is running?

Response:

By default, the cron daemon runs with the computer start. But you can confirm that by placing a job on the cron that writes something to a file, or appending this command to your already made cron job:

echo "Hello World, I'm working" >> /home/myuser/cronlog.txt


[SOLVED] Moving files from folders to one location

Extract:

I download a number of podcasts using Icepodder. Individual directories are set up for each.

I want to move the files into one directory so I can copy them en masse to mp3 player. So far, I have been doing this by a mv script stating the full directory paths each time. This works, but every time I subscribe to a new podcast I need to do a new script - I'd rather have one that finds them all.

And that seems to be part of the cure - find.


Code:
find /media/hdb1/My\ Music/Podcasts -name *mp3
will happily list them all (they are on my windows drive)

But if I try:

Code:
mv `find /media/hdb1/My\ Music/Podcasts -name *mp3` `/media/hdb1/My\ Music/Podcasts/`
I run foul of spaces in the names of the individual podcast directories (which of course, I can't change, as they will only be changed again when new podcasts come along for that series) and get something like this:

Code:
bash: /media/hdb1/My Music/Podcasts/: is a directory
mv: target `Unlimited/hoggart290307.mp3' is not a directory
and if I try:
Code:
mv `find /media/hdb1/My\ Music/Podcasts -name *mp3` /media/hdb1/My\ Music/Podcasts
I get:

Code:
mv: cannot stat `Guardian': No such file or directory
mv: cannot stat `Unlimited/hoggart290307.mp3': No such file or directory
, etc

So, I'm nearly there! Can someone help me overcome the last obstacle please?!

Response:


This solved it:

find ./ -name '*.mp3' | while read FILE

do

mv "$FILE"

done


Re: "Open file" not showing all options

Try right-clicking on empty space in Open and there should be a 'show hidden files' option.

Assigning static IP address on Dual Boot Machine

Extract:

OK, my son has a Dell dual boot PC, Win XP and Ubuntu. It connects to the network using an Acer Homeplug.

Also on the network are three other laptops (one running Vista and two Acer Aspires running Linpus), and this machine, a Mac. These all connect wirelessly to my Belkin ADSL router.

I have decided I want all machines to have static IP addresses, and then turn off the DHCP server.

This has worked with all but my son's PC.

I have edited /etc/network/interfaces to show the new connection, changing the eth0 entry to refer to static rather than dhcp. This MAY be my first issue, at least according to this article - https://help.ubuntu.com/community/NetworkManager - should I have not done this and left it to Network Manager?

However, I also read that there is an issue with dual boot machines in that Win "hangs on" to the connection, particularly with NVIDIA cards (which I have a feeling the Dell has)

I have tried /etc/init.d/networking restart many times, but after doing so I still can't ping anything, not even the router.

Should I be making the changes in System -> Administration -> Networking and then just referring to the connection in Network Manager?

Seeing other posts about issues with NM, should I be using it at all?

Hope someone can help.

I just noticed the thing about System -> Administration -> Networking, and as my son is now in bed, I can't try that one out tonight!!!

Response:

If it's Intrepid, Network Manager may also cause problems with static addresses. Here is a How-To for setting up static address via NM, and here is a proposal to remove NM and re-install the old manager.

Setting VLC Preferences on Acer Aspire tiny screen!!!

Extract:

My son has an Acer Aspire running Ubuntu. Although it has only a small screen, that's not usually a problem.

However, for some reason we've noticed recently that VLC quits unexpectedly when trying to play MPEGs and AVIs. A forum post here (http://ubuntuforums.org/showthread.php?t=962291) suggests a solution, but when I call up the Preferences window in VLC, I can't get to the bottom of the window to click confirm to my changes!!!

Is there an alternative route I can take, either via terminal or by changing the config file? I see video output in the latter, but nothing I could see defaults which video output it should be (and indeed all the text in the file is hashed out)

Response:

 
if you can't see the bottom of the preferences window then just press the "Enter" key on keyboard after making change(s), the changes will be saved. Then close and restart vlc to load change(s)

(thinking you are trying to change the video output to X11 video output

If for some reason you bork up the settings and can't see the 'reset preferences' button than this from terminal will set back to default


Code:
vlc --reset-config
or if vlc suddenly misbehaves
Code:
vlc --reset-plugins-cache
or combine the 2
Code:
vlc --reset-config --reset-plugins-cache

Wireless not working on Acer Aspire One

Extract:

Having previously run Jaunty and wireless worked perfectly, updated to Karmic. Maybe I should have been alerted during install when the network connection seemed to disappear, and when I re-started, wireless will no longer work.

I've tried reinstalling network manager and network manager gnome (via ethernet) - no joy.

Also tried removing all lines from /etc/interfaces except:

auto lo
iface lo inet loopback

(seen on another post)

That didn't work either.

What else could I try please?

Response:

It seemed that allowing the Acers to do the drive check on boot resolved this....

More hardware....

Even prior to buying the Acers, we had embarked on the next step in growing our ever expanding home network. In this case, it was a HP G7035ea M540 1GB 15.4" Laptop, from Tesco Direct, costing £329, running Vista, and described by the ever helpful Amazon thusly:
# Product Description: HP G7035EA - C 540 1.86 GHz - 15.4" TFT
# Recommended Use: Home use
# Dimensions (WxDxH): 35.7 cm x 25.7 cm x 4 cm
# Weight: 3.1 kg
# System Type: Notebook
# Built-in Devices: Stereo speakers, wireless LAN aerial
# Processor: Intel Celeron 540 / 1.86 GHz
# Cache Memory: 1 MB - L2 Cache
# RAM: 1 GB (installed) / 2 GB (max) - DDR2 SDRAM ( 1 x 1 GB )
# Hard Drive: 120 GB - Serial ATA-150 - 5400 rpm
# Optical Storage: DVD±RW (±R DL) / DVD-RAM
# Display: 15.4" TFT 1280 x 800 ( WXGA ) - BrightView
# Graphics Controller: Intel GMA X3100 Dynamic Video Memory Technology 4.0
# Memory Allocation Technology: Dynamic Video Memory Technology 4.0
# Telecom: Fax / modem - 56 Kbps
# Networking: Network adapter - Ethernet, Fast Ethernet, IEEE 802.11b, IEEE 802.11g
# Notebook Camera: Integrated
# Input Device: Keyboard, touchpad, QuickPlay
# Battery: Lithium Ion
# Operating System: Microsoft Windows Vista Home Basic

It looks like this:

HP G7035EA - C 540 / 1.86 GHz - RAM 1 GB - HDD 120 GB - DVD±RW (±R DL) / DVD-RAM - GMA X3100 - WLAN : 802.11b/g - Vista Home Basic - 15.4" Widescreen TFT 1280 x 800 ( WXGA ) BrightView - camera




This machine was intended for use at school. It's the only one (so far) we've had to have repairs on - relating to the touchpad.

I very quickly made it into dual boot and installed Ubuntu. For more experimentation, I tried this approach of making it look like Mac OS. Bit of a waste of time really - won't be doing that again!

Wireless on Ubuntu was incredibly unresponsive until 8.10 (Intrepid Ibex) came along. There have subsequently been no wireless issues.

Vista is horrible though, slow, bloated, unresponsive. Very nasty!

Acers

For Christmas 2008 (I said I was in catchup mode), we bought the twins an Acer Aspire One each, from Amazon, at just over £200 each, one in "Seashell White", the other in "Sapphire Blue".

The spec, per Amazon, reads:

Acer Aspire One A150-Aw Netbook, Linpus Linux Lite version, 1GB DDR2 RAM, 120GB HD

* 8.9" Acer CrystalBrite™ TFT LCD
* Operating System: Linpus™ Linux® Lite version
* Processor: Intel® Atom™ processor N270
* Memory: 1GB RAM (2*512MB Configuration)
* Storage: 120GB SATA Hard Disk Drive
* Connectivity: Wireless LAN b/g, LAN: 10/100 Mbps Fast Ethernet
* Webcam: Integrated 0.3Mp Acer Crystal Eye webcam
* I/O Interfaces: 3 * USB PortsPort, 5-in-1 card reader (SD), (MMC), (RS-MMC), (MS), (MS PRO), (xD), SD™ Card reader for storage Expansion
* Battery Pack: 3 Cell (3 Hours Battery Life)

Unique Aspire One Interface
One of the neatest features of the Aspire One is the unique operating system which is created on Linux Linplus. This simple-to-use system is based on clear icons, similar to a mobile phone system, which are launched by simply clicking on them, which makes it intuitive to use and simple to master.

Linplus Linux

Your primary interface is separated into 4 clear segments, Connect, Work, Fun and Files that combine to give you access to a whole host of tools to ensure you make the most of your mobility.

Connect:
The Aspire One puts your favourite communication programs right on the home screen so you’re ready to connect to the web, email or chat on messenger within seconds of turning it on



Connect

Work
For people who want to stay productive on the move, the Work section on the Aspire One has built in software that allows you to do everything from writing letters and doing basic spreadsheets to running a presentation. In the work section you can also access your contacts list, a calculator and a notes pad, giving you the flexibility you need.

Work

Fun
What would life be like without some fun? Whether it is watching a movie, listening to music or playing one of the exciting games already installed, the Aspire One will keep you entertained on the go.

Fun

Files
The files section of the interface gives you the ability to copy, share or access your files and folders simply and logically ensuring you are always in control.
Files


Design
Stylish Design
The Aspire One is an elegant and stylish netbook that features a stunning gloss cover in either seashell white or sapphire blue colours, so you can pick the version that suits your style and your personality.

Easy to Use
Easy to Use
One of the key aspects to any Netbook is the keyboard size, too small and you can’t use it properly, too big and the whole system needs to be made bigger. Acer has managed to get a 95% keyboard into its 8.9 inch netbook, one of the largest for the size, making this netbook a pleasure to type on. 

Connectivity
Connectivity
Connectivity is vital with a netbook, both to the internet and to other devises. For strong internet connectivity Acer has both wired and wireless internet connectivity options. To connect to other devises there are 3 USB ports as well as VGA output and sharing data between devises is easy with the built in multicard reader.

*on the Aspire One with 8GB SDD memory

Product Description

The Aspire one is more than just another ultra-mobile notebook: it's an all-new communication device designed to deliver continuous access to the internet and a simplified wireless experience no matter where you are. The Aspire one was designed to get you online in no time at all and thanks to the LinpusTM Linux® Lite operating system, start up and shut down times are reduced to the minimum. With the Aspire one running on Linux environment, the simplicity continues with the intuitive and specifically optimized software interface. Acer's Aspire One is equipped with an Intel Atom processor, specially designed for low-cost UMPC's, and runs on both Linux and Windows. Other features include an 8.9-inch screen, from 1GB of RAM, a built-in WiFi connection and expandable memory upto 4 gigabytes.

As usual with Amazon, the items arrived promptly, safely and well packaged.

I am fairly familiar with Ubuntu, but Linpus was a new Linux variation (to me), based on Fedora.

The layout, as shown in the screenshots above, is nice and clear and easy to follow. Wireless also worked well.

But... there were issues...

  • The webcam works, but captures no sound! This appears to be a known issue.
  • Software updates were horrendously slow. Even connecting to Ethernet meant this running for hours.
There were some good resources available online - the user forum at http://www.aspireoneuser.com/forum/index.php, Acer itself - http://www.aspireoneuser.com/forum/index.php, and http://macles.blogspot.com/ which has some very good tutorials.

This allowed me to install apps like Google Earth, Skype and VLC, but the sound capture aspect meant it just wasn't working to full effectiveness.

So - bite the bullet and go for Ubuntu? Colleagues at work had tried, so why not?

Ubuntu's own HOWTO had some slight issues mentioned, but they all looked surmountable. And so it proved. The install process took probably about an hour, at which point the Acer was running Ubuntu!

Wednesday 20 January 2010

Trips (1) - New York City

I didn't visit another country until I was 15. Not terribly old I know, but in a time where foreign travel is extremely common, it is odd to think back to a time when holidays were invariably in Devon and Cornwall, avoiding the rain and braving the delights of the Okehampton by-pass.
That first trip was to Southern France - Frejus / St Raphael to be precise. We went back the following year, and I've been back to the same area a couple more times also.

This late introduction to foreign travel means that it is still not taken for granted and has a real sense of adventure. Nowhere more so until our trip to New York in November 2000. My first time across the Atlantic (and only, to date), first time in a Jumbo....

It was our tenth wedding anniversary, and was the first time since having our first son that we'd gone away without him (and only, to date).

We flew with Virgin, and were staying at the Hotel Pennsylvania opposite Madison Square Garden. All sounded very swish.

Flight was uneventful, and pretty comfortable due to getting bulkhead seats. Arrived at JFK late afternoon and made the silly mistake of waiting on the Hotel Bus transfer. Silly idea. Ended up waiting for ages!

When we'd finally boarded the bus and were heading into Manhattan, it was already getting dark. However, this was not all bad, as we suddenly came over a rise and there - laid out in front of us and brilliantly illuminated were the skyscrapers of the city. Absolutely stunning. Sadly camera wasn't to hand to take a pic, and wife was asleep, but the sight of this did actually take my breath away.

And so we came into the city and saw the sites you see in the films - yellow cabs, steam billowing from the ground, masses of people rushing around.

The hotel was - it has to be said - trading on past glories. The room was basic, with a view of the back of another part of the hotel, but the lobby to the lift beautifully framed the Chrysler Building (Ghostbusters!).

It must have been about midnight UK time, but the excitement at being here was too much - I wasn't tired at all (though Sharon was!).

A stroll down to Times Square was the solution. I was struck by the large numbers of police everywhere - with very few exceptions I never felt unsafe here.

Day 2 - Friday

The time difference meant we were awake ludicrously early and out by 7am local time. Breakfast in a diner just off Broadway, yes, the whole cliche was indulged in - pancakes, coffee, juice...!

Then a walk down Broadway, past the Flat Iron Building


You can see just how empty the streets were. We eventually arrived at Washington Square Park (recognized from When Harry Met Sally) and then through Greenwich Village to the City Hall and Woolworth Building.
From there, it was only a short walk to the tip of Manhattan Island to get on the free Staten Island Ferry, offering great views of the financial district. A BBC film crew was there too, filming Sue Lawley!

We didn't actually DO anything at Staten Island Ferry Terminal, apart from wait for a ferry back. Well, I did call to arrange a helicopter trip, but we subsequently had to cancel this.


Next was a visit to the World Trade Centre. The plan was to have lunch at the Windows on the World restaurant. Not a great plan when you realise that the viewing decks were in the South Tower, and Windows on the World was in the North Tower. So we looked over at where we would have eaten, and instead ate in a fast food place (Sbarros, IIRC).

The picture below is a tilt-shift adjusted image of the East River looking over to Brooklyn.

Probably the most surprising aspect of the views was that an initial area of skyscrapers gives way to low rise buildings in Greenwich Village before the large Midtown buildings appear in the foreground of Central Park:


We then "braved" (although in fact it wasn't braving at all) the subway to take us back to the hotel. Sharon had a nap, while I went out to find a photography store, and have a coffee in a diner.

The afore-mentioned helicopter trip we cancelled as Sharon was feeling unwell (she was pregnant with the twins, after all), and she retired for the night very early.

Day 3 - Saturday

Again, an early start, and a very quiet Times Square - curiously anticipating Vanilla Sky!

Then to Central Park, where after an initial walk round we did the horribly touristy activity of a horse drawn carriage ride. Yes, no native would do it, but it *WAS* fun! The famous ice rink, Alice in Wonderland statues and lake were all on our list of sites here. Didn't make it over to Strawberry Fields for the John Lennon memorial though. We were also advised that Michael Douglas and Catherine Zeta Jones were being married just over the road at The Plaza...

Bloomingdales next. An amazingly cramped store - not at all like my expectations. Bought a very nice snow globe here. Quick cable car trip to Roosevelt Island - nothing really to do, but a nice little sojourn!


Having been quite impressed with my celeb spotting the previous day, I was not allowed to forget who Sharon spotted a couple of tables away at the Oyster Bar beneath Grand Central Terminal - none other than Yoko Ono. I lose, but the chowder was excellent.

Whilst walking around NYC, the feeling is of being in a film set. There are so many iconic sights and images - the NYPD, subway, Tiffany's, Trump Tower, Radio City Music Hall. After a trip to Macy's (just down the block from us) we finished with a visit to the Empire State Building. Visibility that night was a mere 25 miles.

Day 4 - Sunday

Breakfast at Hotel - TV screens full of images concerning the whole hanging chads aspect of the 2000 Presidential Election.

Cab (with pre-recorded commentary from - I think - Arsenio Hall telling us to put our seatbelts on) to Battery Park -> Ferry to Liberty Island to see the Statue and then to Ellis Island to visit the Museum.

Walk through Financial District past the NYSE and cab over Brooklyn Bridge, ostensibly to find Brooklyn Heights that cab driver did not seem to know about. Still saw some great views:



Couldn't hail a cab back for love nor money, so walked back over Brooklyn Bridge, over into Chinatown where we had some strange glutinous substance in lieu of rice. A look at the markets around TriBeCa and then a final cab back to the hotel to grab our bags and head off to Newark Airport. One final film and TV reference here though - the famous opening scene of Tony Soprano taking a ticket at the New Jersey Turnpike.

I wish I could say the flight home was as good as that outward. It wasn't. It was horrible. No food for Sharon (despite being ordered). Me just dozing off when person in front decides to push their seat back leading to aching legs for rest of flight. Feeling absolutely shattered on arrival at Heathrow.

But that was a small price to pay. The trip was fantastic!

Monday 18 January 2010

Mac: iPod utilities

A couple here, one using the massive storage space available on an iPod, the other to get round the noise level restrictions that apply (though I have my doubts as to how effective this actually is):

iPod Backup

iPod Volume Booster

The former is based on rsync (of which more later) - so I will be attempting to run a script myself.

Both of these utilities are combined with Do Something When to recognise when the iPod is mounted. A nice feature is that Delicious Library also syncs with the iPod, although frustratingly the iPod 1000 note items rule comes into play here.

Aerial and Freeview Reception

I mentioned previously about a high gain aerial I bought. This was to use with our new Panasonic HD ready TV (Viera TX-37LZD70), which has a built-in Freeview receiver, that resolutely refused to work with our existing aerial.

Our property, although not old, did have a rather curious TV set-up. Two aerials in the loft, one leading to the aerial socket in the living room at the rear of the house, the other leading to a set in the dining room at the front, with co-ax spreading all around the outside of the house (as was telephone cable intended for internal use only). We'd long since removed one of the aerials and had an arrangement where the main aerial fed into the Sky box, whose RF out went to a powered TV link signal booster which then fed a cable into the loft that dropped down into the upstairs TVs. Lots of co-ax, lots of joins.

The new aerial initially went into the loft, seeing as the box suggested that would provide a signal. It didn't.

So, a combination of very long cable, and standing on a ladder on the patio, eventually found a spot where the signal seemed passable. We'd previously got a quotation for fitting a suitable external aerial, but a combination of having no chimney to fit the aerial too and the height involved meant this was prohibitively expensive.

Result - Freeview channels on main TV. But we then bought eldest son a TV for Christmas.

Connected in his room to the co-ax used for his previous TV. Scanned for channels. Grand total of zero. Hmm.

Next stage, bring that new TV downstairs to see if signal works there. And it does. So the aerial is OK, and so is the TV. What next?

A bit of Googling found this site, along with this and this. And the consensus? Aerial in loft is a complete no-go. Secondly, the cable makes a massive difference - old style co-ax is not good enough, needs to be sat cable. Thirdly, reduce number of joins and make the joins work properly.

One trip to Wickes produced 10m of black sat cable. Quick sanity check first was to connect this to RF Out on Sky box and other end to new TV. Still getting channels. Took new TV upstairs to see if stretching cable out works OK. It did.

Next stage was to remove all the old cable and use the new instead.

Therefore the set up is:

Aerial outside connected to Sky box with (currently) standard co-ax. Black sat cable (albeit with standard co-ax plugs) is fed through wall, via kitchen cupboard to upstairs and up into loft. So far, no joins. Connect to new TV, still working. This is looking good!

But we have two TVs to connect to upstairs. So the currently non-split sat cable needs to split. One cut made, co-ax plugs fitted so that one length of sat cable goes into bedroom to new TV (therefore grand total of one join). Good picture.

Now we need to link to the other TV. Try a standard co-ax splitter. Oh dear. Picture deteriorates.

But what about re-using the powered TV Link? Now install this in loft, turn on power - success. Both TVs working well, with good range of digital channels on the new one.

Some side effects too:

1. As power in loft needs to be constantly on to power TV Link, had to fit switch onto loft light (loft power is switched on or off by power source in airing cupboard)
2. The TV / FM plate on wall in living room is now only providing an FM signal. So let's tidy up the cabling in the loft so only one cable comes down (from FM aerial) and see if that improves radio signal. It did.

TO-DO's:

1. Improve connection points (possibly by soldering)
2. Replace co-ax to old TV upstairs
3. Replace co-ax to aerial - may improve signal on main TV
4. Move aerial upwards slightly

But so far, results very promising!

Sunday 10 January 2010

Mac: Bash history

I find it useful to refer back to commands I have used. Here's my current history:

ls -al /var/log/*.out
/Developer/Library/uninstall-devtools ; exit;
mppdec 16.mpc 16.wav

cd .gnupg

openssl md5 gpg.conf

openssl md5 pubring.gpg

openssl md5 secring.gpg

openssl md5 gnupf1.4.8.dmg

openssl md5 gnupg1.4.8.dmg

cd my\ disc

ls -R > ~/desktop/ds games 1.txt
Recursively list directory contents
chmod +x Mon1830.sh
Change file permissions
chmod +x ~/desktop/Mon1830.sh

mkdir ~/bin Make directory

whereis Mon1830

export PATH=$PATH:/users/<>/bin

echo $PATH

man crontab

echo $
?
cd /var/log

edit daily.out

/Applications/Firefox.app/Contents/MacOS/firefox -safe-mode

defaults write com.apple.Dock showhidden -bool YES Show hidden files

killall Dock

defaults write com.apple.iTunes invertStoreLinks -bool YES
Remove iTunes Store links
AppleSystemProfiler | grep Applications >> ~/installedApps.txt
List all installed apps
/Users/<>/bin/Fry ; exit;

defaults write com.apple.screencapture type jpg
Save screen captures as JPGs
defaults write com.apple.iTunes show-store-arrow-links -bool FALSE

cd /etc/hostconfig

open hostconfig

ls -1 | perl -e 'while(<>){ chomp($_); if(/(.*) - (.*).jpg/){ `mv "$_" "$2 - $1.txt"` } }'cd /

cd etc

edit hostconfig

type hostconfig

pico fstab
Text edit
cd /etc

pico fstab.hd

diskutil umount -v "<>s iPod"

diskutil umount -vf "<>s iPod"

diskutil umount -vf "/volumes/<>'s iPod"

diskutil unmount /volumes/ \ \'s\ iPod/

diskutil list

diskutil info /volumes/\ \'s\ iPod/open ~/ .bash_history

defaults write com.apple.finder AppleShowAllFiles TRUE
Show all files
defaults write com.apple.finder AppleShowAllFiles FALSE

ifconfig
Network settings
mail

console

sudo nvram boot-args="-v"

ls -R / > ~/Desktop/dirlist

cd 'music backup'

cd /volumes/'music backup'

ls / > ~/Desktop/dirlist

ls > ~/Desktop/dirlist

lame --tg comedy --preset 56 /users/<>/Desktop/Truth.wav /users/<>
/Desktop/Truth.mp3
Convert wav to MP3
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES; killall Finder

traceroute news.bbc.co.uk

traceroute -I newsimg.bbc.co.uk

traceroute news.bbc.co.uk

chmod +x RM2MP3

./configure

./configure --enable-gui

./configure --enable-gui --datadir=/users/<>/.mplayer/skins

mplayer 1.rm -ao pcm:file=1.wav -vc null -vo null
Using mplayer to convert Real Media file
md5 ubuntu-8.10-desktop-i386.iso
MD5 check
xterm

env

sudo port install mplayer
Install using ports
gmplayer

mplayer

port installed

port help

sudo port -v selfupdate

/System/Library/Frameworks/CoreServices.framework/Frameworks
/LaunchServices.framework/Support/lsregister \-kill -r -domain local -domain system -domain
user

diff -rq "on u sound albums" on_u_sound_albums_old
List all file differences
diff -rq "on u sound albums" on_u_sound_albums_old > diff.txt

ls -R > ~/Desktop/dirlist

cp ~/.bash_history /users/<>/desktop/bash.txtcp ~/ .bash_history /users
/<>/desktop/bash.txt

cp ~/.bash_history /users/<>/desktop/bash.txt

cp ~/.bash_history /users/<>/documents/tech/mac/bash.txt
Copy bash history
sudo port -d selfupdate

sudo port -v selfupdate

sudo passwd root

cd /volumes

rm -R "<>'s iPod 1"

sudo chflags -R nouchg/Volumes/<>\ iPod\ 1

sudo chflags -R nouchg/Volumes/<>\ iPod\ 1/.Trashes

defaults write com.apple.finder AppleShowAllFiles TRUE

defaults write com.apple.finder AppleShowAllFiles FALSE

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

sudo port -d selfupdate

sudo port remove mplayer

sudo port uninstall mplayer

port list installed

sudo port install xterm

xterm

rsync -ave /usr/bin/ssh ~/Documents/<> /Volumes/<>/Documents/
Initial rsync scripts
rsync -ave /usr/bin/ssh ~/Music/iTunes/"iTunes Music" /Volumes/sda1

rsync -ave /usr/bin/ssh ~/Pictures/"06. Photos to Print/To print" /Volumes/<>
/Pictures/"06. Photos to Print"

rsync -ave /usr/bin/ssh ~/Downloads /Volumes/sda1

/Applications/iPodBackup.app/Contents/Resources/rsync ; exit;

whereis backup_exclude.txt

pico ~/bin/backup.sh

chmod +x ~/bin/backup_pictures.sh

cp /users/<>/documents/tech/mac/bash.txt ~/.bash_history

exit

whereis *grease*

help

ps -ax

diff -rq "/users/<>/music/itunes/itunes music" "/Volumes/sda1/iTunes Music"

mplayer

drutil eject

/Applications/Firefox.app/Contents/MacOS/firefox-bin -safe-mode

qlmanage -m

launchctl unload /System/Library/LaunchAgents/com.apple.quicklook.plist

umount sda1-1

curl -O 'http://www.studiosells.net/msells/netinv'

chmod a+rx ./netinv

perl -MCPAN -e 'install Net::MAC::Vendor'

netinv

netinv > i.txt

ls /Applications/ >> appsiuse.txt

AppleSystemProfiler | grep Applications >> ~/installedApps.txt

cd delicious_checker-0.2/bin

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Safari load tabs, not windows
ln -s "/Users/<>/Pictures/10. TBA" /Users/<>/Dropbox/

tail -f /var/log/system.log

cp -r * /home

defaults write com.apple.finder AppleShowAllFiles TRUE

defaults write com.apple.finder AppleShowAllFiles FALSE

/usr/sbin/tcpdump

ping 255.255.255.0

top -u -s3
Show most resource hungry apps
rm -rf ~/.Trash/
Empty trash from terminal
crontab -e

mail

killall Finder

Finder

cd /volumes/'music backup'

killall Dock

killall -KILL Finder

cd Documents/logs

chmod a+rx

chmod -R 777 *

open ~/.bash_history

diskutil list

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

chflags hidden "<>"

chflags nohidden "<>"

cp ~/.bash_history /users/<>/documents/tech/mac/bash.txt

backup_pictures2.sh

backup_music.sh

backup_docs.sh

exit

Mac: Keyboard

Delete on a MacBook Pro is backspace + Fn. Stupid, should just have a delete key

What else do I constantly forget? Yes, the # key, the one you use a hell of a lot. It's alt + 3.

Screenprints - Command - Shift - 3 (Command = the key with the little Apple on it)

Command - Shift - 4 - select an area to print

Mac: Insufficient space

Is it that easy to fill up 120GB?

Yes, extremely easy. I'd already mentioned that Parallels was removed to try and free up some space, but with around 60GB of music, nearly 15GB of photos, then documents, videos, etc; plus programs and other miscellaneous settings, I soon found that I was down to only around 7GB free.

Posts on various Mac forums resulted in this extremely detailed and easy to follow guide to replacing a HDD.

Searches on various forums, including Apple's own, suggested that I could replace with a drive up to 500GB, but to get the speed I would need, a 320GB would be more suitable. I therefore plumped for the Western Digital Scorpio Black 320GB SATAII 16MB Cache 2.5 inch Internal Hard Drive from Amazon for £72.99.

I followed the suggestions and initially backed up using the freeware Super Duper. Confident this had all worked OK, I was ready to begin.

Taking apart the MBP was not too difficult, and I was surprised at just how seemingly flimsy the insides were. Then I encountered a problem - Step 13 refers to removing the "... two silver Phillips screws securing the hard drive retaining bracket to the lower case". Well, I had no such screws. Nope, I had Torx screws. Better than that, they were Torx screws for which I did not have the appropriate bit.

So, a mad dash down to Maplins (where I also bought a sale price high gain aerial) produced the correct bit so I could continue.

Fortunately from there, all was plain sailing. The insertion of new drive was straightforward, restore from Super Duper too, and now, over a year later, I still have a reasonable proportion of free space (although, of course, it always expands to the space available)

Mac specific apps

The posting may actually speed up a little after this. *May...*

The first Mac app to get familiar with, which I'd previously seen on Windows anyway, is of course iTunes. The main difference between previous media players was the whole way in which the library was arranged, with the slight annoyance of "Unknown Album" - not every song is or has been on an album!

The impact of this is that compilations I'd previously set up for 60's, 70's, etc, no longer worked in the same way as when I used Music Match Jukebox on my Archos Gmini. Now I have got used to it, I don't actually mind that much.

The Macbook came pre-installed with iWork, but I wasn't tempted to pay for an application when the excellent Neo Office is available for free. Ditto Aperture, when I could use free applications such as the GIMP and Seashore. Fortunately, that was pretty much it for pre-installed apps I did not want to use.

Safari was the next one to look at. Even though I have now installed Xmarks to keep in sync with work PC, and a version of del.icio.us to allow me to access my preferred bookmarks, the lack of extensions that I have on Firefox means I use it sporadically.

iChat is OK, but I swiftly decided to use Adium instead due to its ability to work seamlessly across various different IM clients.

One application I was keen to install was Delicious Library, having read about it in John Naughton's Observer columns. This great little app allows you to load various media items into a glossy interface - books, CDs, DVDs, gadgets, games, etc. It uses the Mac's inbuilt iSight as a barcode scanner and carries out lookups via various different Amazon sites. This isn't always foolproof, so text based searches are also possible. It is true to say that it can be a little flaky at times, and at one point I lost my entire DB and had to restore from a backup, but nonetheless this is a much more attractive option than a dull old spreadsheet cataloguing system.

Best intentions are a wonderful thing - I have still done no more than briefly tinker with Garageband, but I promise to myself that its time will come. The same goes for iWeb - it's there, but I have not played with it.

Removing installed apps on Mac is so simple, but is helped by App Cleaner which also nicely removes all associated files, settings, etc. I work this alongside Monolingual, that deletes all the language files that come with applications that are not required (this saves 100s of MB of space) as well as Cache Out that does a useful clean on start up (not that starting up is required too often on a Mac)

Now that I have a Flickr Pro account (and had painstakingly and timewastingly scanned in all my old photographs before I finally plumped for a digital SLR a couple of years back), the Flick Uploadr is very useful too.

xACT allows me to convert FLAC files to MP3 (via WAV) format for use on iPod

Stuffit Expander looks after most compressed file formats

SWF & FLV Player, MPEG Streamclip, iSquint, MacTheRipper and Handbrake take care of various video needs. I have to say I have been unimpressed with iMovie's abilities, preferring instead Toast Titanium for burning, but the Mac SuperDrive is extremely fussy when it comes to accepting DVDs and even CDs, half the time spitting them out contemptuously.

At the very outset, I tried a trail version of Parallels and experimented with triple OS setup using Win XP and Ubuntu. Nice, but ultimately I realised that I didn't really need to use either, and all they were doing was taking up valuable disk space - so that all came off!

But the disk space continued to be an issue....