neurotrigger

Author Archive

Nice irssi theme to fit with my fancy screen status bar

by mmnicolas on Nov.09, 2009, under gnu/linux

As another part of my basic setup, here is my irssi theme file:

default.theme.tar

And my precious key bindings, see this post to understand why it is from F7 to F10.

For this to work, just copy/paste this into your irssi:

(continue reading…)

Leave a Comment :, , , more...

Windows XP won’t re-activate after a “Windows Repair”

by mmnicolas on Nov.08, 2009, under windows

The common target for malware is often the web browser, preventing the user from getting help from outside. The thing is, that same piece of software is also used for the Windows activation process.

First it’s unbootable, it says some file is missing, you replace the file, some other file is missing, then you put in the windows cd and start the repair. Now it boots, time to re-activate windows, it just hangs because it can’t load internet explorer because it is all corrupted somehow. Believe me this happens frequently.

This is how you fix it and it’s reallty easy, the goal is to reinstall Internet Explorer, now you think “Safe Mode with networking support” but this mode isn’t accessible at this time. You will have to download it from another sane installation. Downloading IE8 from microsoft will do the trick, be sure it is the stand-alone installer that doesn’t require internet connection. Uncheck “Install updates” and you’re done.

Now reboot and pray that damn window will just pop up.

Leave a Comment :, , more...

GNU Screen scroll fix

by mmnicolas on Nov.08, 2009, under gnu/linux

The GNU Screen manual tells you that to use scrolling, you must first enter “Copy mode” with C-a [.

You can easily fix this and use regular PgUp/PgDn by simply adding a line to your ~/.screenrc. I really don’t know why this isn’t a default setting except that it seems to mess with Vim scrollback.

Here’s the line:

termcapinfo xterm ti@:te@

Enjoy.

Leave a Comment :, , more...

Rare file

by mmnicolas on Nov.01, 2009, under gnu/linux

There are times were i need to use old software, either to make old hardware work or to play with some other related software, such as SNES roms.

The problem with zsnes is that the devs doesn’t seems to care anymore, which is understandable. But what happens to people like me who runs a 64-bit OS ? Nothing. The zsnes team haven’t planned porting afaik.

BUT, somehow, someone made a package of zsnes with the old good 1.42 version when you were able to use the netplay, and the best of it, it runs on 64bit. It’s a 32bit binary but the package is preconfigured to use linux32 and it runs pretty fine.

Here it is.

Leave a Comment :, more...

Auto-reattaching terminal multiplexor with tabs

by mmnicolas on Oct.21, 2009, under gnu/linux

Typically, from a single ssh connection comes a single shell, let’s improve this situation.

We will use a terminal multiplexor GNU Screen, which provide multiple terminals. We will also implement a neat tab bar to allow naming/showing tabs and automatic session re-attachment capability.

Follow these steps to significantly enhance your distant shell experience, you will need to install screen and ssh, mutt and irssi are optional.

The first step involves using environment variables in order to detect if the login is locally originating or not. If the user is logging from a distant machine, we will reattach an existing detached screen session or create a new one.

When logging in remotely, the most evident distinction i’ve found between a local and remote shell is the environment variable SSH_CONNECTION=, with this var we have a way of detecting remote logins easily and launch something else accordingly.

(continue reading…)

2 Comments :, , , , more...

How to defeat Bell/Sympatico’s torrent throttling

by mmnicolas on Sep.07, 2009, under gnu/linux

As you might know Sympatico is using DPI (deep packet inspection) to apply throttle according to the data transmitted, despite of what you might have heard, changing the port is ineffective and buying a compatible router to flash it with the tomato firmware to be able to use mlppp (Multi-link point-to-point protocol) is unnecessary and expensive.

As long as they keep using the same methods, all you need to do is use a decent torrent client like Ktorrent who gives you these kinds of options:

[X] Use encrypted protocol
[ ] Allow unencrypted connections

I noticed that if you allow unencrypted connections it does not get any better, probably because they can catch a couple of torrent packets and spot the port then apply port throttling, otherwise it could be just another online game that runs on a random port.

There is one inconvenient to this method, not everybody uses decent torrent clients, so you lose the participation of some of them. While running it encrypted only, i connected to many Azureus, Transmission, libtorrent based, they should then contain such options.

2 Comments :, , , , more...

Useful and nice looking shell with GNU Screen

by mmnicolas on Jul.28, 2009, under gnu/linux

This is how i got my linux shell looking so wonderful, using GNU Screen of course and its famous ~/.screenrc configuration file.

Let’s create it and paste this into it:

#hardstatus string ” %wb%-w%wr%n %t%-%+w %=%D %d %M %y %c”
#hardstatus string “%r%c%k | %w% ? (%h)% ?”
#hardstatus string “%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]“
hardstatus string ‘%{= c}[ %{W}%H %{c}][%= %{= w}%?%-Lw%?%{c}(%{W}%n*%f%t%?(%u)%?%{c})%{w}%?%+Lw%?%?%= %{c}][%{W} %d/%m %{W}%c %{c}]‘

bindkey -k F1 prev
bindkey -k F2 next

screen -t irssi 1 irssi -c irc.freenode.net
screen -t mutt 2 mutt
screen -t monitor 0 lwatch -i /dev/xconsole

hardstatus alwaysignore hardstatus alwayslastline

The whole aesthetic thing reside in the first uncommented line, this is where it sets what is displayed in the hardstatus line which is always the last line. You can find documentation about the variables that can be used to display different types of information in the screen man page. ($ man screen).

As for the bindkey, you’ve guessed they bind keys to go forward and backward in your terminal tabs, and yes F1 means F11, don’t ask me why. I use F11 and F12 because i intend to use F9 and F10 in irssi to move between windows.

1 Comment :, , , , more...

Using fetchmail with gmail

by mmnicolas on Jul.28, 2009, under gnu/linux

Gmail requires a secured connection for authentication and for this we need a certificate, here’s how:

Verify the current certificate gmail is using with this command:

openssl s_client -connect smtp.gmail.com:995 -showcerts

Hit Ctrl-c to terminate the command once you got something like this:

—–BEGIN CERTIFICATE—–
MIIC3TCCAkagAwIBAgIDCDijMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMDI1MTc1MzE2WhcNMDkxMjI0MTg1MzE2
WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
TW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xFjAUBgNVBAMTDXBv
cC5nbWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAO03QxerFKZV
8yeomuL4zSl8Pr7hMWnKMMgp/CwhwadeBmL0LQHHbjL/6z/Z59ZQvrztqkwhchA2
APKzUwRVTyn7Shx6vBqk6oFmTqoOLmY6hbq6l8uVdUv0AfbHwio8CnLpK2+nbuFl
flPwx1DH0E3grD8+CrH5SmScfTWbDkcXAgMBAAGjga4wgaswDgYDVR0PAQH/BAQD
AgTwMB0GA1UdDgQWBBTJRG/OFpZt+BV43JM3NshHMjpwazA6BgNVHR8EMzAxMC+g
LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDAf
BgNVHSMEGDAWgBRI5mj5K9KylddH2CMgEE8zmJCf1DAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEAOKr3mhxtwFCS3J6lbeaf
3KrHKi935BZkI75sRbON+hog0t2ovcM2i7fxs3xneH8USLsHgfxNBj9tkMogMK/K
sO/NUVZ/IfyqcNNkp2619qTQXthKRH42JKpAKgNhT1bdno3pxn+eDEpqmU3CE7IP
HDCjWOK1fGkZ/yFAuTxuxAc=
—–END CERTIFICATE—–

(continue reading…)

Leave a Comment :, , , , , , more...

Setup postfix as a gmail relay

by mmnicolas on Jul.27, 2009, under gnu/linux

Here’s how to use postfix to send mail through gmail. Assuming you have postfix and libsasl2-modules installed, the rest should be automatically installed since it depends on it. First open your postfix main.cf file located at /etc/postfix/ (on debian).

Append this to the end:

relayhost= [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

smtp_destination_rate_delay = 60
relay_destination_rate_delay = 60

mailbox_command = /usr/bin/procmail -a $EXTENSION

(continue reading…)

Leave a Comment :, , , , , , more...

Keyboard layout configuration without desktop environments tools

by mmnicolas on Jul.27, 2009, under gnu/linux

My home file server used to be headless, but i thought it deserves a head even if it’s only a PIII 300mhz/256mb of ram, no video accel. So i installed a minimal Xorg server with openbox as a window manager. Then i remembered, maybe 10 years ago when i was using WindowMaker and/or Blackbox i had to fiddle with xmodmaps and xkeycaps to get french accents working. Now i realize there is a much more simpler way to do it through the Xorg config file /etc/X11/xorg.conf.

Section “InputDevice” Identifier “keyboard”
Option “XkbRules” “xorg”
Option “XkbLayout” “ca”
Option “XkbVariant” “fr”
EndSection

Just modify your keyboard section with the above Xkb options.

And there you are, with a french canadian keyboard layout! Now i can watch pictures with french accents in the filename…

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Visit my idols!

Those who gave us tools to play with...

    Archives

    All entries, chronologically...