Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, June 20, 2008

irssi notifications over Jabber (or IRC barking)

Thanks to daubers (the brains behind the XMPP doorbell) who suggested it, I now have irssi highlights sent directly to my Jabber client. Quite a handy thing since only yesterday I logged in to find several PMs awaiting me from 4 days ago.

For the base I used an existing irssi script called fnotify, which was designed to write notifications to a file. I found this script from Aaron Toponce's blog post.


mkdir -p ~/.irssi/scripts/autorun
cd ~/.irssi/scripts
wget http://www.leemhuis.info/files/fnotify/fnotify -O fnotify.pl
chmod +x fnotify.pl
ln -s ../fnotify.pl autorun/fnotify.pl
nano fnotify.pl


Change line 56 (which reads something like open(FILE, ...)) to:


open(FILE,"| sendxmpp -i me\@example.com");


Replace the JID with your own, and make sure to put a \backslash before the @ sign as above.

sudo apt-get install sendxmpp


When it is installed, tell sendxmpp what account to use for sending messages:


echo me@example.com verysecret123 > ~/.sendxmpprc
chmod 0600 ~/.sendxmpprc


Replace with your JID and password of course ;)

Now, in irssi:

/win 1
/run fnotify.pl

(switching to window 1 is necessary to see any error messages if they appear)

If it loads successfully, get someone to say your nick or send you a private message. It should appear in your Jabber client within a few seconds.

A consequence of this for me is that IRC now barks too :)

Friday, September 21, 2007

GNOME 2.20 released

...and it looks like I will be sticking with GNOME for another 6 months after all!

Even the most annoying thing about Epiphany seems to be fixed - the address bar. Also I no longer have to sync my Tomboy notes with an automated SVN commit. I'm close to forgiving it for being written in C#...

Do read!

Wednesday, July 25, 2007

Links round-up

The oldest post in my post cache that may be applicable...

I don't have time to blog about things in general for now, so I'll present you with a list of links I've gathered on my travels through the web...

Make mailto: links open Gmail (Ubuntu):
www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/

TortoiseSVN-like script for Nautilus (GNOME):
jasonfield.com/freebies/

A helpful article from Microsoft:
support.microsoft.com/kb/247804

A small computer running Xubuntu now on sale (did I already blog about this?):
www.linutop.com/

Flip, a novel programming language:
www.daimi.au.dk/~eriksoe/Flip/

Why Linux drives don't need defragmenting:
geekblog.oneandoneis2.org/index.php/2006/08/17/why_doesn_t_linux_need_defragmenting

Free web hosting:
www.110mb.com/

Free file hosting:
hostfile.org/

My Starred Slashdot articles:

Ubuntu Market Share:
linux.slashdot.org/article.pl?sid=07/07/11/1452257

GPLv3 & Microsoft:
linux.slashdot.org/article.pl?sid=07/07/06/1333257
slashdot.org/article.pl?sid=07/07/10/0030227

Written articles vs blog posts:
slashdot.org/article.pl?sid=07/07/09/2111255

Using the mouse in UIs:
hardware.slashdot.org/article.pl?sid=07/07/09/1232230

Spammers vs CAPTCHAs:
it.slashdot.org/article.pl?sid=07/07/09/0110203

OpenMoko phone on sale:
developers.slashdot.org/article.pl?sid=07/07/09/0049249

The world's first programmable robot?
hardware.slashdot.org/article.pl?sid=07/07/07/1924248

I think so, this time:
linux.slashdot.org/article.pl?sid=07/07/06/2119243

History of the CD:
slashdot.org/article.pl?sid=07/07/04/2230245

Saturday, June 09, 2007

How to recover an Ubuntu/Linux PC

People often claim that Linux is more stable than Windows. Without hard statistics, this can't really be proven. One thing I do know however, is that when things go wrong it is much easier to recover a Linux PC than a Windows one, without restarting. In this post I will explain what to do, in easy steps, to get your Linux back running as safely as possible.

1. Kill a single graphical application
If you know the problem is a single application that you have open that maybe just froze then it is simple to fix. Press Alt+F2 and type 'xkill' (without the quotes) then press enter. This runs the xkill program, and the next application that you click on will be forced to close. If you change your mind, press the right mouse button to exit from this mode.

It may be worth setting a keypress that will automatically start xkill when you need it. In Ubuntu/GNOME, go to System->Preferences->Keyboard Shortcuts

2. Restart the graphical interface
If you are still having problems, or the whole of the graphical interface is not responding, press Ctrl+Alt+Backspace. This will attempt to stop the graphical display, and then restart it. Any applications you had open will be killed.

3. Switch to a console to end the application
If this didn't work, or you know a certain program is causing the problem, you can kill that program without using the graphical interface. Press Ctrl+Alt+F1. If your PC is running, but slowly, this may take a minute. Eventually you should end up at a text login screen. Log in with your usual username and password, and wait for the prompt to appear.

If you know the name of the program causing the problems, type: killall <program name>. If it continues, you can try to force it to stop, with: killall -KILL <program name>. For system process you may get "Permission Denied" errors. Prefix the above commands with "sudo ", ie. sudo killall...

If you are not sure which program is making the PC unresponsive, use the 'top' command. It shows a list of running programs, and their name, and in the CPU column it shows how much of the computer's processor they are using up. Once you identify the application press 'q' to exit top, and use the commands above to kill the program.

If all is now working, Ctrl+Alt+F7 will switch back to the graphical interface.

4. Emergency reboot procedure
If the steps above all failed, there is one last way to reboot your computer, and it is much safer than pressing the reset button on your PC's case, or pulling out the power cable.

It is important that you type these key combinations in the correct order, allowing the PC some time to complete the command between each one. The SysRq key on your keyboard is often also labelled as "Print" or "Print Screen".

Ctrl+Alt+SysRq+R
Switches the keyboard mode.
Ctrl+Alt+SysRq+S
Writes all data to the disks, necessary to avoid data corruption, unsaved files will still be lost.
Ctrl+Alt+SysRq+E
Tries to end processes in a nice way. Allow a little bit of time before you use the next command.
Ctrl+Alt+SysRq+I
Tries to forcefully kill processes that have not closed.
Ctrl+Alt+SysRq+U
Temporarily makes the hard disks read-only, this makes it safe to reboot.
Ctrl+Alt+SysRq+B
Force reboot.

5. Surrender
If that didn't reboot your PC, press the reset switch, or pull the plug, and cross your fingers :)


If you have any other methods, tips, or feedback to share, post a comment and let me know!

Tuesday, May 22, 2007

The Linux shell, a new user's friend?

Paul made another post yesterday, about the merits of the Linux text shell, and whether it was an ideal interface for new Linux users to have to learn.

So, they say that Linux forces users to learn how to use the shell and that, basically, Linux can't do anything without it.
It is a common argument made by Windows advocates, that it is impossible to use Linux without using the shell. I am glad to say, this is just not true.

Everyone knows that Linux grew from a shell-only interface, X and GUI applications came (much) later. Over the years Linux gained an image of being the hacker's operating system. It is far easier to hack (NOT 'crack') than Windows is.

Linux is growing beyond that now. Distributions (yes, I am saying it again) such as Ubuntu are doing their best to keep the shell to only those people that want it, and not require the people who don't to use it. In reality it is perfectly possible to use an Ubuntu system without knowing anything about the shell. There are graphical applications for practically any task you need to perform. I believe a little more could be done (ie. a GUI way to run programs as root), but still we are practically there already. One problem is that Linux tutorials nearly always show only shell way of doing things. This is at least better than Windows where a long how-to like this ("Click this tab, tick that box, click ok, oh, and again, and again...") could usually be done in a single command that could be copied and pasted.
Are shells good or not?
Yes, yes they are. There is no doubting the power of the shell. It is pretty easy to get started, you don't have to be a computer expert either. Knowing how to use the shell can help you take advantage of certain features in Linux that make it better than other operating systems - the possibility to bring it back to life from practically any crashed state, without data loss, and nearly always without rebooting. (Perhaps a simple how-to on this topic is in order... :) )

ObsidianLake: Another quarrel with my good friend...

In Paul's recent post about whether Linux is ready for the desktop, he debates whether there is a demand for Linux, and asks:

"Should or will Linux become a commercial product?"

I think we should look at how Linux started out, where it is now, and where it is heading.

For a start, the Linux kernel was started with entirely different goals to the components that make up the rest of a GNU/Linux system. Linux was not begun with intention of being free (as in freedom). It was a personal project of Linus. For GNU on the other hand, the philosophy came first. Ten years ago there was little commercial worth in either of these ventures, only once they were combined into a usable system would things start to gain interest and momentum.

GNU/Linux in the present day is doing quite well. It has taken a long time, but it is now ready for the desktop. GNU/Linux is earning recognition from both hardware and software makers, and the number of users is snowballing. I have to say this is in no small way helped by Ubuntu and a couple of other easy to use distributions. It is important to note that all of the most popular ones are free. Now that Linux is comparable to Windows in practically every way, what else is there to compare on, except the price? This is why I believe that free distributions will always be the most popular. Commercial distributions have their place almost only in the enterprise market.

Into the future? GNU and Linux will remain free, and Microsoft will have no choice but to switch away from its reliance on Windows being the dominant OS if it is to survive. Windows was the first easy to use OS, and it brought the possibilities of computers to those who would otherwise never have had it. This is the only reason it is on 99% of PCs today. Now that GNU/Linux is a competitor, with the added advantage of being free, Microsoft have no choice but to re-think their business. Very soon Haiku is also going to raise the BeOS community from the (un)dead, and this will only stir the mix even more.

Concluding by returning to the original question, is Linux a commercial product? No, at least, not while we are talking about the home-user's desktop. Should it become commercial? Well, supposing it did, it would lose one of the best things it has to attract people on the OS centre-ground - its freedom.

Sunday, May 06, 2007

Versioning FIle System

I haven't tried it, but the idea is a good one. Every time you create, modify, or delete a file, Ext3Cow records the changed part of the file in a different place on the disk, preserving the old data that was in the file.

Using this system it is possible to find out what any file was like, at any given point in time. There is even a file manager that supports browsing ext3cow volumes.

There are many applications for this kind of file system, especially in places where revision control tools (CVS, SVN...) will not suffice.

OLPC and Microsoft

The OLPC project is hoped to bring computers, technology, and even the internet to those who currently have no access to it. Since the project began it has been known to have been intended to run a version of Linux. Despite recent rumours that OLPC had been persuaded otherwise by Microsoft, the OLPC is, and will remain, "a free and open-source shop.". Microsoft on the other hand have their own project to reach to the same user base as the OLPC - they will introduce a new $3 bundle of software (the BBC article linked to also draws parallels between the 2 projects).

Microsoft gives guidance on OS design

Some of you may have tried Windows Vista. It has a great new feature 'User Account Control', or UAC.

UAC allows users with administrative privileges to use the PC without the privileges enabled, until they are required. When a program requires the extra privileges, Windows pops up a dialog, describing what program is asking for administrative rights, and you must enter your password to continue. This is a great feature, and it makes using the computer for everyday tasks much more secure. For example, if your web browser was compromised, it would be limited in what damage it could cause, unless you had previously granted it administrative rights.

You may wonder why I am telling you this (you probably already know about UAC). However Microsoft have publicly said last week how great UAC in Vista is (though it hasn't stopped Apple making fun of it!). In fact they recommend that other operating systems should support it too!

"If you look at it from an architectural direction User Account Control is a great idea and strategically a direction that all operating systems and all technologies should be heading down," -- Peter Watson, Microsoft Australia's chief security advisor.


Chief security adviser? He must have used Linux, even briefly, at some time, right? This is a feature that Linux has had since the beginning, in the form of 'su' and 'sudo'. Before you think otherwise, no, Windows Vista was not even the first OS to bring it to the desktop! Here is a screenshot of Ubuntu:

Ubuntu 7.04 Released

I was originally posting a single, long post, of interesting news since I last posted. I decided to split it up though, so here goes...

Well, Ubuntu version 7.04 ('Feisty Fawn') has been released, and I'm running it :) Not too much has changed, except that this time I decided to opt for the standard Ubuntu, and not Xubuntu which I have been running up until now.

There is no particular reason for this. I still love Xubuntu, I'm just going for a change, that's all. Putting up with GNOME, too :) That said, I am not finding resource usage /that/ much higher than Xubuntu. I find that Xubuntu's interface is actually far more intuitive, and far more customisable - perhaps this is from being an ex-Windows user. However the GNOME interface wins in features, and it is well polished.

EDIT: I also forgot to add that the next version has been announced too, and it will be 7.10 'Gutsy Gibbon'!

Dell will offer Ubuntu


Dell are set to offer Ubuntu pre-installed on their consumer PCs. This news comes not long after Michael Dell was discovered to be running Ubuntu 7.04 (which was still a release candidate at the time) on his laptop. This is a huge step forward for Ubuntu, and desktop Linux. Perhaps the age-old argument "Is Linux ready for the desktop?" finally ends here...

Linutop


A small, power-efficient, inexpensive computer/device, that runs not only Linux, or even Ubuntu, but... Xubuntu! Linutop has many possibilities, especially with being so portable. Media streaming (if the CPU proves able), it is also a handy as just a portable PC. It has no internal storage, but comes with a 1GB USB key containing the OS and software. It has ethernet, USB and audio ports, and of course connects to an external monitor.

Monday, November 13, 2006

Six reasons to use Xfce

I saw this blog post by Paul-Sebastian, and I just had to post this about my favourite DM for Linux.

1) Speed
Xfce is lightweight and fast. It is not bloated by little-used features and options. Yet, when the need arises, there are plenty of plugins available... including support for GNOME panel applets! At the same time, Xfce can run on computers that would grind if GNOME or KDE were loaded.

2) Stability
Xfce is stable, development may not be as fast as some other DE's, but this is paid off for by the end stability.

3) Standards
Xfce aims to be fully compliant with freedesktop.org specifications, meaning it will work flawlessly with other applications that do the same.

4) Usability
Xfce is a very intuitive interface. It is not hard to locate settings, or customise the panels. I found it by far the easiest to use for users moving from Windows.

5) Applications
Xfce comes with a minimal set of applications, like the file manager Thunar. Thunar is a very fast, simple file manager, and also very customisable.

6) Good looks
Xfce comes with *loads* of themes, that, once applied, work with all GTK2 applications on your system - giving a very consistent UI throughout.
Xfce also supports the X composite extension, on graphics cards that support it.

7) Mice
The mice want it!

(Couldn't resist #7 :D)

PS. Don't just take my word for it... Xfce on ArchWiki

Saturday, October 28, 2006

Life on Edgy

It looks the same, it feels the same... well, the login screen is updated, and the boot splash. I wish I had recorded my boot time running Dapper, but I timed Edgy at 29 seconds from the boot menu to the login prompt. Not bad. It then takes 7 seconds for my desktop to appear after I login.

I found that Edgy now comes with a generic kernel, ie. it supports SMP, but SMP is automatically disabled when the processor does not support it. This means new installations automatically make the most of the CPU they are installed on.

I found, to my surprise (hough I have to admit I was hoping for it) that my ATI Radeon now works, with hardware acceleration, and OpenGL. Graphics now feel a lot faster than they used to, and a whole load of programs and screensavers that refused to run now move like lightning.

It meant I could afford some customisations, so here is my chance to show them off.





Yep, reminds me of Vista too. Only thing is, it runs faster :)

My windows are no longer inflexible rectangles. When I drag them, they bend, and wobble when I let them go. It had my 4 year-old brother laughing like you've never seen.

Letting go of a window also causes ripples to spread across the desktop:



and my four virtual desktops are accessed by choosing a side if a rotatable cube (yes, that is TuxRacer you see :P):



I plan on writing a how-to for this, and post it the Ubuntu forums or wiki. Currently there doesn't exist one for Xubuntu/Xfce, as it takes some hacking. It's well worth it though :P

EDIT: I just noticed the distortion in some of the images. That's not how it looks, but the tool I used to take screenshots. Use your imagination to know what it looks like really :)