Following my disagreement with sony, I managed to convince my brother that swapping my PS3 for his is a good idea, so now I have a PS3 running Debian, and the fun can start.
Of course the reason why I wanted this machine in the first place was to hack for it, so that's what I'm trying to do now. If only a split-brain processor was something that automake would understand...
How do I make automake understand that it needs to do this?
spu-gcc -o foo-spu foo-spu.c embedspu foo_spu foo-spu foo-spu.o gcc -c -o foo-ppu.o foo-ppu.c gcc -o foo foo-ppu.o foo-spu.o
I tried a Makefile.am like this:
bin_PROGRAMS = foo foo_SOURCES = foo-ppu.c foo-spu.c %-spu.obj: %-spu.c $(SPUGCC) $(SPUCCFLAGS) -o $@ $^ %-spu.o: %-spu.obj embedspu $(subst .,_,$<) $^ $@
... but that doesn't work, since automake inserts a more specific foo-spu.o target that uses $(CC). It only works if I then manually run 'make foo-spu.obj', before running 'make foo'. Obviously we don't want that.
Any help would be greatly appreciated.
Update: understood why some bits didn't work, and clarified here what the real problem was.
Which part of acpid is it that sends XF86Display key events to my X server? It's broken: when I suspend and then resume, it keeps sending those events over and over in an infinite loop; and since the script that I've hooked to that event takes an order of magnitude longer to run than the interval between said events, I'll just say that I find this highly annoying. I'm quite sure it's actually acpid that's sending them out, since the fix for this problem seems to be to call sudo /etc/init.d/acpid restart...
Occasionally, I don't think the ACPI daemon should be sending out these events at all (it seems to do so whenever I open or close my laptop's lid), but that's a different story...
Since a day or two, I've got myself a nice new monitor. It's positively huge, which makes it useful even alone.
There is, however, one little problem. When I call xrandr --output LVDS --right-of VGA, my laptop's display is situated at the top right of the monitor. This is not what I'm after; I'd much rather have it at the bottom right of the monitor, since
Hints as to how one should fix this are more than welcome.
Having used a powerbook as my primary machine for about four years, I'm not very up-to-date on Intel-specific hardware, such as ACPI, these days.
When at conferences or similar, I often see people who've configured their laptops so that acpid would start an alarm when the battery's almost flat. Now that I have an HP laptop again, which does ACPI, I'd like to do the same; but I can't seem to figure out how this is configured.
That is to say, when my laptop's battery is flat, it just switches off. No alarm. Needless to say, this is is rather annoying, and searching through the 56 files in /etc/acpi hasn't resulted in success so far.
Any hints would be greatly appreciated.
So my current Apple PowerBook is now 4 years old, and starting to show its age. Some parts of it have been replaced (keyboard, hard disk, bottom cover, and battery), and now it's starting to have issues again. It's not breaking down completely just yet, but seen its age, I might as well start looking for something new rather than having it fixed.
I bought this PowerBook because I wanted a laptop that did not have an Intel or AMD processor at its core, which at the time meant either apple or tadpole; since, however, tadpole is only for the rich and famous (seriously—well, perhaps being famous is not a requirement), and apple now also only has intel-based laptops, I guess I'm stuck with intel stuff. Besides, a 1.2Ghz SPARC is slower than my current 1.3Ghz PowerPC.
So, dear lazyweb, I'd appreciate any suggestions about good laptops. What 'good' means, in my eyes, is the following:
I guess the above list is quite long, and realize that my ideal laptop might just not exist; but hey, it never hurts to try, right?
If it does not come preloaded with Windows, that's a plus; but OTOH, wiping a hard disk is not hard.
I should also note that I'm not really interested in the low-price laptops that are available everywhere these days. Those usually have much lower performance, too small a screen, and other cutbacks that make the laptop be less than interesting for me. This is for work, not play.
In an effort to improve the performance of nbd-server, I wrote a patch to make it use some common sendfile() implementations (specifically, Linux- and FreeBSD-style sendfile calls). Unfortunately, however, when I test the Linux version (I haven't done tests with the FreeBSD version yet), the server outputs some garbage in fron of the actual data that it needs to send; as a result, obviously the client can't make heads or tails of it, and the connection is dropped.
However, when I run it inside gdb, everything is fine. When I call strace over the server, I don't see any obvious errors. I tried using the DODBG version of the server (see the code for details), but that didn't help me.
At this point, I'm pretty clueless as to what is going on. If anyone were to give me some hints or pointers, I would be eternally grateful.
Hello World,
When I have absolutely nothing useful to do (which has been quite a while ago now), I sometimes like to play with povray. Not that I'm very good at it—I'm a programmer, not an artist—but it still is good fun.
What I usually prefer doing is creating an animation. This is rather easy with povray; you can have it modify certain values in your scene based on some "clock" variable, and then generate a series of different frames based on that one scene description. This creates a large number of image files in the format that you specified (say, .png) in your output directory.
Of course a number of frames is not an animation yet. If you want that, you need to do some postprocessing on these images. ImageMagick to the rescue.
convert foo*.png foo.mpg
This works, but I don't like the low quality which the MPEG2 format gives me; and it also requires me to install the non-DFSG-free and slightly buggy MPEG2 reference implementation before it'll work. That's not very nice.
What I'd really like is for something similar that will work with Ogg Theora. So, dear lazyweb, is something like that even possible? This would preferably not require me to know too much about Ogg Theora, but just take a bunch of files and output a .ogg file—much like the above convert command line.
Thanks,
I'm looking for a scanner, with the following requirements:
The problem is that I know splat about scanners in Linux, except that
there is this thing called SANE
which sometimes seems to help
there. I even used it once or twice, but that's about it.
Any suggestions?
Is it possible, under Linux, to request a Kerberos ticket-granting ticket from one Kerberos realm without destroying your TGTs from another realm that are already in your credentials cache?
Otherwise, this happens:
Ticket cache: FILE:/tmp/krb5cc_2000_O5THYS Default principal: wouter@EXAMPLE.COM Valid starting Expires Service principal 10/02/07 19:29:53 10/03/07 05:29:53 krbtgt/EXAMPLE.COM@EXAMPLE.COM renew until 10/03/07 19:29:50 10/02/07 19:29:56 10/03/07 05:29:53 HTTP/exampleserver.example.com@ renew until 10/03/07 19:29:50 10/02/07 20:52:54 10/03/07 05:29:53 host/exampleserver.example.com@ renew until 10/03/07 19:29:50 Kerberos 4 ticket cache: /tmp/tkt2000 klist: You have no tickets cached wouter@country:~$ kinit wouter@GREP.BE Password for wouter@GREP.BE: wouter@country:~$ klist Ticket cache: FILE:/tmp/krb5cc_2000_O5THYS Default principal: wouter@GREP.BE Valid starting Expires Service principal 10/02/07 20:59:01 10/03/07 06:59:01 krbtgt/GREP.BE@GREP.BE renew until 10/03/07 20:58:57 Kerberos 4 ticket cache: /tmp/tkt2000 klist: You have no tickets cached
Note the complete absense of any reference to the first realm in the second klist output, which is annoying.
(Yes, I do know about the possibility to create trust paths between two realms; But I'm not going to give customers access to my personal mailserver...)
When learning some code I didn't know before, my usual way to get familiar with it is to first find some documentation or a kind spirit to help me understand the big picture, and then to run the code in a debugger or to do something like '/bin/sh -x', or some such, so that I can understand how it actually flows. That works pretty well with most software.
One of the things with which it does not work, however, is gcc's .md files. As far as I know, there are no debuggers for those files; and even though Simon helped me understand a few things about it at Debconf, I'm still not confident enough to just start editing stuff. Additionally, just randomly editing a 7k+ LOC file and expecting those edits to magically work is not something I consider very likely to succeed.
So, dear lazyweb: how does one debug gcc's .md files?
I'm currently setting up a drupal-based site. While it's working pretty well and has allowed me to get most things done that I needed doing, there's one remaining issue that would need resolving. I tried asking for suggestions on the drupal support mailniglist and on the #drupal-support channel on freenode, but I haven't received a solution thus far. Hopefully someone reading one of the planets I'm on knows the answer.
The site would need to be multilingual. That is to say, not just the interface, but also all static content and some of the nonstatic content would need to be translated in two (at first) languages (perhaps more will follow in the future).
Using the i18n drupal module, I have been able to create alternate-language versions of some nodes, and enable a language chooser, allowing a visitor to choose a different content language for the site and seeing the site translated. However, there is one issue that needs to be resolved: the menu.
The i18n.module does not create an alternate version of a translated node; rather, it creates a new node. This node then is linked to the original node by way of some extra table that the i18n.module installs. As such, both versions of the same content will have a different node number. To give a concrete example, the Dutch version of the "about" page on the site I'm creating is node/2, whereas the English version is node/10. Since you might want to review the English version of a node even if you request the site in Dutch, you do not unexpectedly get the Dutch version anyway if you request node/10.
Since the node number is part of the URL of the node, this makes it impossible to create a link to "the about node, in whatever language is appropriate".
The i18n module also comes with a "i18nmenu" module, which allows one to translate a menu item's description using gettext. This works, but it has one fatal flaw: it does not allow to change the target of the link. As a result, and given the above, it's impossible to create a menu item for "the about node in the current language, whatever that means".
In an effort trying to work around that issue, I've come up with a number of things. Unfortunately, none of them seem to work to satisfaction.
custom_url_rewrite function to change the
target of the URL alias depending on the value of the
$locale variable (which contains the current interface
language). Turns out that this breaks the language prefix (i18n.module
installs its own custom_url_rewrite function). Efforts to
change my function or the i18n version of that function to change in
such a way that both translations are done have failed; they seem to
confuse drupal in some way. This is possibly due to the fact that the
custom_url_rewrite function in i18n.module only performs one end of the
translation, while my needs require both ends; I don't know enough about
drupal to figure out how i18n's other side is implemented.At this point, I'm effectively out of ideas. If anyone has a solution (or can tell me why it isn't possible), I'll gladly hear it, either as a comment on my blog or by mail on w@uter.be.
OpenSSH maintains a file called "~/.ssh/known_hosts", where it stores the SSH keys of the hosts it's visited before in an attempt to avoid MITM-attacks. This is good.
However, I have a range of IP addresses on this network here that are used for ever-changing hosts; customer's machines that are at my office, and which I need to temporarily give a network connection in order to allow them to download stuff (and because typing in an xterm on my laptop rather than on a different keyboard and to a different monitor is just so much more convenient). Therefore, I know that these IP addresses will change from time to time. At this point, known_hosts is an annoyance. And since I never connect to those hosts except from machines that I trust and/or through routers that I trust, there's no advantage to be gained in having the protection that known_hosts offers, anyway.
So, dear lazyweb: is there a way to tell OpenSSH that when it tries to connect to host A, B, or C, that it does not need to store stuff in known_hosts, and that it should just assume the key is valid?
Update:StrictHostKeyChecking no and
UserKnownHostsFile /dev/null will do what I want. Obviously I
do want to set these options in a specific Host
stanza—i.e., not Host *.
Thanks, madduck!
I'm looking for a calendaring application with the following features:
optionally, as in,
it must have the feature, and it should allow me to decide whether to send the mail on a case-by-case basis, not as in
it would be nice if the feature existed.)
Suggestions are welcome.