Entries Tagged 'Ubuntu' ↓
March 21st, 2008 — Programming, School, Ubuntu
Within the past year, my school has started to become very involved in trying to start it’s own radio station. We’ve had a large amount of money put into it and it’s slowly growing. We have the software that all the professionals use, and all of the equipment too.
But now I’m moving on to developing an automation application for the time that there isn’t a show on air. This will be similar to Southampton University’s radio station automation system (http://surgeradio.co.uk).
I’m using a combination of python and gstreamer. The feedback so far from the teacher involved, with our radio station, is good. The only problem is the network technician that is a Windows Server user. I think I’m going to have a problem, when I ask for a linux server to host the automation server, streaming, file server, and website. I expect he’ll wonder what’s wrong with his little sharepoint setup, he has going. Hopefully I might be able to do some persuading to get past that, but it’s not going to be easy. I understand the problem that this would cause though. I’m the only one with the skills to maintain the linux server. When I leave next year, I doubt they will have a clue how to operate the server, as I don’t think they have no knowledge of Linux. Anyway, that’ll be fun to try and sort out. Any suggestions?
At the application side, it’s coming along well. I’ve made a website that will allow listeners to request songs to be played. These requests are popped into a MySQL database. From here, my python app checks for new requests after every song. If there is a request, it’ll play that. If not, it’ll choose the next song from a pre chosen list. Nifty, aye?
I was amazed at how quick it was to develop in python, as this is my first real programming project in python. It was so simple to get a basic set up done. I had it done within a night! Jono Bacon’s excellent guide on gstreamer in python helped me well. The app now also has a nice little GUI, made in glade, that’ll help the DJs turn the automation on and off.
For the hardware setup, I’m looking to get the server, that I mentioned, and a few high quality sound cards, that’ll provide balanced audio in and out. I don’t think we’d need much processing power for the encoding of the streaming, as I’ve done a few test runs with my old Pentium 4 clocked at 1.8GHz.
All I have to do is finish it all up now… And perhaps do some of my many pieces of homework!
August 7th, 2007 — Hardware, Internet, Ubuntu
First off, I realise that I haven’t posted a blog entry in a while now. I don’t know why I haven’t, as I’ve had plenty of time, it being the summer holidays and all. I always find my self wanting to do so much stuff in the summer holidays, and somehow turn up doing hardly anything. ‘Tis a shame.
Anyway…
After reading this mailing list post on ubuntu-uk, I was surprised these 3G datacards actually worked under ubuntu. Therefore, I instantly zoomed off to ebay and purchased one for £34 + postage. I made sure it said unlocked in the ebay listing, as I currently have a virgin mobile sim card and didn’t want to waste/switch to vodafone.
So the datacard turned up and I popped my phone SIM in it. Following the guide that was written in the mailing list, I configured it. This was using kppp. So I made everything was in there right and tried to connect. One problem though. Everytime I tried to connect kppp would lock up instantly. “Ah dear”, I though.
After much researching, I managed to set up the datacard using gnome-ppp, which is equally, if not more, easier to set up the datacard in. And here is a little guide I’ll write in full for you…
Continue reading →
July 14th, 2007 — Hardware, Ubuntu
So I’ve been on a little fun into setting up a webserver. Using an old computer which uses a shuttle case + motherboard. This case and motherboard has been through a lot. Stuff taken in and out loads.
And the fan failing. That was fun. It kept overheating and after much playing around, we found that the fan on the cpu heatsink had died. Shuttle being nice and kind when they designed this heatsink, made a size fan that you can’t get anywhere. Instead, I got a generic case fan and duct taped it to the heatsink! Clever, eh?
So my server. What is it serving? Well, it’s backup server. Thanks to the backuppc package, all the computers will be backed up in my house. Every week a full backup is done. Followed up by a incremental backup each day. Backuppc is also very clever. If there are files that are the same across backups and computers, the file will only be stored once. I can’t backup my whole house yet though. This is because of the hard drive in the server. It’s only a 120GB one. That means I’m currently only backing up one computer as a test.
What else is my server serving? SSH. The first thing I did when I set up the server was install SSH. This is for two reasons. The server is now on top of a shelf somewhere else in the house with only power and an ethernet cable attached. SSH is my means of remote access. The other reason is so I can have a nice SSH tunnel when I go to sixthform in September. No more annoying school filters to me
Another part of my SSH server is a key based authentication. I decided that I didn’t really want to put my server out on the internet, if someone was able to bruteforce the password. Therefore, I have set up key based authentication and completely turned off Password authentication.
Quotas. I also managed to set these up. Just as a play around really. It was pretty simple to do:
sudo apt-get install quota
- Open up fstab and pop in the usrquota option to the partitions that need to be quotaised
- Restart
sudo edquota -u username
- The quota config for that user will show up. Under the blocks and inodes column, you are able to see what the current use of that user is.
- You are then able to edit the number of blocks (1,000 blocks = about 1MB) that the user can make under the first hard and soft columns.
- The second quotaing is the number of files which can be set under the second hard and soft columns
- Save and quit. You’re set!
What’s the difference between hard and soft quotaing you ask? From what I’ve read around the internet, a soft quota is one that limits the user slightly. The user is allowed to go over the soft quota. But only for a limited time, before they have to delete the files. The hard quota is a strict quota. You hit that quota, and that’s it. Delete the file or be able to do nothing!
And of course, to do my bit, my server is folding proteins. Slowly but surely…

July 5th, 2007 — Screencasts, Ubuntu
Before you ask… No I don’t know why I chose 97 takes for the title! It just seems like that after the number of times I had to rerecord.
Having my summer holidays starting early, I’ve got to find things to fill my day with. Yesterday was “make the samba screencast” day.
New format as well. Full 720p HD format and also a little introduction at the start.
Here it is anyway, in all of it’s hd goodness:

I seemed to be extremely slow in making this screencast too. It took me the whole day to make a 4 and a half minute screencast. I suppose. I wasn’t working on it constantly though.
So, in making the screencast I did the following things:
- Planned my general script while running through it with a vm
- Make a little presentation to start off the screencast
- Get the transitions to work just right
- Record the intro + presentation
- Add audio
- Record the content
- Add audio
- Record the ending
- Add audio
- Join it all together
Simple, eh? Not really. I kept bumping in to little problems whilst recording which annoyed me everytime.
And with the audio, if I say one word wrong, that’s it, I’d have to start again. Audacity seems to hate me. If I was to want to have a separate track to record to it would decide that the sound would be all broken up. Annoying I know, but I think I fixed it *after* I recorded all the sound. At least it should be better next time!
And today I found out that I forgot to include a part on changing the samba configuration file.
Oh well. Hopefully more will be on the way soon!
July 3rd, 2007 — Ubuntu
Things going wrong. You’d expect this to be a bad thing. But I often find this a good thing. Why? Well it may take ages to fix a problem, but you learn so much in the process!
I persuaded my friend to use Ubuntu Linux a while back. So he went and installed it. He found that his wireless network card didn’t work, and there was no way it would work (even under ndiswrapper). So he went ahead and bought a nice wireless card from linuxemporium.co.uk. You’d think that they’d pick one that would work “out of the box”. Well, no! You get this awkwardly written guide (not good for newbies to linux). So I went ahead and re wrote it into simple talk. Great! It worked!
About a month later he decided to reinstall ubuntu and windows so that he could get the partitions right. So he went and did it and began to set up the wireless network card again. This time it didn’t work, even with my simpler instructions. So instead of getting me to help that much he decided he’d just get a nice ethernet cable instead.
Right. So he’s trying to get *everything* to work under ubuntu now. One of those things required his external USB hard drive. Simple you’d think. Plug it in and see it appear on the desktop. Unfortunately not. In this case it was, plug it in and see *nothing at all* happen. So he comes talking to me to ask for help. This is what I found out
- The device was being recognised as sde - from
dmesg
- The device was not mounted - from
mount
- The device had partitions - from
cfdisk /dev/sde
So, I go ahead and tell him to mount the disk manually.
sudo mount /dev/sde1 test
“Please specify a file system type”. Ok then.
sudo mount -t vfat /dev/sde1 test.
“Invalid file system type”. At this point my friend restarted into his windows partition, and the drive worked perfectly. During this time I had a google around and found that there might be an error on the drive. I don’t know much about fsck, but I gave it a go anyway.
fsck /dev/sde
Response: No FSINFO sector 1) Create one 2) Do without FSINFO
Ok then. We’ll press 1 and continue, even though I don’t know what a FSINFO sector is (but at a guess I’d say it is a sector that holds information about the file systems). After that part there were a few other messages like “Free cluster summary uninitialized (should be 10914208) 1) Set it 2) Leave it uninitialized”. We just hit 1 each time and carried on. But at the end of all of that we get a message saying “Leaving file system unchanged.“. I was asking myself why it isn’t saving the fixes, even though I told it to fix it. Ah well. Back to the drawing board.
After a few variations on the fsck command I came up with this nice one:
dosfsck -w -r -v /dev/sde1
So. Ran that. Hit 1 a few times. And tada! All fixed!
And now I know how to operate fsck more! Yipee!
In other news, it’s raining a bit here, and there’s a lot of thunder
/me hides