Categories
Linux

Open large files in Vim with care

If you want to load a large file in Vim you should disable the swap file to speed things up. It’s simple to do as well:

Vim -n file.txt

If a file is over 4096K or so and I have enough system RAM (not usually a problem) I’ll do it this way as it avoids Vim creating a potentially huge .swp file.

Categories
Linux

Ubuntu: ALT TAB between browser windows?

I’m still using Ubuntu’s Unity desktop, which is saying a lot as I switched back to Gnome within a week or so of the previous release of Ubuntu.

One of the remaining bugbears I had with Unity was the window or task switcher. It was impossible to switch between Chrome browser windows. I had to click on the Chrome icon in the Unity sidebar and select the window I wanted. It felt like Ubuntu had tried to emulate what Windows 7 did with their taskbar, but Windows did it better because the window previews are close to the taskbar.

I’m not the only one to have this problem. You can either change window switcher in CCSM (oh oh, watch out when using CCSM!) or use ALT-`. That character is the tick character which normally sits above the TAB key on UK/English/US keyboards but may be elsewhere on other locales. I now need to get used to it like I did with Mac OS X.

Categories
Linux

Ubuntu 11.10: Be wary of Compiz Config Settings Manager (ccsm)

Have you recently installed Ubunty 11.10 and are you marvelling at the Unity Desktop? Not many are. Marvelling at the desktop that is, but it’s growing on me. I said that last time too so we’ll see how it goes.

Anyway, the point of this little rant is to tell you to avoid or be very careful with CCSM, or “Compiz Config Settings Manager” as it’s known to it’s enemies. This little app allows you to edit practically everything related to Compiz settings. Literally everything!

Unfortunately it can also lead to a world of pain. After fiddling around with it I went into the preferences and clicked on the “Plugins” link at which time my desktop froze and I couldn’t even CTRL-ALT to a different session. Forced reboot was the other of the day.

When I finally got back in my external monitor wasn’t detected and I was left with a 1024×768 display. I spent a few hours trying to figure out what the hell had gone wrong. I deleted .config/monitors.xml and tried editing it but nothing worked. Eventually I rebooted a few times and suddenly my monitor was recognised again!

Then it was on to the workspace switcher. It didn’t work the way it used to. I hesitantly fired up ccsm and dug into the settings in Viewport switcher, then in Rotate Cube, then Desktop Wall. It was then I discovered I couldn’t deselect “Desktop Cube”. ccsm would segfault every time. Switching workspaces using the cube was painful as my hardware just isn’t up to the task. Open windows would flicker slightly after I rotated the workspace. Eventually I discovered that I could take drastic action to restore normality. First I had to login as a different user and then go into my home directory and then move some configuration directories out of the way.

mkdir bak
mv .gconf .gconfd .gnome .gnome2 bak/

After logging in again I fired up ccsm and Desktop Cube was disabled! I usually switch between workspaces using CTRL 1-4 and I was able to configure Viewport Switcher to do just that with a minimal sliding animation.

After looking in the bak directory it appears that Compiz stores it’s configuration data in various compiz directories in .gconf/apps/. I suspect it’s enough to remove them rather than all the Gnome configuration files.

I like Ubuntu 11.10 so far, I’m getting used to Unity but the top menu bar feels to me like it’s crowding out the screen. The lack of Unity themes included is troubling too as there are only 4 (2 of which are for visually impaired users by the looks of things). I’ll have to go look for some more.

Categories
Linux

How open is Android?

The Android Wikipedia page is quite a read. I’m particularly taken with the research into how “open” it is (not really, compared to other projects) as I’ve never seen a commit log or discussion of patches for it.

Moreover, our findings suggest that Android would be successful regardless of whether it is an open source project or not, to the extent that the vast majority of developers working on the project (the platform itself) are actually Google employees.

The section on Linux is intriguing too. Linus Torvalds says that Android and Linux would come back to a common kernel but that presumes Google will open it’s development and “innovate” in the open. I’ll just leave this here to check back on in 5 years time..

Meanwhile, there’s the Replicant project, an effort to make a completely Free Software version of Android. They want to remove proprietary device drivers and discourage the use of Google Market. Their list of supported phones is limited but I was surprised to see the iPhone listed there!

I did wonder what the difference was between Replicant and CyanogenMod. Various posts I’ve read on the XDA forums have stated over and over again that the project was more interested in open source solutions rather than using proprietary software but this thread on LWN shines some light on the issue.

Found the official line:
“CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.”

So, they’re being realistic about their efforts. They’ll use proprietary software when necessary but they’ll work towards replacing that software. At the rate that handset hardware changes I applaud them for taking this pragmatic route. The only phone the Replicant project fully supports is the relatively ancient HTC Dream. Yes, open source drivers should be released by manufacturers but that won’t happen.

Android isn’t really that open in terms that an Open Source advocate would understand. The traditional public CSV or SVN repository and a daily changelog is nowhere to be seen. It’s definitely developed in a cathedral rather than a bazaar. Does it matter to the vast majority of its users? Probably not, but I for one am happy it is Open Source and the code is out there. Without the (admittedly late) release of source code it would be much more difficult to use other after-market firmwares on Android phones.

Categories
Linux

Hello Ubuntu 11.04

Today is the big day. A new release of Ubuntu Linux is out. Version 11.04 or “Natty Narwhal” is the first to ship with the Unity desktop and I’m very impressed! If you haven’t seen it yet, check out the Ubuntu website or this handy guide.

I like:

  • The auto hiding sidebar of icons. When a window is maximised it hides. Long click on an icon to move it around, and right click for a context dialog to remove it.
  • Control Center is 2 clicks away in the top right where there appears to be a light switch. That menu also has a lock screen item and various session controls.
  • Apps with multiple windows show a corresponding number of dots next to their icon on the sidebar. Click on the icon and you see all the windows of that application.
  • Application menus are in the top toolbar ala Mac OS. Some, like Chrome, aren’t however.
  • Long press Windows key and the sidebar icons are highlighted with numbers 0-9 to quick choose them.
  • Click the Ubuntu logo in the top left and you get a nice applications dispay.
  • Speedy alt-tab previews of each Window.
  • Left and right maximising of windows like in Windows 7. I think you need to drag it a bit further than in Windows 7 however, no bad thing. Full screen maximise on dragging a window to the top of the screen.
  • Painless upgrade from 10.10.

And what I didn’t like:

  • The window display for multi window apps requires you select a window. It’d be great if I could click the app icon again to return to the same window. ESC does the job though.
  • GIMP tear away menus are still broken, but this is likely an issue with GIMP. It was present in the last release of Ubuntu too and I just found a work around this evening.

    The menus you are looking for are no longer part of the drop-down menus, but rather part of a right-click menu visible when clicking on the canvas.

    I found using the space bar after clicking the menu option worked on torn off menus. This may be a bug.

  • The lack of formal application menus is off putting initially but it’s actually easy enough to find things with the new launcher.
  • I doubt I’ll ever like the thin scrollbar. There is a way to change that, must find out how.
  • Why does Ubuntu keep installing Evolution every time I upgrade? I’m fairly sure I uninstall that each and every time ..

In previous versions of Ubuntu I always felt the eye candy was there just to make things look pretty. With Unity they’re actually putting that graphical horsepower to good use. If you haven’t tried Ubuntu yet, give it a spin! You can even try it without installing anything simply by booting from the install disk (or usb drive) and opting for that. Check out the download page for further details.

Categories
C64 Linux

Every OS Sucks

I’m sure I’ve heard this before but the video is new to me. Enjoy!

Odd that their C64 isn’t plugged in. The power cable went in at the side. The joystick ports are strangely blacked out too. Gosh, might it not be a real Commodore 64? (via)

April 30th, 2021 – replaced the iframe video with a YouTube embed.

Categories
Linux

Suddenly the Dungeon collapses!! – You die…


Oh crap, I just killed my screen session.
Categories
Linux

Fill and span DVD archives with Discspan

I have a huge archive of photos. I shoot tens of thousands of photos every year. Storage requirements for all those photos was bad enough when I shot in Jpeg but then I switched to RAW and space usage jumped! Here’s what the last 3 years looks like:

169GB of data is a lot of stuff to store. Originally I had them all duplicated on two external drives but then I bought a 500GB internal drive for my laptop for speedier access. Unfortunately that drive simply wasn’t big enough. I need to convert some of my RAW files to Jpeg to save space. To preserve the original RAW files I want to archive them somewhere permanently. I have a DVD writer so that was an obvious choice.

Burning data to lots of DVDs is tiresome. You can use tar, zip or another archiver to split the data but then you have to run through all the DVDs to pick out a file to restore. I like having the files directly accessible but that means endless selecting files, making sure they’re as close to the DVD size as possible, burning them, moving on to the next bunch. In the bad old DOS days I had a program to fill floppy disks if you pointed it at a directory but I’ve spent years searching for a similar Linux script. Last week I found one.

Enter Discspan. My 2007 archive was already burned to DVD, and I wish I had this script while doing it. I’ve burned my 2008 archive with Discspan and it was a doddle. Point it at the right directory, feed it some details about the DVD drive and let it go. 26 DVDs later and my 2008 archive is safe on DVD!

The script scans the directory, figures out how many DVDs are required and it fills each DVD with data, spanning my digital archive over multiple DVDs.

Be aware when using it that you should let Linux detect the next blank DVD before pressing return. The first time I ran it the script bombed out when growisofs didn’t see media to write to. You also need to patch it because it doesn’t detect the right size of DVD+R’s but it’s a simple one-liner.

Another Linux project, Brasero promises to span disks too but it didn’t for me. It’s the default CD/DVD burner in Ubuntu now and it’s a shame this functionality is broken in it.

Hopefully Brasero will be fixed for the next release. I’d offer to help but my C/C++ is very rusty.

Categories
Linux

How to create Postfix database files

Every time I come to recreate the Postfix database file when I edit the file /etc/postfix/virtual.cf I forget what command I need to recreate virtual.cf.db

Hopefully I’ll check my blog next time. The command is postmap. Hope this is useful for someone else too!

postmap /etc/postfix/virtual.cf
/etc/init.d/postfix restart

Categories
Linux

Reasons to upgrade your Ubuntu

ubuntu.com is down unfortunately. The release of Ubuntu 9.10, Karmic Koala the latest version of Ubuntu Linux, is obviously driving a heck of a lot of traffic to the site. (I wonder if they use the equivalent of wp-super-cache?)

Anyway, I’ll be upgrading tomorrow probably and once I do I’ll be checking out some of the applications mentioned on this page. Everything from an alternative media player, the (as yet unreleased) Gnome 3.0, audio/video editing, a photo manager to the pretty sweet Electric Sheep screensaver are listed here.

Many of the apps are available for Ubuntu 9.04 but others require building manually. I’ll be busy over the weekend 🙂

Here’s a few of the eye catching screenshots from that page, just to whet your appetite!