Tag: ubuntu
A quick hack to cheer up a rubbish couple of weeks
by Matt on Aug.24, 2011, under Fun, life, linux, ubuntu
Simply apt-get install libnotify-bin and then add the following to your crontab
*/10 * * * * DISPLAY=:0.0 XAUTHORITY=~/.Xauthority notify-send “Don’t forget” ”you’re awesome”
Then every ten minutes, this will happen:
Day 2: Music and pictures
by Matt on Jun.11, 2011, under learning, life, ubuntu, windows
All of my music and my images are backed up onto a small NAS I have at home. Simple! I thought daftly. Mount the NAS, copy the files into My Music and carry on. Again, so very wrong. Copying a single folder works, trying to copy all of them at the same time doesn’t! This is very annoying! How would I go about mending this in Linux? 3 lines of bash, or… rsync!
Googling around, I found that windows has a command in the command prompt called robocopy (I’m on windows and forced onto a command prompt, go figure) The command seems to be “robocopy z:\ c:\Users\Matt\Music /MIR”, and this seems to be working!
Windows Media Player seemed to pick up all of my MP3 files relativley quickly, and found/retrieved the album art where it was missing as well. However, all of my Ogg files where not found and not playable. A quick google around for an ogg codec for windows finds vorbis.com and a codec for “DirectShow based players”. It seems to imply WMP is one of these, so I grab it, install it, and can play my Ogg files! Although it doesn’t show the total running time in the playlist like it does MP3s for some reason. Never mind!
The only other music I tend to listen too is from Spotify. A quick trip to their website to grab the Windows client, and that wors straight away. Nice and easy
Photo’s are a completley different kettle of fish. I have a total of 56.7GB of photos on my network storage. When I’m in Ubuntu I tend to only keep a smallish selection of these on the laptop. So for the purposes of this experiment, I’ll just import the ones from this year. At a mere 6.67GB, this should take about an hour off the slow network storage. I left this to copy, came back and tried to find some photo management software. Windows 7 seems to come with the “Windows Live Photo Gallery”, so trying to use the default software I fired this up. It asked me to sign in with my Windows Live ID (which I have courtesy of my XBox 360) and the quite quickly shows me all the photos I’ve just imported.
Helpfully it also throws me a message saying it can’t open some file types (namely my Canon RAW files) and I need something called a “codec” to view them. It then takes me staright to the Canon download site for the raw codec. Quite handy. A 28MB download later and a reboot, all my pictures are now visable and viewable.
This seems to be just as usable as Shotwell, I can tag pictures, browse by dates, see the various metadata for each image, there is a small amount of editing possible. It feels a bit clunky though. Occasionally you can’t double click to preview a photo, you have to right click then go preview. Otherwise it seems more than capable for my mediocre photo managing tasks.
Tomorrow, I’ll attempt something a bit more taxing. I’ll try and get the printer working and have a look into application development in Windows.
Day 1: Reinstall Windows
by Matt on Jun.09, 2011, under ubuntu, windows
To replicate a new users experience, I thought I’d start by restoring my laptop back to just having Windows 7, as factory default. Since Ubuntu takes about 10 minutes to install this should be easy, turns out this was a bit of a mistake.
Modern computers don’t tend to come with any recovery media, just a partition on the HDD to recover your system if it’s broken. Mine had a Utility to create some DVD’s to replicate this if there was an issue with the drive itself. Now the recovery partition on my laptop is apparently corrupt
So I dug out my DVD’s I created when I received the machine, popped disk one into the drive to find that the DVD had perished sitting in the drawer for 14 months or so. “No worries!” thought I, Packard Bell support should be able to ship me some recovery media!
A 20 minute phone call later (at 10p a minute) and they offer to ship me the recovery media for the bargain basement price of just £51.16. Considering I could buy a new copy of Windows for £60 I wasn’t impressed at all and promptly told them so. After failing to justify the charge for software I already own, I gave up. About to consider the whole thing a waste of time, someone offered to loan me a Windows 7 OEM install DVD that I could just type my serial number into. The serial number would be on the sticker on the laptop, “Huzzah!” I thought.
But no, the sticker has in fact worn to the point it’s unreadable. Now completely stuck, I went to bed with the thought of giving up on the whole thing. If I was an average user I’d either have been stiffed for a charge of £51.16 now, given up and bought a new laptop, or just given up completely.
As I slept I had a dream…. many moons ago, when I created the recovery DVDs I vaguely remembered making ISO files of each one. Rummaging through my assorted boxes/drawers of old computer kit I found my old external hard drive (without the case, which had failed). Popped it into a USB SATA dock and found the ISO files. How a non-technical user is supposed to get through all this rubbish I have no idea.
DVD’s burnt, I popped them into the laptop. An hour and 2 dvd changes later, the system reboots to a “Starting Windows” screen, then reboots again. Another windows loading screen with “Preparing your system for first use” appears, then “Setup is checking video performance”. Then, a miracle happens! Something actually worked and I can setup a username, password, timezone, security settings and network. Windows goes away for a bit to “Finalize settings” , pops to a welcome splash with a symbol of a clock and “2 min” underneath it. 3 minutes later I’m presented with the chance to register my laptop (which I decline) and the chance to activate my free 60 day trial of Norton antivirus (which I decline). Then I have a desktop!
Since I told Windows to download important updates it goes away and does so immediately after the preinstalled rubbish passes. While it’s doing that I promptly remove Norton and start removing the preinstalled rubbish that Packard Bell decided to bundle with the machine. After loading the control panel, I’m immediately interrupted by “Launch Manager” installing something…. Apparently this is PB preloading more rubbish I probably don’t want or need. Best to wait for that to finish I think. Oop, and thats decided to reboot the machine for me. Good thing I did wait in the end. After that reboot, I set about removing all the packard bell rubbish, and Norton Antivirus. About half an hours work there to get it all off the machine, and in that time Windows has downloaded yet more updates. A reboot to install those and clear out the last of the preinstalled gumpf, and I have a clean Windows 7 install! Check the windows update status, 82 more updates to install. Button clicked, sit and wait. Another reboot, and I get a box asking me to choose my browser. I ask it for firefox and it goes away and downloads the setup program. I install firefox, just clicking next, then browse through to get AVG (the free virus scanner). Download and install and windows pops up telling me more updates are ready to install. Install those, reboot again, and I appear to have hit the last of them! Finally!
Now! All of my documents are in ODF format, so a quick trip to the Libre Office website and …. the machine hangs. HDD spinning, but UI unresponsive. Shall leave it a little while to see what happens. Oop, it reboots and tells me it’s not shut down normally. Let it boot backup normally and try again! It appears it was installing new updates again. Let it update and rebooted again. Install LibreOffice.
This time all is successful, and I have what I consider to be a useful desktop machine! Now to just use this now and see how things go.
From Linux to Windows for 30 days
by Matt on Jun.09, 2011, under learning, ubuntu, windows
Having recently read this article about a journalist trying to use Ubuntu for 30 days, and having seen similar articles in the past, I’ve decided on an experiment.
For the past …… many years I’ve used Linux (of various flavours) as my primary desktop OS. I’ve used Windows in the past for games and the like, but haven’t used it for anything else since Windows XP was new. Very ingrained in my mind these days is the “Linux way” of doing things. If something’s broken, try and fix it, help others fix issues they may not be able to resolve themselves and so on.
The experiment I propose is this, I intend to reverse the article quoted above. There are a few caveats on this however, I’m a slightly more advanced user than the chap writing that article, and have used Windows before (sometime in the past!). I’ll try and keep this more or less regularly updated with how things go with various productivity tasks and my day to day jobs. Hopefully the things I learn will be useful somewhere!
Banishing the demons of distraction
by Matt on May.08, 2011, under Fun, learning, life, linux, ubuntu
For a little while now I’ve been getting quite annoyed with myself for being very easily distracted (be it with llamas, badgers, narwhals or whatever). This has meant that my general level of productivity has been somewhat…… low. I have a list of running projects as long as my arm, none of which get enough attention because I flit form one to the other almost hourly. The situation as is obviously needs addressing.
From what little intelligence I can bring to bear on the problem, this should be able to be broken down into a few different variables:
- Environmental
- Physical
- Grey-mushial (?)
Environmental
Fixing environmental problems is relativley easy. If I want to concentrate on a task now I use my Mac Mini. Not because OSX is any more productive than Ubuntu I hasn’t to add, but because it is in a room on a desk with a comfortable chair in a comfortable working position. There is no television, no games consoles or anything else around to take my attention away from what I’m attempting to do.
In the office at work, I try and keep my desk clear of clutter. When there is a lot going on, or a lot of noise around, the twin help of Spotify and a decent pair of headphones can help keep me inside my own head and in my comfortable work zone. Anything I would sit and watch constantly for updates or results is now being reworked to email me or notify my some other way so that I can carry on concentrating on the more important tasks rather than waiting for something else to finish.
Physical
With this I refer to my general physical fitness and general wellbeing. I am quite aware that I don’t get enough exercise, but have yet to generate a plan to resolve this. Until recently I had no idea how well I ate. Throwing together a nasty hackey database in Django (code), I actually discovered I don’t eat too badly… but can binge on chocolate when things get a bit stressful! This is quite easy to rectify by stopping buying lunch and making it in advance. I still crave the chocolate quite a lot during the day, but hopefully this will fade away given some time!
Grey-mushial
This is what’s going on in my head and possibly the hardest part of the whole cycle to change. When I get frustrated with something I lose the will to carry on with something. This is normally the major factor in why I jump from project to project, task to task without completing things. I get frustrated and annoyed that I can’t do something so move onto something else I can do. This has a lot of negative impact as it means that sometimes I struggleto learn something new and overcome certain issues. This is quite hard to change, but I’m attempting to bring some positive re-inforcement to bear on the problem. Craving chocolate when being frustrated isn’t helping things, however, if I now manage to solve a problem that’s frustrating me then I can have some chocolate. This helps me motivate myself to push through the problems that keep me stumped, frustrated and annoyed.
Actually keeping my mind on task is another seperate problem. This, at the moment, I have no idea how to solve. I’ve started reading around this and started reading up on Zen as a lot of Zen practice seems to be based on either keeping your mind on a single thing or emptying your mind of all things completley. This may help, this may not help! Anything I struggle to concentrate on I make a note of what it is, hopefully some kind of pattern will emerge from the mess over time. For some reason, one thing I really can concentrate on without being distracted is painting my 40k models. I have no idea at all why this specifically is so easy to concentrate on, but an interesting observation none the less.
Why bring all this up on here? Well, for a start this place is one of my projects that gets overlooked quite frequently, and secondly so that if anyone does have any dealings with myself where I start something and don’t necessarily stick to it for a period of time….. let me know in case I haven’t noticed. There is a lot of Ubuntu stuff I’d love to do if I could just get over these daft concentration issues!
Training vs Teaching
by Matt on Dec.11, 2010, under learning, life, programming, ubuntu
Today I’ve been mostly teaching myself the oddities of C++. Now C++ is an object orientated language that’s an extension of C. This has led me to a revalation.
Recently at work I’ve been doing masses of OO stuff (as a change from the previous stuff I was writing which was largely linear) and as a result of that I’ve started seeing the world in terms of objects. Now in order to achieve what I needed at work, I ended up reading up on the theory of objects and what they actually are. In times past when I’ve been “taught” how to program (rather than teaching myself) , the content of the classes where more designed for a specific language on how to solve a specific problem. I think I only once sat in a computing based lecture that talked about the more abstract issues in programming. Whenever I start designing a program I always go back to that single lecture, and a few books that have a higher level stance on problems (such as Design Patterns) and then once I’m passed that do I go to the language specific things.
The reason I digress this far is that after learning all this meta-stuff, learning another language is actually relatively easy. Now everything is falling down to syntax rather than subject. Going back to the title, I think that those lectures that taught me to do this in this language because it does that has got things backwards. They were doing the training first in the hope it would teach you something. What they should be doing is teaching you the concepts (all the “meta”) and the train you in the language.
Teach and then train, not train and then teach. Something I shall have to try and follow more often in the future.
(Many thanks to Alan Bell for the inspiration in the title
)
Arduino powered lights and heating!
by Matt on Nov.07, 2010, under arduino, learning, ubuntu, Uncategorized
Over the past few weeks as it gets colder, I’ve really started to notice the significant bite in heating costs from our flat being largely electrically heated. The main issue with this system is that none of the heaters have thermostats, they are either on, or off. As each heater is 2kW or greater, and there are 4 of them in the flat, that means at any one time we could be using 8kWh of electricity. Which is a lot of money during the day!
The solution? Build a thermostat for them (and replace 2 with a gas convection heater). The circuit for this is quite simple thanks to the fantastic home easy set of sockets. I bought a pack of three sockets (with a remote) and a light bulb holder (we’ll come back to that later). On top of this I needed a temperature sensor (tmp36), a 433MHz transmitter , a 433MHz reciever and an arduino uno.
Thanks to the lovely folks at the Home Easy Hacking Wiki getting this lot to work together with an arduino is easy as anything! Here is the basic circuit:
This is only the transmitter/temperature sensor part. Initially you’ll need to build a receiver to get the ID of your remote. This can be found at this page in the arduino playground. Once you have your remotes ID, you just need a simple arduino sketch to turn the socket thats plugged into the heater on/off! Here it is….
HomeEasy homeEasy; boolean isOn; int incomingByte = 0; // for incoming serial data float timeOn=-900000; int myCode = 1595082; void setup() { Serial.begin(9600); homeEasy = HomeEasy(); homeEasy.init(); isOn = false; // 1 = On, 0 = Off } void loop() { float temp = getTemp(0); Serial.println(temp); if (Serial.available() > 0) { // read the incoming byte: incomingByte = Serial.read(); // say what you got: if (incomingByte == 111){ //turn on the group homeEasy.sendAdvancedProtocolMessage(myCode, 0, true, true ); homeEasy.sendAdvancedProtocolMessage(myCode, 0, true, true ); } else if (incomingByte == 102){ // turn off the group homeEasy.sendAdvancedProtocolMessage(myCode, 0, false, true ); homeEasy.sendAdvancedProtocolMessage(myCode, 0, false, true ); } } if (temp < 18.0 && isOn == false && millis()-timeOn > 300000 ) { //turn on the heaters homeEasy.sendAdvancedProtocolMessage(myCode, 0, true, false ); homeEasy.sendAdvancedProtocolMessage(myCode, 0, true, false ); isOn = true; timeOn = millis(); } else if (temp > 18.0 && isOn == true && millis()-timeOn > 300000 ) { homeEasy.sendAdvancedProtocolMessage(myCode, 0, false, false ); homeEasy.sendAdvancedProtocolMessage(myCode, 0, false, false ); isOn = false; timeOn = millis(); } } /* * getVoltage() – returns the voltage on the analog input defined by * pin */ float getTemp(int pin){ return (((analogRead(pin) * .004882814)-0.5)*100.0); //converting from a 0 to 1023 digital range // to 0 to 5 volts (each 1 reading equals ~ 5 millivolts }
This code ensures that there is no change in status for at least 5 minutes, basically so the socket doesn’t go continuously on/off and damage something! There is also a hook for a serial input to turn on the “group” of the remote. This is to turn on the light in my bedroom. I’m in the process of writing two simple bits of python to turn a light on/of depending which is run. This means I can set up a cron to turn on a light at a given time! Simple alarm clock
To get this code to work you’ll need the homeeasy library from here. You may need to alter the pin allocation in homeeasy.cpp, but that shouldn’t be too hard to do!
Next thing to do on this project is to get my Revo setup as a little wireless server box to graph the temperature changes and run the alarm clock. Conveniently it’s being replaced with a mac mini this week so has become available to complete the project. This will be a simple ubuntu box, running ubuntu server and little else really. Thought it may gain an ldap database for another, slightly different project.
Ubuntu UK Support
by Matt on Aug.07, 2010, under ubuntu, Uncategorized
OK Ladies and Gents, having been away for a little bit for various reasons, it’s time to get the support ball rolling. First things First, a date for your diaries.
On the 26th of August I’m organising a meeting to formally create the group from those interested parties and to set out some priorities. Initially we need to focus on some given areas where people ask for support. Once we have one or two of these running we can then branch out into other areas and help improve things where necessary.
I’ll stick a formal agenda on the UK Wiki, but if people want to start thinking about the following things it would be appreciated.
- How to report (issues/progress/problems fixed) for statistical purposes
- Initial Targets (UK Section of the Forums/IRC/Stack Exchange/Mailing Lists?)
- Blogging problems and resolutions
- Training
- How
- Where
- What to train on (problem solving techniques/diagnosis howto/?)
- What materials do the training team have for this
- Mentoring?
- How to put people in contact with the correct person to solve their issue
This is not a comprehensive list of the issues we’ll need to cover, but gives a good starting point to mull over. If you want to do a mini implimentation of something yourself, have a go and let us know how it goes at the meeting.
If people want to get hold of me individually to go through any issues, you can get me in jabber (daubers at REMOVE THIS jabber dot org) or on irc.freenode.net in #ubuntu-uk (nick of daubers) or by email on (matt at REMOVE THIS TOO daubers dot co dot uk)
Community Roulette
by Matt on Jul.17, 2010, under ubuntu
Alan Bell of The Open Learning Centre has set up an Ubuntu-UK Community Member Profile Roulette . This stemmed from the Ubuntu Irish Teams Profile of the Day, which is part of a masters project by a Dublin student to get people within the Irish community to get to know each other better. Both of these projects are fantastic ideas, and will hopefully help get more people to create Lanchpad profiles and wiki pages!
Oh, also, todays entry of the profile roulette was me!
What Drives You to Support Others
by Matt on May.25, 2010, under ubuntu
If anyone doesn’t already know, I’m on a push to see if community support can be improved. When I gave a talk at Oggcamp on this, someone suggested that the solution might become more apparent if I could understand what drove people to help support others.
I’ve sat and thought about this for a couple of weeks now, and as I sit here with a mug of tea mulling this over a bit more I think this is actually a very hard question to answer. I think it boils down to the following.
I help other people because I dislike feeling useless, and the people I look up to in the community helped me feel less useless by providing that support when I was learning.
I have a terrible habit of projecting my own feelings onto others. If I feel useless about something, then without thinking, I believe that other people would feel the same way. Due to the way I felt in that position, and how I that was solved. It seems fair to me that I do the same for others as others had done for me.
Now, that is my view, what I really need to know is why other people support new users. What is it that drives you and what could be done to help encourage people to improve the way in which they support others.
Please, please let me know. The more data I can collect, the better the solution I hope I can present back to the community to help improve things.
