I seem to have gotten into the habit of writing a post each time I do an upgrade, so here is the one for Ubuntu 14.10. It's really easy - by far the simplest upgrade I can remember. This, I'm sure, is partly because the changes behind the scenes this time are more about stability than new features but it's a welcome change. Nothing, and I mean nothing has broken for me either on my desktop install or this laptop.
I can't say I'm immediately noticing many improvements either, other than the latest packages. Not that I'm complaining - mostly, an obvious improvement means a change and frankly I like Ubuntu 14.04 enough as it was that it didn't need another overhaul to make me happy. Some minor bugs have been ironed out - the big one is that it no longer randomly forgets my keyboard language preferences.
So, don't fear this one. For me, this is the perfect upgrade - nothing broken and no major changes to learn.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Saturday, 27 December 2014
Wednesday, 23 July 2014
Ubuntu 14.04 - here we go
Quick post about the upgrade from Ubuntu 13.10 to 14.04. It went ahead without any real problems. For the first time my decision to disable the utterly horrible "shopping" lens in Unity was honoured over an upgrade (well done - finally).
Bad things: the window close buttons have wandered over to the left AGAIN. This time apparently Canonical have removed the all of the options to move them back (well, someone is recommending recompiling the window manager but there is no way I'm doing that). Thanks guys, that's really helpful.
Further bad things: synaptiks is currently missing from the Ubuntu repositories so if you want a middle mouse click on your touchpad you're out of luck. Fortunately there is a way around that - you can install it from the debian repository:
That solution pulled from here.
Now to man up and do this on my work machine...
Bad things: the window close buttons have wandered over to the left AGAIN. This time apparently Canonical have removed the all of the options to move them back (well, someone is recommending recompiling the window manager but there is no way I'm doing that). Thanks guys, that's really helpful.
Further bad things: synaptiks is currently missing from the Ubuntu repositories so if you want a middle mouse click on your touchpad you're out of luck. Fortunately there is a way around that - you can install it from the debian repository:
sudo apt-get update sudo apt-get install wget gdebi wget http://http.us.debian.org/debian/pool/main/s/synaptiks/kde-config-touchpad_0.8.1-2_all.deb sudo gdebi kde-config-touchpad_0.8.1-2_all.deb
That solution pulled from here.
Now to man up and do this on my work machine...
Monday, 21 April 2014
Using a Raspberry Pi as a headless media store on a Sonos network
This is to build a headless media centre and is also being built that way - that is, I'm not going to plug a screen or keyboard/mouse directly into the Pi. This means that I can install the version of Debian without the window manager which makes it far lighter on the processor.
It's not difficult, but I've compiled my notes and written some English to link them together as someone may find them useful. I'm going to assume some basic Linux and home networking knowledge.
You'll also need some USB hard drives. The Pi (model B here) only has USB 2.0 ports so you can use older drives if you're not planning on plugging them in anywhere else. Also, the Pi runs on very low power so you really want powered drives or a powered USB hub to sit between them. If you want to back up your data, you're going to need two drives. If you don't, you can ignore all the stuff about rsync that comes up later.
and select the option to expand the root filesystem to fill the SD card. It's important you do this before any of the other steps or you will be starting again.
Next update the operating system via:
This will likely take a while.
To find the UUID of the drives:
Remember that if you format a drive, the UUID will change.
Samba shares specified parts of your filesystem on the network. It will allow you to mount the drive on another computer which will let you put files on your media server when it's ready. It is also the shared area that Sonos will be able to search for music files.
Minidlna shares an area of your filesystem via DLNA. This means a DLNA-ready device can locate the share and request any files in it. I use this for watching video on my iPad (my viewing program of choice being 8player).
I also installed some extra tools to make other tasks easier. You don't need them for this build.
Mixed to taste, of course.
Then add the user to the samba password file:
Restart samba and you should then be able to mount the drive on other machines on the network.
Docs on configuring minidlna are available on the minidlna site. The important bits are:
It's important to make sure the minidlna user can read and write to the index and log directories and read the media files. Alternately, if you're lazy like me you can make minidlna run as the main user by editing /etc/init.d/minidlna (around line 68). Obviously this is not recommended for any significant install of anything, but I'm assuming we're at home on a very limited access network.
When starting minidlna you may get an error message claiming to be exceeding the watch limit. To increase this limit, add to /etc/sysctl.d/90-inotify.conf
and restart.
Note that there is a new version of minidlna on the way called ReadyMedia possibly rendering this completely obsolete.
Something like this in the crontab will sync the drives each night at 3am:
And with this, the setup is complete.
It's not difficult, but I've compiled my notes and written some English to link them together as someone may find them useful. I'm going to assume some basic Linux and home networking knowledge.
You will need
Sourced from Amazon, total cost (at time of writing, without hunting around) is: £47.60You'll also need some USB hard drives. The Pi (model B here) only has USB 2.0 ports so you can use older drives if you're not planning on plugging them in anywhere else. Also, the Pi runs on very low power so you really want powered drives or a powered USB hub to sit between them. If you want to back up your data, you're going to need two drives. If you don't, you can ignore all the stuff about rsync that comes up later.
Let's go
Up and running
-
download Raspbian
Sadly, the NOOBS install method requires the use of a screen so wont work for us. -
install Raspbian onto the SD card
These are the instructions for prepping the card on a Windows machine. - put the Pi in the case, plug in the ethernet cable and put in the SD card
- finally plug in the power cable and we're off
Connect and update
Find the IP address of your Pi, shell to it and log in (default username / password is pi / raspberry). You need to run:sudo raspi-config
Next update the operating system via:
sudo apt-get update
sudo apt-get upgrade
Connect the drives
Plugging the drives in will auto-mount them, however if we are using one drive as a backup to the other we need to ensure they are always mounting the same way round on restart. To do this we will identify the drives via their UUID in /etc/fstab:UUID=0AC4D607C4D5F543 /mount/location ntfs rw,defaults 0 0
blkid /dev/sda1
blkid /dev/sdb1
Install the software
Time to install some useful software.Samba shares specified parts of your filesystem on the network. It will allow you to mount the drive on another computer which will let you put files on your media server when it's ready. It is also the shared area that Sonos will be able to search for music files.
Minidlna shares an area of your filesystem via DLNA. This means a DLNA-ready device can locate the share and request any files in it. I use this for watching video on my iPad (my viewing program of choice being 8player).
# install samba
sudo apt-get install samba samba-common-bin
# install minidlna
sudo apt-get install minidlna
sudo apt-get install tree locate chkconfig
Configure samba
To configure samba you need to edit /etc/samba/smb.conf. You'll want something like this:[global]
netbios name = NETBIOS_NAME
workgroup = WORKGROUP
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[media]
comment = My media
path = /PATH/TO/SHARE
writeable = yes
create mask = 0770
force create mode = 0770
locking = yes
Then add the user to the samba password file:
sudo smbpasswd -L -a USERNAME
Configure minidlna
The minidlna config file is found at /etc/minidlna.confDocs on configuring minidlna are available on the minidlna site. The important bits are:
media_dir=A,/home/user/Music # Music directory
media_dir=P,/home/user/Pictures # Pictures directory
media_dir=V,/home/user/Videos # Video directory
friendly_name=Laptop # Name of the share
db_dir=/var/cache/minidlna # Index files (make sure location is writeable)
log_dir=/var/log # Log files (make sure location is writeable)
inotify=yes # Index new files as they are added
When starting minidlna you may get an error message claiming to be exceeding the watch limit. To increase this limit, add to /etc/sysctl.d/90-inotify.conf
fs.inotify.max_user_watches = 100000
Note that there is a new version of minidlna on the way called ReadyMedia possibly rendering this completely obsolete.
Back up the drives
I wanted to keep a backup of my media on the second drive. I could have used RAID 1 but reading around suggested that the amount of read/write information going across the USB bus would cause a bottleneck and therefore problems serving the files. To get around this, I use rsync to copy everything across on a nightly basis.Something like this in the crontab will sync the drives each night at 3am:
0 3 * * * rsync /mountpoint/maindrive /mountpoint/backupdrive >> ~/rsync_log.txt 2>&1
Getting the media files in order
Sonos will read the ID3 tags on the music files so they need to correct. Due to the fun of an iTunes crash some time in the past mine are a mess so it's time for some scripting. More on this in a future post.Saturday, 12 April 2014
When drives don't mount nicely
While rebuilding my media sharing Raspberry Pi I've come across a small problem with usb drives. If you don't unmount a drive from a Windows machine properly, the Pi will mount it read-only. A simple solution for this is:
- install the ntfs-3g package:
sudo apt-get install ntfs-3g
- mount the drive using this utility:
sudo ntfs-3g /dev/sda1 media
(to mount drive at sda1 to directory media) which clears up all the locks for you - then simply umount and mount and things are back to normal
Tuesday, 23 October 2012
Quantal Quetzal - second impressions
Printing has broken. Sigh.
This is actually a cups issue, not an Ubuntu one - Ubuntu has simply included the latest version of cups in its repositories. Sadly, cups 1.6 removes the network discovery feature so if you're using it, your printer list post-upgrade will look rather barren.
There are an assortment of bugs opened about this issue. Here's hoping someone forks or patches the project.
This is actually a cups issue, not an Ubuntu one - Ubuntu has simply included the latest version of cups in its repositories. Sadly, cups 1.6 removes the network discovery feature so if you're using it, your printer list post-upgrade will look rather barren.
There are an assortment of bugs opened about this issue. Here's hoping someone forks or patches the project.
Monday, 22 October 2012
Quantal Quetzal - upgrade and first impressions
The new version of Ubuntu is out. In a fit of enthusiasm I upgraded my work machine this morning. Turns out that although the new version is out, it hasn't been out long enough for the packages to all make their way across - consequently I'm without my ldap browser of choice, luma. Sigh. Hopefully this will resolve itself in the not too distant future.
Mostly a simple upgrade otherwise. Just a couple of things broken:
New things? Well, there is the incredibly annoying shopping integration in the Unity lens which presented me with something that looked suspiciously like porn for the 30 seconds it survived before I killed it. Upgrades? I'm sure there are some of those too.
Mostly a simple upgrade otherwise. Just a couple of things broken:
- autofs now needs to restart on network up instead of reload else it doesn't mount properly
- needed a new method for moving the window close buttons
- some glitches with the window manager (which seem to have gone away on their own)
- slower boot times
- keyboard shortcuts reset (thanks...)
- shopping in lens (remove with "sudo apt-get remove unity-lens-shopping" although you'll need to restart your window manager)
New things? Well, there is the incredibly annoying shopping integration in the Unity lens which presented me with something that looked suspiciously like porn for the 30 seconds it survived before I killed it. Upgrades? I'm sure there are some of those too.
Friday, 17 August 2012
Play 1.2.5 and OpenID
Continuing my drive to write simple examples for features of Play 1, here is an app authenticated by openID:
https://github.com/tomnatt/play-openid-example
It's prepped to use the Google openID system, but that is easily changed in the interface. As with the websockets example, this exists because the existing examples floating around the web are for an older version of Play and don't quite work. In this case, the official docs seem rather sparse too.
Anyway, I found it useful. It's possible someone else will too.
Gotcha on this one - Google doesn't have a personalised URL for using openID. The one in the code is the same for everyone, and is returned with an id parameter so the app can identify the user in question.
https://github.com/tomnatt/play-openid-example
It's prepped to use the Google openID system, but that is easily changed in the interface. As with the websockets example, this exists because the existing examples floating around the web are for an older version of Play and don't quite work. In this case, the official docs seem rather sparse too.
Anyway, I found it useful. It's possible someone else will too.
Gotcha on this one - Google doesn't have a personalised URL for using openID. The one in the code is the same for everyone, and is returned with an id parameter so the app can identify the user in question.
Friday, 6 July 2012
Nautilus since Ubuntu 12.04
For the record, a collection of things I've had to learn about nautilus since Ubuntu 12.04:
- alt + up / down (or alt + left / right) navigate the breadcrumb trail from the keyboard
- ctrl + l switches the breadcrumb trail for a more traditional address box and gives focus
- F9 disables / restores the left panel
- apt-get install nautilus-open-terminal provides an "open terminal" option in the right click menu
Not very exciting, but at least I'll remember it next time I have to install a system now...
Friday, 1 June 2012
Configure the window close buttons in Ubuntu 12.04
One thing I really don't like about Ubuntu if the insistence in putting the close window button in the top left. I don't know if this is a Linux thing, but I'm sure older versions defaulted to close in the top right.
Anyway, you can easily change it.
* install gconf-editor
* navigate to /apps/metacity/general/
* find button_layout and change it to whatever you like
The key to the positioning of the buttons is the colon. I went with:
Another tweak worth considering if you're a keyboard shortcut person is rebinding "Key to show HUD" in the Keyboard config screen. That is the one which, if your experience is anything like mine, is capturing your keypress when you try and alt-tab around.
Edit:
Since 12.10 it seems the gconf-editor setting is sometimes ignored. You can move everything by running this on the command line:
Anyway, you can easily change it.
* install gconf-editor
* navigate to /apps/metacity/general/
* find button_layout and change it to whatever you like
The key to the positioning of the buttons is the colon. I went with:
:minimize,closebecause I don't really care about maximize. Everything to the right of the colon is floated right.
Another tweak worth considering if you're a keyboard shortcut person is rebinding "Key to show HUD" in the Keyboard config screen. That is the one which, if your experience is anything like mine, is capturing your keypress when you try and alt-tab around.
Edit:
Since 12.10 it seems the gconf-editor setting is sometimes ignored. You can move everything by running this on the command line:
sudo gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
Friday, 18 May 2012
Restore u300s touchpad on resume in Ubuntu
I have finally found the time to fix the touchpad on my u300s. It was causing problems on resume from hibernate (as per notes from before). After a bit of poking around I've found a work-around.
I have synaptics which applies its changes on boot, however I have a problem with resume. Solution is this script:
Solution was cobbled together from here, here and here.
I have synaptics which applies its changes on boot, however I have a problem with resume. Solution is this script:
#!/bin/shPut in /etc/pm/sleep.d/ called something like 80_touchpad_restore and remember to make it executable. Done - mouse settings will be set as per this script on resume from hibernate.
# Restore three finger tapping
case "${1}" in
resume|thaw)
# faster speed and acceleration
DISPLAY=:0.0 su-c "/usr/bin/synclient MinSpeed=1 MaxSpeed=2.81 AccelFactor=0.13"
# 2 fingers scroll
DISPLAY=:0.0 su-c "/usr/bin/synclient VertTwoFingerScroll=1 HorizTwoFingerScroll=1"
# enable tap to click (2 fingers for middle click, 3 fingers for right click)
DISPLAY=:0.0 su-c "/usr/bin/synclient TapButton1=1 TapButton2=2 TapButton3=3"
;;
esac
Solution was cobbled together from here, here and here.
Playing with <audio>
I was looking for a better option than directory listings for making a folder of mp3 files accessible on a website so I wrote a very simple php loop.
Initially I omitted the firefox support (firefox doesn't play mp3 files) then, when adding it, I needed to convert my mp3 files into oggs. Step forward dir2ogg which is completely perfect:
Getting it on ubuntu is as simple as:
Initially I omitted the firefox support (firefox doesn't play mp3 files) then, when adding it, I needed to convert my mp3 files into oggs. Step forward dir2ogg which is completely perfect:
dir2ogg -d .Will quite happily convert all the mp3 files in the current dir to oggs. What more could you ask for?
Getting it on ubuntu is as simple as:
apt-get install dir2ogg
Friday, 11 May 2012
How to play Star Wars - Harmy's Despecialised Edition
Are you one of those fans who think the Star Wars original trilogy has gotten worse with each successive release? Do you get angry watching Han Solo step on Jabba's tail and not get his face shot off? Do you go on about Han shooting first? Or wonder where the mountain went in the twin sun sunset?
In short, are you a human being?
Help is at hand, from a chap named Harmy. This colossus of a man has created a "despecialized" edition - basically an upscaling with all the new additions taken out. You can find the iso files here.
Actually playing them is a bit of a trick. The first (platform non-specific) tip is:
Make sure your files are not corrupted.
Seriously. That cost me a couple of evenings.
Windows 7
* mount the iso as a drive using daemon tools
* download vlc - I have this running with version 2.1
* in vlc do media -> open file -> select your virtual drive -> bdmv -> stream -> m2ts file
Et voila!
Linux
* mount the drive thus:
* in vlc do media -> open file -> mountpoint -> bdmv -> stream -> m2ts file
Suddenly you're back in the past, watching Star Wars version awesome.
In short, are you a human being?
Help is at hand, from a chap named Harmy. This colossus of a man has created a "despecialized" edition - basically an upscaling with all the new additions taken out. You can find the iso files here.
Actually playing them is a bit of a trick. The first (platform non-specific) tip is:
Make sure your files are not corrupted.
Seriously. That cost me a couple of evenings.
Windows 7
* mount the iso as a drive using daemon tools
* download vlc - I have this running with version 2.1
* in vlc do media -> open file -> select your virtual drive -> bdmv -> stream -> m2ts file
Et voila!
Linux
* mount the drive thus:
sudo mount -o loop -t udf $path_to_iso/ANH.ISO $mountpoint* download vlc or pull it from a repository (package name vlc in ubuntu)
* in vlc do media -> open file -> mountpoint -> bdmv -> stream -> m2ts file
Suddenly you're back in the past, watching Star Wars version awesome.
Thursday, 10 May 2012
Installing Ubuntu 12.04 on a Lenovo u300s
After a bit of faffing I have Ubuntu 12.04 running on my Lenovo u300s.
* You can build a usb installer using the utility here
Important info:
* You can build a usb installer using the utility here
* It is possible to keep One Touch restore working and nuke all of Windows if you're brave with the partition table
* Windows will keep booting until you remove the small partition no matter how many times you think you've deleted it - presumably the mbr is in there?
* The touchpad is a pain - you need to install the synaptics drivers and tune it there, but it will reset when you wake from hibernate. Found a fix for this.
* Hibernate and Suspend are easy to fix using this script
* Hibernate can be re-enabled in the power menus using this fix
* To save battery power, Bluetooth can be disabled on startup using the first answer here
Don't forget to install build-essential and synaptic packet manager. You want also probably want rcconf to update applications running at startup (command line tool). Finally, you might want to move the window buttons.
Unity seems quite good on the u300s. This isn't the first time I've encountered this environment but it's the first time I've not utterly hated it. The extra width on the laptops screen (over a standard 4:3 ratio screen) makes the left menu bar work - especially once it has been shrunk as far as it will go. There are a couple of oddities (such as some programs sometimes not appearing in the alt-tab list) which I hope will be fixed soon.
Note about the touchpad. This is the first modern (ie less than 7 years old) touchpad I've used and it took some getting used to. Sensitivity and cursor speed can all be configured in the synaptics driver menu obviously but it's worth mentioning the "disable touchpad on keyboard use" option. If you're using the keyboard to navigate (such as alt-tab) you will find this triggers the mouse disable regardless of the "ignore multiplier combinations" setting which is really annoying. Also, the mouse responds to taps thus:
* one finger tap - left click
* two finger tap - right click
* three finger tap - middle click (needs enabling)
Horizontal and vertical two finger scrolling can be enabled in the synaptics interface.
Subscribe to:
Posts (Atom)