Open Office Presenter Console
Friday, February 19. 2010
I've been having issues with the presenter console on both my ubuntu machines since upgrading to Karmic (9.10). One is a Thinkpad T400 running kubuntu and the other is an aspireone netbook running ubuntu netbook remix. Neither wanted had a working installation after upgrade and I couldn't get the plugin installed using the open office plugin manager.
I discovered that this plugin is now available through apitude - simply install the package openoffice.org-presenter-console and it should all work splendidly! I use the presenter console when I am speaking (which is quite often) to show the time and the upcoming slide, its a great tool.
I discovered that this plugin is now available through apitude - simply install the package openoffice.org-presenter-console and it should all work splendidly! I use the presenter console when I am speaking (which is quite often) to show the time and the upcoming slide, its a great tool.
Word Count
Monday, February 8. 2010
There's a little command line utility on *nix which I use a lot - it's wc or "word count". This is especially useful to because I live in a world where everything is plain text right up until I have to send it to someone else (and sometimes not even then). Despite its name, word count can count more than just words - it can do characters, words, lines and can tell you the length of the longest line while its at it.
The biggest problem with counting lines is remembering the name of the utility, since its called "word count" and not "line count". I tend to use this for doing things like piping grep to wc and counting the lines to give me an idea of how many occurrences of something there are. I also use it to count errors in weblogs or really anything else that I could do with summarising. The syntax is something like:
grep -R TODO * | wc -l
Using a count like this is especially good for things like auditing code, where I need to know how prevalent something is - or refactoring, where I'm looking for how many of a particular pattern are outstanding. Counting lines is also very compatible with my habit of making lists in text files.
This is the feature that the utility was originally designed for, and as you can imagine, its pretty good at that. As with most things, this blog post started life as a text file and when I got to this point I saved it and ran:
wc -w wc_article.txt
It outputs the number of words (272) and the name of the file, which is useful if you're giving it a pattern to match.
Its a really convenient and versatile little program; I use it often and I hope others will find it useful too.
Counting Lines
The biggest problem with counting lines is remembering the name of the utility, since its called "word count" and not "line count". I tend to use this for doing things like piping grep to wc and counting the lines to give me an idea of how many occurrences of something there are. I also use it to count errors in weblogs or really anything else that I could do with summarising. The syntax is something like:
grep -R TODO * | wc -l
Using a count like this is especially good for things like auditing code, where I need to know how prevalent something is - or refactoring, where I'm looking for how many of a particular pattern are outstanding. Counting lines is also very compatible with my habit of making lists in text files.
Counting Words
This is the feature that the utility was originally designed for, and as you can imagine, its pretty good at that. As with most things, this blog post started life as a text file and when I got to this point I saved it and ran:
wc -w wc_article.txt
It outputs the number of words (272) and the name of the file, which is useful if you're giving it a pattern to match.
Word Count
Its a really convenient and versatile little program; I use it often and I hope others will find it useful too.
Screen in Ubuntu Karmic
Friday, January 15. 2010
I have written about screen quite often, mostly including my .screenrc file and showing how to have named tabs for the various screen tabs you have open. When Ubuntu Jaunty came out, I found it had some quite cool enhancements that made the customisations for screen really easy by default - and I wrote about these.
In Karmic Koala, Ubuntu 9.10, the packages are still there but they've changed names! So if you want to use screen with Ubuntu Karmic or later, install packages byobu and byobu-extras, and uninstall screen-profiles and screen-profiles-extras (they were broken on my system after upgrade anyway) and you should find everything works as expected. To run screen with the new features, you should run "byobu" instead - although screen commands seem to work to detach and reattach the screens that result, weirdly.
I'm mostly posting about it because I have been very frustrated and there's no way I could have guessed, or probably ever will remember, what these packages are called. Apparently a byobu is a japanese room screen ... you learn something new every day!
In Karmic Koala, Ubuntu 9.10, the packages are still there but they've changed names! So if you want to use screen with Ubuntu Karmic or later, install packages byobu and byobu-extras, and uninstall screen-profiles and screen-profiles-extras (they were broken on my system after upgrade anyway) and you should find everything works as expected. To run screen with the new features, you should run "byobu" instead - although screen commands seem to work to detach and reattach the screens that result, weirdly.
I'm mostly posting about it because I have been very frustrated and there's no way I could have guessed, or probably ever will remember, what these packages are called. Apparently a byobu is a japanese room screen ... you learn something new every day!
Sound Issues with Kubuntu Karmic Koala
Tuesday, December 15. 2009
Since upgrading my work machine to karmic koala, I've noticed that my sound had stopped working. There were some broken packages in aptitude and Skype knew there was a problem as it notified me when I tried to make a call. I saw some issues reported with karmic, notably this one, so I uninstalled pulseaudio
sudo aptitude remove pulseaudio
When I restarted Skype, everything seemed to work as expected - for reference I have a thinkpad T400, if you're having the same issues, then hopefully this will help!
sudo aptitude remove pulseaudio
When I restarted Skype, everything seemed to work as expected - for reference I have a thinkpad T400, if you're having the same issues, then hopefully this will help!
Customising Screen-Profile Files
Tuesday, August 11. 2009
I wrote a while ago about the new version of screen in Ubuntu Jaunty. Screen is an application which lets you run lots of tabs inside one terminal window, then disconnect from screen and reconnect again later. You can turn on and off a whole bunch of notifications which appear inside screen, and I also added the pink tabs I used with older versions of screen.
The tabs line is the one in the profile file which starts "caption always".
caption always "%{wk}%H%{Bk}|%{Mk}%?%-Lw%?%{km}[%n*%f %t]%?(%u)%?%{mk}%?%+Lw%? %=%{Bk}"
I also altered the "hardstatus string" line, which holds lots of placeholders, to remove the clock - I run screen on my laptop inside KDE mostly, so I already know what time it is. Annoyingly this isn't customisable via the menus but I edited my profile file to get rid of it - here's the diff
29c29
< hardstatus string '%99`%{= kw} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`%Y-%m-%d %0c:%s'
---
> hardstatus string '%99`%{= kw} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`'
The only thing annoying me now is that screen seems to constantly redraw itself, so Konsole thinks there is activity in that screen, when there isn't. Suggestions on stopping this or more ways you can customise your screen file are gratefully received - just add a comment!
The tabs line is the one in the profile file which starts "caption always".
caption always "%{wk}%H%{Bk}|%{Mk}%?%-Lw%?%{km}[%n*%f %t]%?(%u)%?%{mk}%?%+Lw%? %=%{Bk}"
I also altered the "hardstatus string" line, which holds lots of placeholders, to remove the clock - I run screen on my laptop inside KDE mostly, so I already know what time it is. Annoyingly this isn't customisable via the menus but I edited my profile file to get rid of it - here's the diff
29c29
< hardstatus string '%99`%{= kw} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`%Y-%m-%d %0c:%s'
---
> hardstatus string '%99`%{= kw} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`'
The only thing annoying me now is that screen seems to constantly redraw itself, so Konsole thinks there is activity in that screen, when there isn't. Suggestions on stopping this or more ways you can customise your screen file are gratefully received - just add a comment!
Updating Memcached on Ubuntu Jaunty
Wednesday, June 17. 2009
I've been working with memcache-related things lately and ran into a problem where the library I was using just didn't seem to do what its documentation said it would. It turned out that it was making a "gets" call rather than a "get" call - and this functionality wasn't introduced to memcached until version 1.2.4. Closer inspection shows that although Ubuntu Jaunty Jackalope (9.04) is only a few months old, and memcached 1.2.4 is about 18 months old, its not included and Ubuntu versions Hardy, Intrepid and Jaunty all had 1.2.2 version of memcached.
Credit to the Ubuntu people for resolving this issue already - since memcached 1.2.8 is currently pencilled in for Karmic Koala release of Ubuntu later this year - but I can't wait that long so I updated my own memcached, it was pretty easy so here are the steps in case anyone else wants to do the same.
The final step is to get memcached running - I actually did aptitude remove memcached to get rid of my old version and stop myself from being confused later. Then to start it from command line I used:
/usr/local/bin/memcached -m 64 -p 11211 -u nobody -l 0.0.0.0
The above worked for me and allowed me to use the functionality available in the newer library (specifically I was looking to use the cas (compare and swap) functionality in the new PHP memcached extension) - it probably works on other distros too but I didn't test it, if it works for you or if you have anything to add then please leave a comment!
Credit to the Ubuntu people for resolving this issue already - since memcached 1.2.8 is currently pencilled in for Karmic Koala release of Ubuntu later this year - but I can't wait that long so I updated my own memcached, it was pretty easy so here are the steps in case anyone else wants to do the same.
- download memcached from http://www.danga.com/memcached/download.bml
- check you have the dependencies you need. The only thing I didn't have was the libraries for libevent, which you can install through aptitude with aptitude install libevent-dev
- compile as you usually would: configure/make/make install
The final step is to get memcached running - I actually did aptitude remove memcached to get rid of my old version and stop myself from being confused later. Then to start it from command line I used:
/usr/local/bin/memcached -m 64 -p 11211 -u nobody -l 0.0.0.0
The above worked for me and allowed me to use the functionality available in the newer library (specifically I was looking to use the cas (compare and swap) functionality in the new PHP memcached extension) - it probably works on other distros too but I didn't test it, if it works for you or if you have anything to add then please leave a comment!
(Page 1 of 4, totaling 20 entries)
» next page



Comments