LinuxPlanet Blogs

By Linux Geeks, For Linux Geeks.

Archive for the ‘Ubuntu’ Category

Get All Installed Packages on System in apt-get Format

without comments

Recently I needed to setup three almost identical web boxes. First of all I installed all three boxes with a base install of Ubuntu 10.04 server. I then installed all the required packages on one box and started looking for a way to replicate the installed packages on the other boxes.
I had a Google around and did not manage to find a way to do it so I decided to come up with a method by myself.

On the box where you have all your installed packages do

dpkg --list | grep "^ii" | cut -f3 -d ' ' | sed ':a;N;$!ba;s/\n/ /g' > installedOnSystem01

if you check the outputted file it should look something like this

adduser apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apg apt apt-utils aptitude base-files base-passwd bash bash-completion ...

once you know the file is ok, copy it to your second system using your preferred method for example scp

scp installedOnSystem01 username@system02:

then on the second system run the apt-get command in simulation mode

sudo apt-get -s install `cat installedOnSystem01`

this should give you output like this

...
0 upgraded, 30 newly installed, 0 to remove and 6 not upgraded.
...

if this looks ok remove the `-s` and run the command again to install your packages.

That’s it job done, the systems should now have the same installed packages. If anyone has any questions or can offer a way to shorten the process please leave a comment.

Written by Mark Davidson

August 30th, 2010 at 5:06 am

Ubuntu 10.04 – Fix Button Layout

without comments

Ubuntu Button Layout DefaultFor anyone running Ubuntu 10.04 the new default positioning of the minimize, maximize and close buttons can be quite annoying.
Previously I have been using `gconf-editor` to edit the settings manually whenever I change themes. But here are two quicker ways.

First of all you can just use `gconf-editor` running it from terminal and specifying the parameter of the key you want to edit. The GUI will then launch with the value you want to edit already selected.

gconf-editor /apps/metacity/general/button_layout

Now Double click on `button_layout`, change it to read ‘:minimize,maximize,close’, click ok and the change should take effect.

The second way is to use the `gconftool` which allows you to directly edit gconf repository values without using a GUI.

In a terminal session run

gconftool -g /apps/metacity/general/button_layout

It will return what the current button layout is set to. Which should read

close,minimize,maximize:

To edit this just do

gconftool -s /apps/metacity/general/button_layout -t string :minimize,maximize,close

Your button layout should now be correct.

Ubuntu Button Layout Fixed

Written by Mark Davidson

July 28th, 2010 at 2:04 am

3 good applications to import from camera/videocamera

without comments

There are many applications out there for Linux that can import to your computer. But we will list 3 of them, probably the best 3 open sourced applications out there today.

F-Spot

F-Spot supports 16 common files types, including JPEG, GIF, TIFF, RAW, and others.

Import your photos from your hard drive, camera (including PTP type), or iPod.
Creating a CD of photos is just clicks away. Simply select the photos you wish to have on CD, and choose “Export to CD” from the main menu.

If you have a Flickr23Picasa Web or SmugMug account, F-Spot can export photos to it, while optionally resizing your selection, and preserving tags and metadata.

You can also export to Gallery or O.r.i.g.i.n.a.l. powered websites, or a nicely themed static webpage.

Shotwell

Shotwell Features:
1. Import: Import photos from folders or from any digital camera supported by gPhoto.

2. Organize: Shotwell automatically groups photos taken at the same time. You can also use tags to organize your photo collection.

3. Edit: You can rotate, crop, reduce red-eye, and adjust the exposure, saturation, tint, and temperature of each photo.

4. Publish: Publish photos to Facebook, Flickr and Picasa Web Albums.

Rapid Photo Downloader

This one isn’t like the 2 others, as this application is a pure import application. So if you only plan to import photos/videos, then i would go for this application. No question about it.

Conclusion

If you need a great feature rich application, then F-spot is the one for you. Specially the version 0.71 that was recently released.

If you only need to grab a few photos and easy to upload them to facebook or flickr, then Shotwell is the one to use. It’s more slimmed, but remember it cant handle as much file types that f-spot do.

If you need a pure import application, then go for rapid-photo-downloader.

To install these ones in Foresight, open terminal and write:

sudo conary update f-spot
sudo conary update shotwell
sudo conary update rapid-photo-downloader

The version of the applications we got today is:
f-spot 0.7.1
rapid-photo-downloader 0.3.0
shotwell 0.6.1

Aleks on Linux

without comments

My wife has recently gone back to college to get her bachelor of nursing and I've been worried that we would be required to get a Windows machine for her to complete assignments. I'm going to resist as hard as possible as we haven't had anything but Linux in our house for some years. This however, came under threat recently with the first week of school. The math class she is taking uses a web service called Aleks for homework. The service is a homework platform that uses a java plug-in in browser. I see no need for anything on the web to not be cross-platform. While they don't officially support Linux they do include some information on how to get it working under Linux.

I followed the steps on the site and logged into my wifes account and much to my chagrin was not greeted by a functioning Aleks. So, I resorted to google for help. There isn't much info out there giving any more help than the installation instructions on the Aleks website. There are reports however, that it does work.

The solution it turns out is quite a simple one and is found on the official java website. Basically you need to create a symbolic link to the java plugin to the Firefox plugin folder to enable in browser java to work.

Hopefully, this info will save some poor Linux user from having to suffer too much to get their homework done.

Written by PipeMan

July 9th, 2010 at 9:58 am

Rapache on Ubuntu 10.04 ? Not likely.

without comments

Rapache Logo

Along with the last LTS release of Ubuntu, Lucid Lynx, there have been a few requests to bring back Rapache and make it work on the newer Ubuntu releases. (what’s Rapache ? Here’s all the posts about it)

Will it happen ? Probably not. Here’s why.

A bit of history

Rapache has been my first real open source project and a good excuse to learn Python programming and do something useful. While the name and icon has been brought by others, the concept and coding for the very first release has been done entirely by me. (read the announcement)

Picture that shows the main window of Rapache

The first version of Rapache

While the concept has not been appreciated by some, the software proved itself useful for some and I soon received a helping hand from another person, Jason, who helped me developing and added himself a terrific number of features and improvements.

Along with my newly found mate, newer releases flew. A plug-in system, advanced virtual hosting editing, Apache’s modules configuration, GUI tweakings, and so on. The Apache config parser has been rewrote 3 times, and I’d dare to say that the last version of it (even though not feature complete) is pretty good.

Eventually, Rapache made it to the Ubuntu Universe repository.

Everything was working fine, and, even if we had pretty much no feedback for the program (yes, we almost never heard a word from our users, we knew the software was used just thanks to Popcon stats and the very few number of bugs reported), we began to work onto the next version, with the radical changes needed to support the SSH protocol.

Rapache SSH Alpha

This is the SSH alpha which will never see the light.

Then Jauny Jackalope came out

When Ubuntu 9.04, we found out that Rapache wasn’t working anymore. Even though the bug had been reported before Ubuntu’s final release, we began looking into it only some day after such release. For sure I undervalued it.

Why does Rapache freeze when you try to do almost anything ?

Funnily enough, with people reporting the bug, Jason and I finally discovered to have some users ! :)

We traced back the problem to be in python-gksu2. There was apparently no other explanation, since until Hardy Rapache was working fine. While I was working on a fix, Jason released a quick patch to solve temporarily the problem. I posted it on Launchpad, then asked Emanuele (emgent), a MOTU which was - formally - part of the team and official packager to issue a SRU to fix the problem.

Nobody, not Emanuele, nor the MOTU team, not anybody else ever did that.

The removal

Since I was not satisfacted with the quick fix, I began to work on a better solution. I never found it. I haven’t been able to trace out in google any similar problem with python-gksu2, nor I ever got any response from the MOTU channel. In many ways I considered and still regard that bug as an Ubuntu bug, not really Rapache’s.

Then I made a radical change in my life and moved to another city for a while (almost a year).

In the mean time, Rapache, since not working was stripped from Debian. I am fine with that, it never really worked in Debian, simply because it was packaged like shit on it, and un-updated. Funnily, people reporting the bug in Debian seemed pretty happy to have the program and the need of patching it manually to make it start seemed normal to them.

Right after being removed from Debian, Rapache got removed from Ubuntu repositories as well. I am very fine with that too as it has unmaintained for a long time, and it’s good for distribution to strip non-working packages.

A second try

Recently a french guy proposed to help and handed me a quick patch to substitute python-gksu2 with a normal dialog. With my surprise and horror, that would freeze Rapache as well.

My guess is there is something bad about the threads in the program, but frankly I couldn’t find out what. In my own opinion, the only right thing to do would be to re-engineer the whole GUI, move away from python-gksu2, implement D-BUS and Policy Kit. That would require an awful lot of time (also consider the code is not that clean, being that my first experience with Python).

Why Rapache won’t be brought back

So in true open source fashion, as the maintainer of this project, I am going to arbitrarily drop off the face off the of this earth for purely selfish reasons, and leave the entire cause in limbo. That is how open source projects truly die. But hey, all the material is out there for y’all to see (it’s “open source” in it’s own way), so maybe someone else will take up the cause. Carry on, lusers!
– Linux Hater’s [source]

I have no time, and not good motivation to re-engineer the whole software. Development has been hard sometime, I spent a nice bunch of sleepless nights and I’m frankly not willing to put that much energy into Rapache development anymore.

Normally, this would mean the software would be maintained with small fixes, just to keep it useful and working for the users. But here we have a software with a big problem, thus requiring a lot of work.

A lot of you have been asking what you can do to help. The answer is very simple though unpleasing: fix it. Do it for yourself, do it for the community or don’t do it at all and pass by. Shall you wish, you can even fork it, it’s free software, you have the full right to do that.

My final stance is the following:

  • I won’t probably fix it for a long time, since I have to work to make a living.
  • If somebody forks it, I’m totally okay with that, as long as he changes the name of the software
  • If somebody fix it and publishes a (really) working branch for Ubuntu 9.10 and 10.04 in that case:
    • I am available to publish it on the Rapache PPA.
    • I’ll include him in the dev team
    • I’ll help maintain the software with small fixes
    • I won’t ever spend time, not even 5 minute, to get Rapache included into an Ubuntu official repository. MOTU are for that, I won’t propose it for inclusion or do any work that doesn’t belong to the upstream domain.

Shall you wish to install the broken Rapache under Ubuntu 10.04 (for patching and use or development), you can download the code with this command:

bzr branch lp:rapache

I’m sincerely happy to have helped the community, even for just one year. Big thanks to Jason and to everybody who helped.

Written by Stefano Forenza

June 29th, 2010 at 12:43 pm

Posted in Linux,Ubuntu,rapache

FOSScon 2010 followup

without comments

Sorry it’s taken so long to post about this. So last Friday I and a friend of mine, Joe, took off from North Eastern Massachusetts headed for Rochester NY for the inaugural 2010 FOSScon. Joe has just finished taking courses at Lincoln Tech and is about to take the tests for A+, Network plus and MCP certifications and is excited to get into the world of FOSS and technology. It was supposed to be a 6.5 hour drive which ended up being about 9 since I had forgot I set my GPS to avoid tolls. If we had been on time, would have just caught the tail end of a pre-event dinner meetup that was put on at the last minute. Oh well, lesson learned for next year. Non-the-less, it was a nice ride through upstate NY during the day. Couldn’t have asked for better weather.

The next day we got to the event just as the opening keynote about BaseKamp was starting. Basekamp is “a non-commercial organization of people researching and co-developing interdisciplinary, self-organized art projects and based in Philadelphia.” A very interesting and established project which does a lot of good for the community.

Next we were on to the Resume workshop by Jim Bondi from the IT Cooperative Education Program Advisors at RIT. Since Joe will be hitting the ground running to find a job after his classes and externship, this workshop was one he really wanted to hit up. Being in the field a while and being on both ends of an interview myself, I didn’t think I would get much out of this as I actually did. A lot of the information given should be common sense, but some people just don’t put it together when writing their resume. I was also able to chime in with some comments based on experience to questions from the other attendees. Joe thought the talk was very informative and prompted him to go back and update his resume based on some of the advice given.

Lunch was where I think we learned how to improve a bit for next year. It was prettymuch everyone for themselves. Not saying I was expecting a free meal, but we should have had something organized so would have spent less time figuring out what was around for food and who was going to go where with who and spend more time mingling and discussing the talks, workshops and just shoot the breeze (read: geek out). In talking with some of the people who organized the event, this was noticed and will be something to be worked on for next year. Joe and I ended up eating a local bar and grill less than a mile away. While others had to trek quiet some miles away and had to rush to get back in time.

The next workshop Joe and I decided to attend was “Life without GUI”. Again, with Joe just getting into IT and FOSS, this would have been a great thing for him to learn some neat tricks on the command line within Linux. Unfortunately, I don’t think this workshop went very well. For one, I think they started earlier than they should have. We walked in after they had already gone through some decent tips. And to be honest, I don’t think the speaker was very good at teaching basics to people who aren’t on the same level. There was some butting of heads during the talk with differences of opinion and a blatant refusal to go over any simple commands like ls, cp or pwd even though we had a few extra minutes to spare. I was pretty disappointed with this workshop which could have been very valuable for Joe and even myself but instead was just brushed away as a waste of time. Maybe we learned how not to give a workshop.

Then we were off to “Learning how to fish: A self-help guide to finding Linux help on the internet” by Jorge Castro from Canonical. This talk was a complete opposite from the previously mentioned. Jorge is insanely good at giving a presentation. He first went on about how people perceive getting help in open source projects and hit the nail on the head doing so. Then he went on to how things should be done. Everything from how to properly use google, search forums and contacting the right people to get the most bang for your buck. Add to that, Jorge was very good at keeping everyone included in the discussion by asking questions from the audience and even adding in some topics that were brought up. Very well done.

After the talk we had some time to kill before the last keynote. I got to meet up with Jorge a couple others while we checked out the vendor section where Linode and the Free Software Foundation still had tables setup. Had some discussions with the Linode vendor, got some free tshirts and talked about some FOSSy type things. Then we found out there would be lightning talks before the final keynote. People scrambled to throw together some presentations. It was pretty impressive to see ideas just come up and people putting together lightning talks so quickly. The 5 minute talks went really well. Everything from Jorges talk about Unity in future versions of Ubuntu to a wiki project dedicated to the city of Rochester, NY and the people that live there.

Finally, we had the keynote from Jonathan Simpson from Freenode. This was an overview of the whole event, it’s goals, what it took to get here and the future of FOSScon. He also talked about the Geeknic and FOSSevents projects. Both of which I am very interested in and will hopefully be taking advantage of in the near future. There were some raffles being held in which Joe won a free digital copy of any O’reilly book he wanted.

At the end of the day, it was a very successful event. We got to take part in some great discussions and meet up with a bunch of new people. Some of which I have talked with online previously, some having discussions with for the first time. I am definitely looking for next year’s which should be bigger and better.

Thanks to Andrew Keyes for the photography and allowing me to use the pictures in this post. You can find the whole set of pictures on Flickr.

Written by leftyfb

June 25th, 2010 at 2:13 pm

Free Software & Me

without comments

Since Stuart posted the previous post, and having read through the comments, I thought tonight an apt time to describe my view on FOSS - though I hope people don't care.

When I first came across Linux in 2004, I was enthralled. I spent hours with a friend of mine trying to get it installed on an old Aspire 1350 laptop I'd just got to go away to University with. I finally got a 'flavour' called College Linux installed. It came with lots of apps relevant to academia - quite cool - but ultimately unusable. I wasn't doing a CS degree, I had no experience of any computing other than a ZX81, and Windows. Oh, I'd once played 'Blood Bath' on some kind of Mac at summer camp.

The idea though was what bit me. The philosophy of everyone throwing their contributions into the hat, and then everyone selling their bit. Some guys might be better at Sales, so they'd just burn & sell the CDs (and hopefully pass some profit back to the project), Developers could pool their talents to create better software, and if a company needed a 'bespoke' application, they could get it developed and passed back to the community in return for having access to other companies' 'bespoke' applications. It was a winning formula. Sure, there were places for it to be abused - but a system that allows no freedom only benefits the person that writes it.

Not long after that, I came across the InGOTs. Whilst I may have gotten the wrong end of the stick at the time, I saw it as a potential extension of that very same philosophy - but to enable educators to pool their resources to help students. It is that, but it's also alot more.

The next 'philosophy' to pass across my desk was that of 'Ubuntu' - "I am who I am because you are who you are." Coming from an African philosophy, this idea is much older than anything a Computer Scientist could have thought up. It's about recognising that your life is intrinsically tied to the rest of your community. We all have certain skills that we can offer, but we also benefit massively from the other people around us. For me, this was a winning formula.

I wanted to use this. I wanted to use this philosophy to do some good. Woo. Go me. The problem I realised was that I was using the philosophy to market software to users - that's missing the point by a significant margin.

In the same way that Developers, Testers, Users and Sales are all tied into the ecosystem of software development, this same ecosystem can be extrapolated up to a higher level to society. We have Doctors, Teachers, Consultants, Athletes, Military, Public Servants all working in the same ecosystem. Do these guys share Ubuntu? Where once there was a respect for the professionals across all walks of life, groups have been fighting against each other and poisoning the inter-group relationships and respect.

As an example, were I to ask people about the Teaching profession - many people would say "Long Summer Holidays," and for Doctors - "Overpaid." We've forgotten the "I am who I am so you can be who you are." Teachers provide us with experiences and frame our learning long after we've left their classrooms. Doctors can do for us things which we will never be able to comprehend, and the Military protect us despite our lack of support.

It was this revelation to me that made me realise that I could no longer spend my time espousing the benefits of Free Software. Coupled with a very poor showing by Richard Stallman at the University of Manchester, when he flagrantly and aggressively dismissed the questions "Should software used to control a Microwave be free?" with the short answer 'No' (yup, go figure). Freedom with your software is what I'd prefer to support - and that includes the Freedom to run Vista if you really really want - no matter how inadvisable it is.

Written by Andy

June 23rd, 2010 at 4:22 pm

VPS.net 1 Year Review

without comments

VPS.net

This month my VPS.net account reached the grand age of 1 year old. For this special occasion I thought I would do another review of VPS.net and recount some of my experiences from the last 12 months.

In this review I will go over the good and bad aspects of VPS.net that I have experienced. Also I will cover what is coming in the future and what I would like to see in the future as well. Finally I will give a bit of a summary of my thoughts after a year.

VPS.net

For those that don’t know VPS.net started up in December 2008 and are part of UK2 group. They provide cloud based hosting solutions that aim to provide flexibility, scalability, failover and high availability. You can find a good explanation of the services they offer here.
If you haven’t already read my review of why I choose VPS.net in the first place I suggest you check it out here.

My VPS.net Servers


I initially started off with simply a single server using a single node. Now at the end of the year I am running 3 servers under one account and 2 under another account.

The 3 servers under my main account are as follow:

  • VPS 1: Ubuntu – 3 Nodes and 1 Storage Node
    This server runs most of my client sites.
  • VPS 2: Gentoo – 1 Node
    Development and Testing Environment.
  • VPS 3: Ubuntu – 1 Node
    This Blog and a few other websites.

The Good & the Bad

Let me start off by going thought the good and bad experiences that stick out in my mind from my year with VPS.net.

The Bad

Best to get the bad out of the way first these are the three experiences that really stick out in my mind over the year.

Migration Issues

During the migration of what was then UK Cloud A to C, one of my servers was moved like everyone else who had a VPS on cloud A. Unfortunately in my case there was a problem and I lost two hours worth of data which included active orders for a client.

This was extremely frustrating as only one or two other people experienced this issue. It seems that all the VPS’s where backed up and then moved. However while this was in progress the new data was accumulating on the old cloud, when the backup went live on the new cloud it was two hours old hens the loss of data.

All I got with this was a response saying that shouldn’t of happened and nothing more. However this is most likely because I did not follow it up due to the fact I was flying off to America for two weeks.

SAN Failure

At the beginning of May the Cloud C SAN had some issues which took almost 4 hours to get resolved. This is the longest downtime I have had with VPS.net over the entire year. As a result of the downtime all people who where affected got a months worth of SLA credits, which I consider to be pretty fair compensation.

Auto Suspend of 250 – 300 Clients

Last week I got an email from VPS.net `Your account is suspended` naturally my first thought is damn I must not have paid a bill. Open the email and the first line that catches my eye is `Your VPS.NET Account has been suspended for the non-payment of invoice 0 on Wednesday 31 December, 1969.`

Thinking this has just been an automated email error I attempt to access my servers all 3 are down. I instantly get some support tickets going and check the forums. My ticket gets answered in about 10 minutes that it is an issue the auto suspended script has been disabled and peoples servers are coming back up.

This really was a case of replacing someones job with a small shell script gone to far. There is no more auto suspended being done with VPS.net it is now a manual job so this will not happen again. Just a pity it happened in the first place.

The Good

Constant Improvements

A great thing about VPS.net is that over the year I have been with them despite a few bumps in the road they have only continued to improve their services and there seems to be no sign of them slowing down as mentioned previously on an almost weekly basis. I have used many different hosting companies in the past and none of them have come any where near to improving their services as regularly as VPS.net does.

If you read my previous posts about VPS.net you will see the lists of features I talk about or check out their own which on a weekly basis seems to mention some new feature or improvement.

Flexible

The flexibility of VPS.net is another one of the things I really appreciate. In the past with other providers its been difficult to get a balance of performance and effective pricing. With VPS.net its really easy as you can just add more resources as you need taking only the amount of time it does to reboot the system.

Very Good Customer Service

Another really good aspect of VPS.net is the customer service. Every support ticket I have ever opened has had a response within 15 minutes and the staff have always been very helpful.

Not only is the staff good at responding to support tickets they are also very active on the forum which is helpful as well. The forums are also very good because they are really active with users who have a wide range of knowledge.

What’s coming to VPS.net in the next few months

Console

Currently quite a good feature of VPS.net is having the  ability to access your servers via a console interface in case your server can’t be accessed by SSH or you have other issues. It works fairly well and has helped me recover from a few issues such as an over zealous sshd.conf which stopped and user being able to login over SSH. Although in its current state there has been some issues where you can’t execute key combination’s such as CTRL + C.

A new version of the console is going to be a KVM solution and apparently is a lot better. This would be really good as although the current version is substantially better than the ones I have used with other hosting companies it is limited in a few ways, hopefully the new version will address these issues.

DNS 2.0

A new version of the DNS system is coming soon which will add new functionality including the ability to configure TTLs and new failover functionality. Some of the improvements came alive on Friday the 18th but other changes are still to follow. The most notable new change that came alive on Friday was features the ability to set SOA/NS which allows you to white label the VPS.net nameservers.

Redundant SANs

This is my favourite one of the new things coming to VPS.net in the next few months. 100% redundant SANs, in the past most down time has been due to SAN issues such as a bad RAID card. But no more will this be the issue any problems you simply get migrated to another SAN which is just awesome.

This is also now in place to an extent but not for everyone unfortunately. If you want to take advantage of the new redundant SANs you need to have your VPS migrated to SANs that support the new failover implementation.
A bit annoying for old customers but perfectly fine for new customers as I believe they will be on new SANs anyways.

Windows

Windows is coming to the cloud. Not something that excites me personally but should be good as might work out as an effective solution for people who want to host gaming servers ( After all no one truly wants to run Windows for anything else :) ).

What I would like to see in the future

Failover Solutions

However resilient the cloud is even with the new version of the SANs it would be really good to have an effective instant failover solution. Such as using Floating IPs where in the case of using two boxes a master and a slave. The master uses the IP address if it fails the slave assumes the IP address till the problem can be resolved. One of the companies I am associated with does this and its a really effective solution.

Load Balancing – Geographic and Hardware

I have been writing this post over the course of the week and I saw a tweet about this feature, they are actively looking for beta testers for load balancing solutions. I have applied and if I get in I will do some posts about the new service.
You can find updates on this services here.

Ability to Download Imaged Backups

At the moment you can make up to four full back ups of your VPS daily, weekly, month and a custom. It has been discussed before on the VPS.net forum but it would be very useful to be able to download these backups to keep them for archiving purposes or just as another safety measure.

My Future with VPS.net

Currently I am planning on expanding to add some additional servers. Mainly adding ones for running databases separately. Also I want to add in some servers for failover which will be possible when the rest of the new DNS changes come live.

At one of the companies I am associated with we are planning to start the migration of two racks of servers currently based in London to a visualized solution with VPS.net.

Overall

Overall as you may have guessed by now my opinion of VPS.net is very good in general. They provide an extremely good and growing service with flexible pricing thrown in to the mix.

I give them a solid 9.9 out of 10 for a rating. I wanted to say 10 out 10 can’t be any better but the recent auto banning of ~250 clients just pushed it down a bit.
What I would say really is if you are looking for an effective VPS solution no matter what you scale VPS.net can cater for you and I highly recommend them. If you have any specific questions please feel free to leave a comment, email me or just check out VPS.net forum. If you do decide to go with them please use my affiliate link here.

PS: I would be very interested on hearing other peoples thoughts and experiences. So if you have something to say, please leave a comment.

Written by Mark Davidson

June 20th, 2010 at 3:07 am

off to FOSSCON

without comments

I just registered and booked a hotel to attend FOSSCON this Saturday. The official description of the event is as follows:

The people behind FOSSCON are free software enthusiasts, user group members, coders and users — just like you! Free software is all about community and this is a very grassroots event, organized by the community and for the community. Our common goal is to provide a space for us to all come together in the northeast.

I’m hoping to meet up with lots of people from the open source world and attend some interesting and informative talks and workshops. If there’s anyone that would like to meet up during or after the event, feel free to post a comment here or contact me at leftyfb at ubuntu dotcom. Hope to see you all there!

Written by leftyfb

June 16th, 2010 at 8:58 pm

GNU Binutils – strings

without comments

A really quick post this time to just take note of the strings tool which is part of the Binutils collection of binary tools

The strings tool allows you to print all printable characters in a given file or files. This can be very useful for a number of different tasks from extracting metadata from a file to retrieving a certain level of information from unknown executables such as what URLs it has contained within it.

So how to install it on your system.

Under Ubuntu or Debian

sudo apt-get install binutils

Under Gentoo

sudo emerge sys-devel/binutils

Now for a usage example lets say you have a PDF file if you do `strings mypdf.pdf` you will get output similar to this.

%PDF-1.3
1 0 obj
/Pages 2 0 R
/Type /Catalog
endobj
2 0 obj
/Type /Pages
/Kids [ 3 0 R ]
/Count 1
endobj
3 0 obj
/Type /Page
/Parent 2 0 R
/Resources <<
/XObject << /Im0 8 0 R >>
/ProcSet 6 0 R >>
/MediaBox [0 0 1075 720]
/CropBox [0 0 258 173]
/Contents 4 0 R
/Thumb 11 0 R
endobj
4 0 obj
/Length 5 0 R
stream
258 0 0 172.8 0 0 cm
/Im0 Do
endstream
endobj
5 0 obj
endobj
6 0 obj
[ /PDF /Text /ImageC ]
endobj
7 0 obj
endobj
8 0 obj
/Type /XObject
/Subtype /Image
/Name /Im0
/Filter [ /RunLengthDecode ]
/Width 1075
/Height 720
/ColorSpace 10 0 R
/BitsPerComponent 8
/Length 9 0 R
stream
endstream
endobj
9 0 obj
3096046
endobj
10 0 obj
/DeviceCMYK
endobj
11 0 obj
/Filter [ /RunLengthDecode ]
/Width 106
/Height 71
/ColorSpace 10 0 R
/BitsPerComponent 8
/Length 12 0 R
stream
endstream
endobj
12 0 obj
30105
endobj
13 0 obj
endobj
14 0 obj
30105
endobj
15 0 obj
endobj
16 0 obj
30105
endobj
17 0 obj
/Title (My PDF)
/CreationDate (D:20100310110120)
/ModDate (D:20100310110120)
/Producer (ImageMagick 6.4.5 2009-06-04 Q16 OpenMP http://www.imagemagick.org)
endobj
xref
0 18
0000000000 65535 f
0000000010 00000 n
0000000059 00000 n
0000000118 00000 n
0000000301 00000 n
0000000386 00000 n
0000000404 00000 n
0000000442 00000 n
0000000463 00000 n
0003096696 00000 n
0003096719 00000 n
0003096747 00000 n
0003126997 00000 n
0003127019 00000 n
0003127035 00000 n
0003127057 00000 n
0003127079 00000 n
0003127101 00000 n
trailer
/Size 18
/Info 17 0 R
/Root 1 0 R
startxref
3127298
%%EOF

As you can see you get quite a lot of information out of it follow that with a grep you can easily extract specific pieces of data. For example `strings mypdf.pdf | grep Title` will return.

/Title (My PDF)

Not terribly exciting I do appreciate but shows a quick example. Its one of these things that is damn useful when you need it and not terribly exciting the rest of the time.

Written by Mark Davidson

May 28th, 2010 at 4:44 am