interesting: launchpad recipes for merging branch updates into PPA’s
OK, this sounds very cool ; still in development:
http://how-bazaar.blogspot.com/
What does this really mean?
Lets say you want to have a daily build of a project, like gwibber. You would then create a recipe that uses trunk as a base branch, merge in the packaging info, and say “Please build this every day into my PPA”. And Launchpad will.
Ubuntu 10.04, Lucid Lynx, Released
Lucid Lynx has arrived. The release day was yesterday, though I’ve been running several systems on 10.04 since the alpha stage. It’s well done. I don’t yet have a use for the social networking tools/toys (the gwibber app and indicator-me gnome package), but I’m not unhappy with them either. The server image has been robust so far, but I haven’t thrown too much at it. I’m thinking of putting the netbook edubuntu version (à la the system 76 starling edubook ) on my older laptop to see how that flies. Looks like fun.
Stanford folding@home and origami on Ubuntu
If you’d like an easy way to run folding to help the Folding@Home Stanford research project, even on a multicore system, ‘origami‘ may be a good soultion. I like it a lot.
It starts on boot-up automatically, can set folding to commence according to a schedule, allows project and stat checks from the command line, and even allows centrally administered group deployments (for example, to a lab full of machines). It does make laptops run pretty hot (as the CPU is engaged doing protein folding simulations), so I limit it to short bursts on laptops, but it can be a great tool to help in contributing to the folding project. You can also set origami to contribute to the TeamUbuntu folding project if you’re interested.
converting a pdf into html (one file to many method)
Here’s an Ubuntu (and other linux/Unix?) tip taken from ehow .
To convert a pdf into navigable html (with images intact), you can use pdftohtml:
E.g.,
pdftohtml -c originalfile.pdf newname_template.html
Converting a book-length pdf using this method gave me a directory full of files, with consecutively numbered html files representing the pages. Names were based on the ‘newname_template’ supplied, as were the png image files. Not the prettiest, but functional, and viewable on devices lacking native pdf-rendering capabilities.
linux/Unix tools for multiline grep
grep -A 2 SearchString
grep -B 3 SearchString
also,
pcregrep
pcregrep -M ‘a\nb’ files…
How to keep apache from autostarting on system boot for Debian or Ubuntu
An easy way to remove apache2 (or another system service) from the start up scripts in Debian or Ubuntu is to use the update-rc.d mechanism.
For instance:
# update-rc.d -f apache2 remove
The “-f” is required if you have existing scripts in /etc/init.d/apache2. If you are planning on manually starting apache, the “-f” is [barring heroic/quixotic effort to create alternatives] a requirement.
Otherwise, in this situation, you will see:
update-rc.d: /etc/init.d/apache2 exists during rc.d purge (use -f to force)
A good write-up is here:
http://www.debuntu.org/how-to-manage-services-with-update-rc.d
Ubuntu 9.10 (Karmic) Beta
Instead of ‘ do-release-upgrade ‘ as I did with my upgrade to 9.04 , going to the Beta of 9.10 I used
update-manager -d
No major problems. I did have to manually remove a couple of ppa entries from my /etc/apt/sources.list. Also, I changed from the generic ‘main server’ to a much, much faster (at the time) server. The easiest way to do this is via gui, as far as I know. Ubuntu will check for the fastest responding site if you use ‘System’ -> ‘Administration’ -> ‘Software Sources’ and ‘Select Best Server’,’ or use ‘Settings’ under the update-manager interface (‘settings’ is on the lower left) to get to the same place. I shaved off several hours from my package download by switching to a server that had some combination of proximity, light load, and high bandwidth. This involved a generous amount of luck, and probably the uneven demand associated with a pre-release version of the OS.
crontab editor (alternatives redux)
Well, my Debian server seems to think I should edit crontabs by with pico. So, the fix (as with Ubuntu) :
update-alternatives --set editor /usr/bin/vim.tiny
Is there a difference between “apt-get purge” vs. “apt-get remove –purge” ?
I was wondering this myself, as the two seemed to do the same thing. Google helpfully turned up a thread from ubuntu-users (Jan. ’09).
This post sums it up well (and accurately, I believe):
>Derek B. writes: >>Tommy T. wrote: >>> On Fri, Jan 23 [...] Pierre F. wrote:>>> hi,
>>> Is there any subtle difference between the 2 syntaxes?
>>> (I couldn’t find the answer in any documentation)
>>
>> Don’t they do different things?
>
>No.
un-ubuntuing visudo: how to make visudo use vi instead of nano
At some point, Ubuntu decided that it was best to have “visudo” — which refers to the vi editor by name — use the nano editor by default. If, like me, you are trying to edit the sudoers file, and you don’t want to use nano, or if you want to change visudo “back” to using vi (as intended), then read on. Note that this also will change your default editor to vi, or change the default to whatever editor you choose.
visudo takes its cue from the alternatives configuration system, which means it looks to /usr/bin/editor, which itself points to /etc/alternatives/editor.
The Ubuntu way to change the default editor (which will be used by visudo) then is to run
update-alternatives --config editor
That should go something like this:
laptop:~$ sudo update-alternatives --config editor
[sudo] password for obelix:
There are 6 alternatives which provide `editor'.
Selection Alternative
----------------------------------------------- 1 /usr/bin/vim.tiny
2 /bin/ed
3 /bin/nano
4 /usr/bin/vim.basic
*+ 5 /usr/bin/vim.gnome 6 /usr/bin/mcedit-debian
Press enter to keep the default[*], or type selection number: 1
Using '/usr/bin/vim.tiny' to provide 'editor'.
laptop:~$
Finally, here's what the filesystem structure looks like:
laptop:~$ ls -l /usr/bin/editor
lrwxrwxrwx 1 root root 24 2008-12-17 14:57 /usr/bin/editor -> /etc/alternatives/editor
laptop:~$ ls -l /etc/alternatives/editor
lrwxrwxrwx 1 root root 18 2009-04-23 17:32 /etc/alternatives/editor -> /usr/bin/vim.tiny
[sudo] password for :
There are 6 alternatives which provide `editor'.
Selection Alternative
-----------------------------------------------
1 /usr/bin/vim.tiny
2 /bin/ed
3 /bin/nano
4 /usr/bin/vim.basic
*+ 5 /usr/bin/vim.gnome
6 /usr/bin/mcedit-debian
Press enter to keep the default[*], or type selection number: 1
Using '/usr/bin/vim.tiny' to provide 'editor'.
laptop:~$
