Archive

Archive for the ‘linux’ Category

Geek alert – liking LXDE

December 12th, 2011 No comments

LXDE - Light X11 Desktop Environment

One of the things I love about Linux – is that I can change the look and feel to suit my needs by changing the desktop environment completely. Windows and Mac have no counterpart so most of you will have no idea what I’m talking about. Sure you can change themes and get your desktop to look pretty different – but it’s essentially the same. On Linux – the GUI is a completely separate component. Most Linux distributions come with some flavor of Gnome or KDE. Both are very capable, full featured, and require a pretty modern system to run well. I use several computers that range in age from 10 years old to brand new. The older ones are very sluggish running the whole hog Gnome/KDE experience so I run something more lightweight.

For years that was blackbox and its descendant fluxbox. Just recently I switched to LXDE – the Lightweight X11 Desktop Environment and I’m liking it. This is not a dig at *box. Fluxbox, blackbox, openbox really pop. They only use a few megabytes of memory – probably less than 10 and literally POP into existence when you login. LXDE is a bit more fancy, a bit slower to start, but still very easy on older hardware. It uses a LOT more memory then fluxbox but a lot less than Gnome. I’m enjoying the change for now and love the fact that I’m free to try new desktop environments. I’ve used fwm, fvwm, olwm, olvwm, mwm, twm, Window Maker, Enlightenment, Afterstep, blackbox, fluxbox, openbox, CDE, KDE, XFCE, Gnome, Unity and probably a bunch of others I’ve forgotten.

‘Tis well.

Categories: linux Tags:

Dumping Windows

November 25th, 2010 3 comments

Linux

Image courtesy of Metin Seven, Seven's Heaven

I’ve made some changes on the home computing front that some of my tech-leaning readers might be interested in. First of all, I hate Windows with the white-hot intensity of a million suns – just to put that baggage out there. I primarily use Linux – it’s totally free, not prone to viruses and has a ton of free software available. We had a Windows PC in the kitchen mostly for the family. The one thing I used it for was recording TV and editing video. Over the years this PC has gotten slower and slower and slower and no amount of defragging and virus scanning seemed to help. The last straw was when my web cam stopped working and re-installing the drivers broke my audio and TV functionality. I decided that I would just take my existing Linux machine and see if the family could live with it.

To be useful, the PC needs to do web browsing, email, record TV, edit video, run Skype(preferably with web cam), and edit audio.
.
The elephant in the room was recording TV. If Linux has a flaw it’s that some hardware can be difficult or impossible to get working. The vast majority of hardware just works but it can be painful if you have something that doesn’t. Some years ago a buddy gave me a Hauppage PVR-350 – TV Tuner card that was purported to work with Linux. Several years ago I threw it in my PC and spent an hour or so trying to get it working with no luck. At the time I didn’t have any burning need for it and just didn’t have the time. I took another crack at it and got it working with some effort – effort that was well worth it because it exposed me to MythTV.

MythTV
MythTV is an amazing application whose main purpose is to record and watch TV on your PC. It has the ability to schedule recordings – and so much more – it’s basically a full blown media center application. It can manage music, videos, audio, and has a web interface that allows you to control it from anywhere with a web browser. MythTV has a client/server model which means you install the server on the computer with a TV tuner card and can then access the TV and all your media from any PC via UPnP. For me this will mean accessing it from my laptop and probably plugging it into my TV. It has a ton of capabilities that I’m still exploring.

Skype
I’ve been using Skype for years. My wife uses it to do audio/video calls to her family in Europe and my kids use it to talk to their friends while gaming. Skype on Linux basically just works. Webcams can be tricky – you really have to make sure you get one that is well supported. I have such a webcam and even at that it took a little futzing to get it working – not much though. Requirement number two is totally satisfied.

Audio/Video editing
I’ve always done my audio editing on Linux with Audacity. Video editing was more tricky and it was only recently that I found something that I liked. To be sure, Linux has has very capable video editing applications for years – but none that appealed to me. Recently I found Kdenlive – in fact it was this application that really made me think of ditching Windows. I knew I could to TV recording and all the other stuff with some effort – it was video editing I was concerned with. This application is very simple to use – not unlike Windows Movie Maker – but way more capable. There are other even more capable video editors – such as Cinelerra.

Other

  • Web browsing – Firefox/Chrome
  • Email – Thunderbird
  • Office – OpenOffice
  • Music management – Rhythmbox/Amarok
  • Photo managment – Picasa, F-Spot
  • Image editing – Gimp

There are so many free applications for Linux that it would blow your mind.

Is Linux for you?
Linux would work just fine for most people. It is simple to update and install software. Linux is totally free – I can legally install it and use it anywhere I want. The user interface is intuitive and way more logical than Windows for my money. The difficulty would come with some hardware and most likely Googling or a friendly geek would get you through most problems. If you’re happy with Windows – stick with it and you have my sympathies. In my computing world, there is no fear of viruses. I click on any link or attachment I want with zero concern. With Windows the risk of infection is always in the back(or front of my mind).

Categories: linux Tags:

Linux software updates

August 6th, 2010 No comments

I’ve been posting recently about my problems with Windows and touting Linux. One of the main benefits of Linux is that updates are centrally controlled so that you get updates to the base operating system(Linux) and all the applications as well. This is in contrast to Windows which has one mechanism for keeping Windows itself up to date and applications such as web browsers and email clients are left to fend for themselves.
.
Once a week or so Linux automatically notifies me that updates are ready to install – like it did this morning. In this screenshot you can see updates to the very core of the OS – the kernel and a software development application – Eclipse. Press the button …. done.

Linux Ubuntu Update Manager

Linux Ubuntu Update Manager

Categories: linux, Windows sucks Tags:

Before you switch to Linux

July 30th, 2010 2 comments

Linux

Image courtesy of Metin Seven, Seven's Heaven

The topic of switching to Linux came up via comments on a recent post. Coincidentally I saw this article this morning titled “Warning: Five Things to Know Before Switching to Linux”.
.
I basically agree with most of the article’s tenets except for some nits with the section “5. Technical Skills Required”:

Linux requires a higher level of computer knowledge to make things work. That isn’t to say that ordinary users can’t use Linux, but to perform more advanced functions–such as setting up peripherals that aren’t plug-and-play or installing non-packaged software–you’ll need those higher level technical skills. Setting up Linux workstations is relatively simple, but Linux server services require a very skilled technical person to enable and configure them. If you’re the type that likes to tinker with computers, to learn new things, and to celebrate a victory when you’re successful, then Linux is for you.

If you have supported hardware I would maintain that setting up a Linux workstation is far easier than a Windows one. How many of you have installed Windows? I’d guess not many. If you have you’d know that after the install of the base operating system you don’t have much. You have to install drivers for every piece of hardware you have – printers, cameras, web cams, mp3 players, etc, etc – with many of the installs requiring a reboot. You don’t have any photo editing, music editing, or office suite. You have little more than a web browser(Internet Explorer), a simple text editor(Notepad), and a music/video player(Windows Media Player). When you install Linux – everything is there when you’re done. Install, one reboot, and you have a tremendous wealth of open source applications:

  • Office suites
  • Web browsers
  • Audio editors
  • Video editors
  • Software development tools(compilers, programming editors, IDE’s
  • Music players/management tools
  • IM clients
  • Internet telephony progrmas
  • Image editors
  • Photo management tools
  • The list goes on and on and on and on

It is very true that if your hardware is not supported out of the box, it can be difficult or impossible to make it work with Linux. If it is supported however, it will be as easy or easier to get it working than Windows. It is also true that if you are setting up a server, you will need some technical chops or a lot of perseverence – but setting up a server under Windows is no picnic either.
.
I think the article had a slightly more negative tone than I would have liked but I think it sums up moving to Linux nicely:


If you want stay with the familiar and comfortable pitfalls that you’re accustomed to, use Windows. Or, to really dumb down your computing environment, you can pay the extra money for Apple products. You can also choose to suffer a little pain, make a few exceptions, use Linux to power your desktops and servers and experience a new level of computing freedom.

Linux for kids
Once configured – Linux is easy to use. Here is an article titled “10 reasons why your kids should be using Linux”.

Categories: linux Tags:

Google and Sun

April 15th, 2010 15 comments

This CNET article discusses the decline and failure of Sun and success of Google based on this central idea:


It’s not as if Schwartz didn’t have the winning vision for the software industry: he largely shared Schmidt’s/Google’s vision of a mobile future with the cloud/Internet connecting all of the nodes.
.
Vision, however, is nothing without execution, and execution is accelerated or hampered by a company’s legacy. For Sun, this was exacerbated by its failure to ride the x86+Linux train.


I would disagree with this. I think Sun’s failure goes back further and gave birth to the child that ended up killing it – Linux.
.
Back when I was a just starting off in software engineering, our product line ran on Apollo’s DomainOS – a great operating system. It was dying out and we were porting to Sun’s Solaris operating system. I was new to Unix and soon developed an appreciation for this complex and powerful environment. Wanting to learn more, I started looking for a version of Unix to run on my home PC – so I could hack on it to my heart’s content without worrying about messing up one my company’s $15K workstations. First stop was Solaris x86 – a version of Solaris that could run on a home PC. As I recall, it was something like $300. Someone told me about Linux and I ordered a CD from TransAmeritech LinuxWare. It was cheap – certainly less thatn $50 and maybe down around $10 or $20 dollars.
.
After a minimum of fuss, I had it installed and I can still remember the first time my home PC booted up with it’s very own Unix-like system … Linux. I’ve been hooked ever since. It came with a compiler, several desktop environments, editors, games, and applications galore. In many ways it was far more usable as a desktop than my $15K Solaris machine. Sure the same applications were availabe but you had to download, compile, and install them yourself.
.
In 1991 when university student Linux Torvalds wanted a unix for his PC, he wrote Linux. Me and millions of other Unix users embraced it because of Sun’s failure to make a free version of Solaris available to home users. The opensource nature of Linux fostered a huge ecosystem that led to rapid development and better distributions and applications. Meanwhile Sun plodded along with their off-again on-again relationship with Solaris x86. Eventually Sun saw the light. They opensourced Solaris and started shipping GNU stalwarts like Perl and Gnome with the operating system — but it was too little to late. Us early Linux adopters were now sitting on top of a mature and totally free powerhouse. It ran on cheap hardware and we were in position to influence our companies to adopt Linux internally. I was one of people pushing to migrate a move to Linux within my company – which we did leaving Solaris behind.
.
That’s my story. Sun didn’t fail because they didn’t embrace Linux on x86 – they failed because they tried to keep all their technological marbles – creating an environment that encouraged Linux to thrive. Me and millions of others never would have touched Linux if Sun had a free or cheap version of Solaris or SunOS for our PC’s. It’s too bad. Sun hardware and OS are rock solid and crazy scalable. The company has been a good opensource citizen(OpenOffice, Mysql), innovative(Java, NFS, ZFX, Dtrace) and I’m sad to see them go.

Categories: linux Tags:

Convert wav to mp3 with Linux

March 28th, 2010 No comments

So I’m converting my wav recordings of last night’s gig to mp3. Here’s a simple bash command line to convert all wav files in a the current directory to 192k MP3 files. The power of the command line on Linux and Unix-like systems is phenomenal. GUI’s are great but some things are so much quicker and easier on the command line.

 for f in *.wav
> do
> new=`echo $f | sed s/wav/mp3/`
> lame -b 192 "$f"  MP3/"$f"
> done
Converting wav to mp3

Terminal showing wav to mp3 conversion

Categories: linux Tags:

Linux Mint 8 on Dell D600

February 8th, 2010 No comments

Linux Mint 8 - Helena

Linux Mint 8 Helena menu and welcome screeen

I’ve been playing around with several Linux distributions on my old Dell D600 laptop. Initially I threw Ubuntu 9.1(Karmic Koala) on it but had problems with the desktop freezing every time I started up an application. I got around that by putting on some alternate desktop environments that I’d been wanting to play around with including XFCE, Fluxbox, and IceWM. Shortly after getting it installed, the disk died so I figured I’d try out some other Ubuntu related distributions. I tried Kubuntu – a KDE based(versus Gnome) based distro. I tried out my old favorite Mepis Linux and last but not least Linux Mint 8 Helena. There are great reviews of Linux Mint out there. This is not one of them. This post is to help others with freezing issues related to Dell D600 laptops and Ubuntu-based distributions.
.
Linux Mint is also Ubuntu based but includes proprietary codecs and a highly customized theme that looks very different from Ubuntu. With Linux being an open source operating system, most distrubutions do not include any proprietary software. Most users will expend some effort to get support for playing mp3, windows media files, quicktime, and encrypted dvds. Mint includes all that.
.
My install had the same problems as most of the Ubuntu 9.1 based distros I’ve been trying lately – it froze. This freezing issue seems to be related to Compiz and probably the X driver for the laptop’s video card – an ATI Mobility Radeon 9000. Selecting the OEM install got me through the installation problem – but still had the freezing issue when starting all or most applications. That was solved by right clicking on the desktop and setting the desktop effects to “none”. You lose some of the spiffy effects on the desktop but actually get a more responsive desktop. The D600 is getting a little long in the tooth and doesn’t have the horsepower for overly flashy desktop effects.
.
Linux Mint has an interesting looking desktop – quite different from the Ubuntu and Redhat based distributions I usually run. My first impression is very positive – it is an attractive environment and feels very responsive. It will be getting a good workout here at home – particularly with the kids. They’ll be using it when the main computer (Windows XP) is occupied. My 8 year old was using it last night to watch a Star Wars/Clone Wars episode he missed and to browse for Star Wars Legos on Amazon. So much for Linux being too difficult to use.

Categories: linux Tags:

The oom-killer

May 31st, 2008 2 comments

This post is pure geek. You’ve been warned.


I came across an interesting gotcha in Linux 2.6 kernels that I’ve never seen before despite the fact that I’ve been running 2.6 kernels for a number of years.

It’s called the oom-killer. Bwahahaha…

I came across this when my virtual machine died while running a build. The /var/log/messages log showed:

May 30 00:02:33 localhost kernel: oom-killer: gfp_mask=0xd0May 30 00:02:36 localhost kernel: cpu 0 hot: low 32, high 96, batch 16May 30 00:02:36 localhost kernel: cpu 0 cold: low 0, high 32, batch 16May 30 00:02:36 localhost kernel: cpu 1 hot: low 32, high 96, batch 16May 30 00:02:36 localhost kernel: cpu 1 cold: low 0, high 32, batch 16May 30 00:02:36 localhost kernel: May 30 00:02:36 localhost kernel: Free pages:       35932kB (19712kB HighMem)May 30 00:02:39 localhost kernel: HighMem free:19712kB min:512kB low:1024kB high:1536kB active:1002148kB                                   inactive:1422792kB present:2488324kB pages_scanned:0                                   all_unreclaimable? noMay 30 00:02:39 localhost kernel: protections[]: 0 0 0May 30 00:02:40 localhost kernel: DMA: 1*4kB 3*8kB 4*16kB 2*32kB 3*64kB 3*128kB 2*256kB 0*512kB 1*1024kB                                   1*2048kB 2*4096kB = 12508kBMay 30 00:02:43 localhost kernel: Free swap:       4176688kBMay 30 00:02:44 localhost kernel: 851457 pages of RAMMay 30 00:02:44 localhost kernel: 622081 pages of HIGHMEMMay 30 00:02:44 localhost kernel: 8252 reserved pagesMay 30 00:02:44 localhost kernel: 748042 pages sharedMay 30 00:02:44 localhost kernel: 2173 pages swap cachedMay 30 00:02:44 localhost kernel: Out of Memory: Killed process 4300 (vmware-vmx

The oom-killer is the Out Of Memory killer and is described here:

By default, the Linux kernel is configured to never say no when application processes ask for more memory. The assumption is that the applications will not actually use all the memory they ask for–this is called overcommitting memory. Hotels and airlines do the same thing when accepting bookings: the assumption is that not everybody who makes a booking will actually turn up to take their room/flight.

However, every now and then, the assumption is wrong–you have an overbooking, and somebody has to get bumped. When Linux runs out of memory, it starts killing processes in order to free some up. Of course, the processes are chosen according to a heuristic (which is a technical term meaning “you can’t please everyone”), and so invariably the kernel is going to kill something you consider important, thereby leading to much wailing and gnashing of teeth.

There are a number of ways of stopping this:

  • Check for low memory exhaustion

    # egrep 'High|Low' /proc/meminfo

    # free -lm

    When low memory is exhausted, it doesn’t matter how much high memory is
    available, the oom-killer will begin whacking processes to keep the
    server alive.

  • upgrade to 64-bit linux(not an option for most)
  • If limited to 32-bit Linux, the best solution is to run the hugemem kernel. This kernel splits low/high memory differently, and in most cases should provide enough low memory to map high memory. In most cases this is an easy fix – simply install the hugemem kernel RPM & reboot.
  • If running the 32-bit hugemem kernel isn’t an option either, you can try setting /proc/sys/vm/lower_zone_protection to a value of 250 or more. This will cause the kernel to try to be more aggressive in defending the low zone from allocating memory that could potentially be allocated in the high memory zone. As far as I know, this option isn’t available until the 2.6.x kernel. Some experimentation to find the best setting for your environment will probably be necessary. You can check & set this value on the fly via:
        # cat /proc/sys/vm/lower_zone_protection    # echo "250" > /proc/sys/vm/lower_zone_protection

    To set this option on boot, add the following to /etc/sysctl.conf:

        vm.lower_zone_protection = 250
  • As a last-ditch effort, you can disable the oom-killer. This option can cause the server to hang, so use it with extreme caution (and at your own risk)!
        Check status of oom-killer:    # cat /proc/sys/vm/oom-kill
    
        Turn oom-killer off/on:    # echo "0" > /proc/sys/vm/oom-kill    # echo "1" > /proc/sys/vm/oom-kill
    
        To make this change take effect at boot time, add the following to /etc/sysctl.conf:    vm.oom-kill = 0

Categories: linux Tags:

Switch to our mobile site