Tag Archives: linux
Ubuntu Launching Apps
As you start typing, it autocompletes and shows the icons of possible matches below – then you can click (or tab and arrow) to them, or keep typing until only the one you want remains. Very cute!
Colourful Tabs in Screen
Its really easy to do – using the .screenrc from my previous post – just replace all the M and m characters in the last line with the colour you’d like. I started off with something like this:
Y is for Yellow
replacing m with y and M with Y I get:
Green and Cyan
I’ve also used g/G and c/C codes for other servers, which looks something like this:
Titles
I seem to be keen on subtitles in blog posts, but I’ve not labelled many of my screen tabs in these examples (I have no idea why, I usually do). The yellow example has one where one of the tabs is named and this is really helpful once you get past about three tabs and start losing which one was tailing the apache logs! To label a tab in screen, go to that tab and then ctrl+a, shift+a and you are typing in the box. Enjoy :)
Screen for Linux
I use a custom .screenrc file, which adds numbered labels so show which screens I have open, so I see something like this at the bottom of my screen (click on it to make it normal size, the thumbnail is somehow tiny):
My .screenrc file looks like this:
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo xterm ti@:te@
shelltitle '$ |bash'
termcapinfo rxvt 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo rxvt ti@:te@
hardstatus on
hardstatus alwayslastline
hardstatus string "%{wk}%H%{Bk}|%{Mk}%?%-Lw%?%{km}[%n*%f %t]%?(%u)%?%{mk}%?%+Lw%? %=%{Bk}"
Don’t ask me what any of it does, I got it from someone else and just copy it around machines all the time! The tabs create themselves when you create a new screen (ctrl + a, c) and then you can edit the labels with ctrl + a, A. What else can you do with .screenrc? I must confess I’ve never really looked
rsnapshot flag for usb drive
This setting does have a gotcha, however. It does the check for whether the directory exists before it calls the script named in cmd_preexec – so if you were hoping to mount your drive in the pre-exec script, you can’t! I was very confused why my rsnapshot configuration didn’t work to start with. My workaround is to run a separate mount script before calling rsnapshot in a cron job, not ideal but it does work for me.
Acer Aspire One (and cosy)
The hardware isn’t the best in its class, but it isn’t the most expensive machine either. It has 512MB RAM, 8GB hard drive (solid state drive), it measures 8.9 inches and weighs just 971g.
The default OS for the linux version is something called “Linpus Lite”, which is a kind of toddler fedora as far as I can tell. I’m a long-term linux user and I found the locked-down-ness and the limited interface quite difficult to get started with. However with some help from this nice walkthrough plus some tips from the aspireoneuser.com forums I managed to get root access, turn on the xfce right-click menu and add a menu to the panel, install Opera and Skype and customise the main menu screens. Oh and have multiple desktops, which I like.
Its great for reading feeds, email, chat, and so on, and that’s probably all I’ll use it for. Since I often develop on a dev machine over vim + ssh, I might develop from this machine but I don’t think I’ll develop on it very often. I have already been tripped up by not having particular programs and not knowing what to use instead. Konqueror is leaving a big gap in my life, I do use it a lot. I haven’t done much with fedora before, I’m sure yum is great but it isn’t aptitude. Also the weird “the default user logs in automatically, needs no password, and has instant sudo rights” setup makes me twitch. We tried turning off the sudo rights but bits of the desktop stopped showing up so I’ve left that as is.
There are some definite disappointments. The multi card reader claims to read XD cards – this is a big selling point for me as I have reason to be on the road with camera and laptop soon and I have a fujipix camera which takes an XD card. Well, XD cards do not work with the acer aspire ones so far as I can tell. We’ve dug through the drivers and it looks like it just isn’t set up to do it at all. I’m logged a support email with Acer but no response just yet. I bought the machine through PC World which seems to reduce the amount of support Acer gives, which is a bit disappointing as I didn’t know that before I did it (nobody else seemed to have supply, and they are local if entirely unfriendly. I know I don’t look like a proper geeky business user, but that doesn’t mean you can ignore or patronise me). The wireless won’t resume if it was turned on and the machine hibernates, you have to turn off the wireless before you do that, which seems like a little niggle but when you have lots of tabs active and you have to reboot to get your connection back … its really annoying.
All in all, I would usually have waited for a second generation machine but this is cute, it seems pretty robust, and withouth being very expensive it does everything I need. And at less than 1 kg, I can actually carry it without getting shorter in the process, which is more than I can say for my laptop! There is online evidence of people successfully getting proper ubuntu installations onto these machines and I’m very tempted by that idea.
I have been busy installing the new toy, but I have also been busy making it a cosy!
Its canvas on the outside, microfibre cloth on the inside (its really shiny and gets fingerprint-y, its good to have the soft inside) and it has rigid panels (made from a plastic placemat that got too close to me while I was feeling inspired). I made two simple envelope-type bags, put them inside one another, and stitched the lining into the outer. The fastenings are sticky dots of velcro (which I shoudl have sewn in because it doesn’t stick well to fabric, oops), and the beads are ones I’ve had in my stash for … more than ten years, scarily enough. They were just waiting for this project! I made the case to be a loose fit, knowing that I’ll try to get A5 paper in there as well as the machine itself as its sort of a convenient size!
LugRadio Live UK
Vim Macro: cleaning up line endings
:% s/^M$//
To type the correct ^M character, you’ll need to press Ctrl + V followed by Ctrl + M (the first combination means “take the next combination literally).
To turn this into a macro you should do the following. In command mode, pressq, followed by any letter. This will be the shortcut to access the macro. Then type the command as above. Finally, press q again to stop recording and its done. You can use your macro by pressing @ and then the letter you chose.