Latest Comments

Pothi

Als Antwort auf: Handle X-Forwarded-Proto in backend nginx

Pothi [Besucher]
Thanks for the tip, Daniel. It works!

@NIXin: In your way of doing it, I encountered an error regarding the duplicate variable "https". So, changing it in the following way works...

map $http_x_forwarded_proto $forwarded_https { default off; https on; }

fastcgi_param HTTPS $forwarded_https;

Daniel's method seems efficient when hosting multiple sites.
Felix

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Felix [Besucher]
Do you have any idea whether it's possible to use the "true" hybrid method and have the system power down after some time? That is, use it as an improved "suspend_hybrid"?
salman

Als Antwort auf: Ubuntu Stack Exchange opened for public beta

salman [Besucher]
I came here because of Ubuntu Planet! :)

Als Antwort auf: Ubuntu Stack Exchange opened for public beta

Daniel [Mitglied]
Yeah, the planet software uses the last modification time and I had edited tags and/or categories of some older posts.
Marius Gedminas

Als Antwort auf: Ubuntu Stack Exchange opened for public beta

Marius Gedminas [Besucher]
Apologies: I didn't notice the date on this post was from 2010. It showed up on Planet Ubuntu in 2014 through a time warp of some kind.
Marius Gedminas

Als Antwort auf: Ubuntu Stack Exchange opened for public beta

Marius Gedminas [Besucher]
Where does that leave askubuntu.com?
Matthias

Als Antwort auf: tqWorms reloaded

Matthias [Besucher]
Genial! Wir haben das Spiel stundenlang mit Freunden gezockt! Insbesondere die Namensdatei ist ein großer Schatz!!!
Morrie

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Morrie [Besucher]
@shaneonabike - Take a look at my answer to this question on SE. Some of the info referenced may help answer 2)... http://askubuntu.com/questions/219633/#305667

P.S Daniel - Catcha errors are displayed in new page. Prior to my installing https://addons.mozilla.org/en-us/firefox/addon/lazarus-form-recovery/ having to retype/c&p my comment would have made me rather annoyed. Please consider using AJAX for this functionality going forward.
shaneonabike

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

shaneonabike [Besucher]
Weird.... I seem to have two problems here...

1) The suspend option in the user menu doesn't work... 2) closing my lid puts it into "suspend" i think but it won't come back alive after that. If I invoke suspend from sudo pm-suspend it's happen and returns

Any ideas?
bo-what

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

bo-what [Besucher]
FYI -- in 12.04 I noticed that when hibernation is triggered (using PM_HIBERNATE_DELAY=XX), the resume/thaw the shell scripts do not unset the grub recordfail variable. Therefore grub does not autoboot -- timeout is set to -1 and it awaits user selection. I am guessing this requires some editing of scripts in /etc/pm/sleep.d/10_grub-common. Am a novice so I haven't dabbled to figure out the exact change unfortunately.

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Daniel [Mitglied]
@Mike: you need sudo probably to test for this. And the test with sudo returns "0" (no error).
Considering this "--suspend-hybrid" should be supported on your system.
Mike

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Mike [Besucher]
What is right? Doesn't work by me...

~$ sudo pm-is-supported --suspend-hybrid ; echo $?
0
~$ pm-is-supported --suspend-hybrid ; echo $?
1
FT

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

FT [Besucher]
Quote from pm-is-supported:

"--suspend-hybrid
Test whether hybrid-suspend is supported. Hybrid-suspend is the process where first the state of the system is saved to disk -- just like with hibernate -- but instead of
poweroff, the system goes in suspend state, which means it can wakeup quicker than for normal hibernation. The advantage over suspend is that you can resume even if you run out
of power. s2both is a hybrid-suspend implementation."
Otus

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Otus [Besucher]
This is not such a good idea when you need to carry the laptop with you: with RAM suspend you expect all the moving parts to be off until you restore, but this causes those to start moving after PM_HIBERNATE_DELAY.

Is there a way to suspend2both and then have the machine just turn off (without further HDD activity) after some time? That would seem to be the best of both worlds.

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Daniel [Mitglied]
@Gonzalo: the method I describe here is different from what you seem to expect: it will unconditionally hibernate to disk after the configured delay (defaulting to 15 minutes).

You may want to look at the s2both tool from the uswsusp package, which does what you want (from reading the man page): suspend to disk, but do not power off (but do suspend to RAM "forever").
Just install the "uswsusp" package and the default configuration of SLEEP_MODULE="auto" should pick it up (i.e. use it) automatically.
Gonzalo

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Gonzalo [Besucher]
Very usefull Daniel.
I am using it in my debian laptop.
But I have one question. As far as I now, hybrid suspend have the benefit that if you dont go out of power it resume like from suspend very fast...and If yo go out of power it acts like hibernate and you dont loose the data (http://mjg59.livejournal.com/100643.html). Isn't it?
So my question is:
Should I put the "PM_HIBERNATE_DELAY=xx" variable or it is not necesary and I wil not loose my data if I let the power off?.
Because the normal proccess for me is to close the lid, and forget the laptop one day or more and when i came back the battery is was out and the laptop is turned off.

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Daniel [Mitglied]
Yes, Patrick. But you have missed the equal sign after PM_HIBERNATE_DELAY.
I have fixed your comment and added the example to the blog post itself.
Also, you do not want to set this timeout only when using suspend-hybrid instead of suspend, but also when invoking suspend-hybrid directly. Therefore, it should not be in the "if" block.
Patrick Dickey

Als Antwort auf: Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

Patrick Dickey [Besucher]
So, in order to set a specific hibernate delay, you would add this code instead of the code mentioned in the article (under the sudo -e /etc/pm/config.d/00-use-suspend-hybrid command)


# Always use suspend_hybrid instead of suspend
if [ "$METHOD" = "suspend" ]; then
PM_HIBERNATE_DELAY=xx
METHOD=suspend_hybrid
fi

where, xx is the number of seconds that you want (for example "PM_HIBERNATE_DELAY=86400" for 24 hours)
Denis

Als Antwort auf: Track changes to /etc (configuration files) with etckeeper

Denis [Besucher]
By the way -- it's pretty nice to use the free DVCS hosting on bitbucket for storing this kind of repo. That's what I'm doing, using hg! Maybe etckeeper even wants to do a push after each package manager run if there's an upstream repo (is that the right term? new to dvcs) configured (as in: paths.default = <hosted.repo/path>). It might even be doing that already, I just haven't found out :)
Denis

Als Antwort auf: Track changes to /etc (configuration files) with etckeeper

Denis [Besucher]
awesome! Thanks for creating this, shame I'm only finding about this as I am about to mostly leave dedicated (ubuntu) servers behind and move on to the cloud... But I'm sure I'll still get a chance to use it here and there :) Keep it up!

Als Antwort auf: Handle X-Forwarded-Proto in backend nginx

Daniel [Mitglied]
The IfIsEvil wiki page considers "If" evil "when used in location context".
That's not what I am doing here (it is used in the "server" context).

Apart from that, the "map" solution suggested by NIXin should be preferred anyway though - I am quite sure to have it used somewhere already (and that it might not have existed back when I wrote this post).
Brandon Holtsclaw

Als Antwort auf: Handle X-Forwarded-Proto in backend nginx

Brandon Holtsclaw [Besucher]
Please don't use Ifs like that, or if you do don't advocate it to others.

http://wiki.nginx.org/IfIsEvil
TK

Als Antwort auf: ack-grep - a source-aware grep replacement (searching for content in files)

TK [Besucher]
IMO Jonathan is right: If ack-grep does the same thing as find / grep with given arguments, then ack-grep should instead be rewritten as a mere wrapper around find / grep to just provide better defaults. The mere need for better defaults does not justify writing a tool from scratch. That would be like a car company designing a new car from scratch because some users prefer different door handles. Two tools doing the same just means twice the maintenance effort for the community.

ack-grep is a waste of time compared to the imaginary alternative of having written such a mere lightweight easy-to-maintain grep wrapper which would have benefited the same users the same amount of time.

As to speed, for me, this
find . -name "*.[ch]*" ! -regex ".*[/]\..+[/]?.*" -print0 | xargs -0 -n1000 grep -IHn something
seems to often run faster than
ack-grep --cpp something
when searching in cpp files.

Same for dropping --cpp and -name "*.[ch]*". This on Ubuntu Lucid on a Core i7, measured using GNU time.
That command can be aliased, or wrapped by a small script in any scripting language to provide the ack options for language specific file extentions, without reinventing the wheel. (Note for me it often runs much faster when run twice, even with different keywords some caching going on somewhere, which is lost on ack).

As alias (put into your ~/.alias in Linux):
alias ag='find . ! -regex ".*[/]\..+[/]?.*" -print0 | xargs -0 -n1000 grep -IHn'

Also the command example I give does not hide unusual extentions that the user did not know were excluded from ack.

Also note the rather new parallel command for such optimisation on multi-cores: http://www.gnu.org/software/parallel/man.html#example__parallel_grep which can make the find / parallel/ grep combo much faster than ack (xargs does not do well for parallel output, see http://www.gnu.org/software/parallel/man.html#differences_between_xargs_and_gnu_parallel)

Als Antwort auf: HAL configuration for Kingsis Peripherals Evoluent VerticalMouse 3

Daniel [Mitglied]
@Boo: I recommend upgrading/installing the latest Ubuntu release (which is Oneiric currently).
Apart from that it's difficult to remotely debug this via blog comments; you are better of reporting a bug in Launchpad (use "ubuntu-bug" from a terminal) and/or asking in an Ubuntu forum for help.
Boo

Als Antwort auf: HAL configuration for Kingsis Peripherals Evoluent VerticalMouse 3

Boo [Besucher]
I have the precedent mouse model, ie evoluent verticalmouse 2. It stopped working when i upgraded to ubuntu natty 64 bits. Any insight ? Thx
Andy Lester

Als Antwort auf: ack-grep - a source-aware grep replacement (searching for content in files)

Andy Lester [Besucher]
Your assertion that ack is a "massive waste of time" is untrue. It's been very beneficial and has saved countless users countless hours of time.

The premise of "for no reason at all" is also untrue. You may not agree with the reasons, but the reasons do indeed exist.

Nobody says that grep can't recurse or colorize or skip directories. The difference is that ack does those things out of the box without having to customize it. For old Unix hands like us, that's not a problem. For others, it is.
Markus

Als Antwort auf: ack-grep - a source-aware grep replacement (searching for content in files)

Markus [Besucher]
Jonathan, you said it yourself, by default grep is not good enough. You need to know the magic arguments that do the right thing. Why should every single user go to fix the tool instead of picking one that works?
Andre

Als Antwort auf: Convert etckeeper repository from Bazaar to Git

Andre [Besucher]
I was having severe bzr performance issues on one of my servers with etckeeper.

Found that what was problematic was some dynamic files (one unmanaged logfile in particular) that was the real issue. Updating the .bzrignore and removed those files from the repository helped muchly.

I took the plunge and moved to git anyways, since after suffering much slowness, I'll take all the performance I can get.

Thanks for the export/import tip. My bzr2git.sh now looks like this:


#!/bin/sh
export GIT_DIR=/etc/.git

git init
bzr fast-export --export-marks=$GIT_DIR/bzr.mark /etc | git fast-import --export-marks=$GIT_DIR/git.mark

cp /etc/.bzrignore /etc/.gitignore
echo '.bzr/*' >> /etc/.gitignore

I follow up by doing an 'etckeeper commit' after updating the etckeeper.conf file.
Wallysson

Als Antwort auf: Easy DNS wildcard setup for local domains using dnsmasq

Wallysson [Besucher]
@Jeremy - Or how had same issue, access *.dev but can't access *.example.dev
to fix it, you just need to put 'ServerAlias *.dev' inside your virtual host, and everything should work properly... :)
Jonathan Hartley

Als Antwort auf: ack-grep - a source-aware grep replacement (searching for content in files)

Jonathan Hartley [Besucher]
I'm really puzzled why people prefer 'ack' over 'grep'. It doesn't seem to provide anything that grep doesn't. Of the listed 'reasons to prefer ack' on it's homepage, almost all of them are false or misleading or undesirable.

grep will also recurse into directories ('-r'), and it will highlight hits ('--color'). It will skip source control directories ('--exclude-dir=\.git')

ack is advertised to be faster, but it is only faster because it skips searching a bunch of files. If you configure grep to skip source control, as above, and skip binary files ('-I'), then ack is actually slower than grep.

It's true that grep needs configuring to make it behave the way you want. So instead of installing 'ack', create an executable on your path to select the default options you want grep to use. Mine looks like:

$ cat `which grp`
#!/usr/bin/env bash
grep -rI --color --exclude-dir=\.bzr --exclude-dir=\.git --exclude-dir=\.hg --exclude-dir=\.svn --exclude-dir=build --exclude-dir=dist --exclude=tags $*

I did this once in the 1980s, and grep has been fine for me ever since.

The whole 'ack' project is a massive waste of time - throwing away decades of bugfixes, optimisations, and a community of knowledge, for no reason at all.
F0RVM Tr0LL

Als Antwort auf: Selten dämlicher hax0r

F0RVM Tr0LL [Besucher]
Trolololololololol
mcgyver5

Als Antwort auf: Synchronize NoScript settings using Firefox Sync

mcgyver5 [Besucher]
God, that picture is off-putting! Love it.
ednong | blogs.ednong.de

Als Antwort auf: Marian - Only Our Hearts To Lose

ednong | blogs.ednong.de [Besucher]
Huh,
wo ist denn die Eingabe der URI für die Website geblieben?

Als Antwort auf: Marian - Only Our Hearts To Lose

claudia [Mitglied]
gefällt mir!
Paul Trotter

Als Antwort auf: TortoiseSVN/VCS GUI integration in jEdit

Paul Trotter [Besucher]
Hey, thanks a lot! I'm really flying in jEdit now!
Pascal

Als Antwort auf: Billiard/Pool Tricks

Pascal [Besucher]
Wir sind gerade dabei eine Online Billard Schule zu erstellen und brauchen noch Ideen. Infos findet man unter http://billard-tricks.com Danke und Liebe Grüsse
juju

Als Antwort auf: Synchronize NoScript settings using Firefox Sync

juju [Besucher]
This is no longer the best way to do this. Since noscript 2.1.0.1 it has been replaced by a setting in about:config
noscript.sync.enabled = true (change it to that)
SEO India

Als Antwort auf: 0x1d - l0l0r (atombrot remix) - And the greatest good you can do, is to bring back a new idea

SEO India [Besucher]
I fully agree with the article. A good idea always works.
Charles Burns

Als Antwort auf: HAL configuration for Kingsis Peripherals Evoluent VerticalMouse 3

Charles Burns [Besucher]
Terence, in addition to nealbirch's suggestion, you can use the devices name rather than its ID. That doesn't change. For example:

# xinput set-button-map "Kingsis Peripherals Evoluent VerticalMouse 3 " 1 2 2 4 5 6 7 3 8

(Notice the space at the end of the name -- that is significant)
Chrischie

Als Antwort auf: Radioaktiver Müll

Chrischie [Besucher]
Ich habe auch gerade zu Ökostrom gewechselt. Das beseitigt zwar nicht das Problem der Lagerung, aber wenigstens kommt demnächst kein neuer Müll mehr hinzu.. Ökostrom kann man übrigens auf http://www.oekostromanbieter.org/ vergleichen..
nealbirch

Als Antwort auf: HAL configuration for Kingsis Peripherals Evoluent VerticalMouse 3

nealbirch [Besucher]
I use a script that reads something like this:

#! /bin/bash
#mousebuttons.sh
mouseid=$(xinput --list --short |grep Evoluent |cut -d = -f 2 |cut -f 1)
xinput --set-button-map $mouseid 1 2 2 4 5 6 7 3
# end script

Als Antwort auf: Sexy sax man serenade (prank feat. Sergio Flores)

claudia [Mitglied]
wann fängst du an?

Als Antwort auf: Sexy sax man serenade (prank feat. Sergio Flores)

Daniel [Mitglied]
Ja, dachte auch daran Saxophon zu lernen.. ;)

Als Antwort auf: Sexy sax man serenade (prank feat. Sergio Flores)

Fueguito [Mitglied]
incredibly goooooood stuff! lange nicht mehr so gelacht! hehe .. nebenbei habe ich gerade noch mal drüber nach gedacht mir wieder ein saxophon zu holen nur um diesen song zu spielen!! geil!
Danilo

Als Antwort auf: OpenID for b2evolution

Danilo [Besucher]
I can't logon into my blog because it returns incorrect login or password.
I want to use that system to avoid people registering on my blog. It will work this way?

Thanks.
ednong

Als Antwort auf: Planet Debian Space Wallpaper

ednong [Besucher]
So sieht also Debian von ganz weit weg aus ;)
Wäre mir viel zu dunkel für ein wallpaper. Hell und freundlich muss das sein! :) Obwohl, so für spätabends vielleicht eine Alternative ...

Als Antwort auf: The Field

Daniel [Mitglied]
Wie schön, dass es Dir gefallen hat - und ich kannte sogar die Tipps von Dir schon.. :)

Der zweite ist allerdings bei YouTube stummgeschaltet worden..
Auf http://vimeo.com/10377992 ist er dafür dann übersteuert. Mehr vom letzteren auf http://www.johannesnyholm.se/videos.

Als Antwort auf: The Field

joschka [Mitglied]
Ja, wirklich super geile Videos. Vielleicht gefallen dir dann auch diese hier http://www.youtube.com/watch?v=617ANIA5Rqs bzw. http://www.youtube.com/watch?v=zUGyFYUlquo.. :)
NIXin

Als Antwort auf: Handle X-Forwarded-Proto in backend nginx

NIXin [Besucher]
Apparently, this is a nicer way of doing the same thing:

http {

map $http_x_forwarded_proto $https {
default off;
https on;
}

...
fastcgi_param HTTPS $https;

But for some reason neither work for me (I use it with PHP-FPM), and I still have to manually set $https "on"; in each SSL site in /etc/sites-enabled/site123.com

Als Antwort auf: This was 2010 - stay safe in 2011

claudia [Mitglied]
und danach zum flughafen.....
Seitenleiste