There seems to be a known issue which affects my Samsung Galaxy S and other Android based phones. Sometimes you will discover that the wireless is disconnected and it hasn’t reconnected automatically. Then when you go to the wireless settings (via Applications > Settings > Wireless and network > Wif-Fi settings) you will see the words “Error” under the Wi-Fi. Tapping to re-enable the wireless will instantly reconnect.
After a brief amount of time searching I found a rather good explanation via MIT. It turns out that if you are running a mixed wireless network at home (i.e. providing B, G and N types at the same time) you could find your phone sometimes disconnects in this way.
Foruntately the page also points out a possible solution; Wi-Fi Fixer which is also available via Marketplace and I do recommend donations!
This has left a little tool running in the background that detects the loss of wireless and sorts it out.
My wireless is now reconnecting automatically; Perfect!
I was tasked to look at why a limit wasn’t being applied to a shell when using ssh. To let you understand lets have a look at what was being seen:
[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
1024
[user@test]$ cat /etc/security/limits.conf
* soft nofile 4096
* hard nofile 4096
However switching to the same user you will see:
[user@test]$ su - user
Password:
[user@test]$ ulimit -n
4096
That the limit isn’t respect when logging in via SSH but when we switch user it is applied.
The reason for this is rather simple; the SSH is opening a shell that isn’t a login shell and therefore limits is not being applied. To correct this simply edit your sshd_config file and set it to use login shells.
[root@test]$ grep -i uselogin /etc/ssh/sshd_config
#UseLogin no
You can see that the entry is set by default to no; so simply edit the line and alter it to yes:
[root@test]$ sed -i.bak 's/#UseLogin no/UseLogin yes/' /etc/ssh/sshd_config
[root@test]$ grep -i uselogin /etc/ssh/sshd_config
UseLogin yes
Now reload your sshd.
[root@test]$ /etc/init.d/sshd reload
/etc/init.d/sshd reload
Reloading sshd: [ OK ]
And test again:
[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
4096
That’s it! Sometimes odd behaviour like this can be difficult to track down without having a good read of configuration files.
One of my friends was having trouble filtering a mailing list today with GMail. Turns out he didn’t know that GMail makes it simple:
- Open on of the mailing list e-mail
- Expand the “Show Details” link.
- Click on the “Filter messages from this mailing list” link
That’s it instant filter, then you setup the label you wish and the actions. Just one more reason why I really love using GMail!
I have a old “BT Voyager 2100″ router and wanted to enable ping. It turned out that the setting was in a bit of an unusual place (at least I thought so).
Open the router web interface, normally http://192.168.1.1/
Advanced > System > Remote Access
Then tick the “Ping” checkbox and apply.
After this the box will respond to ping.
Whilst using Firefox I normally use the key press Ctrl+w to close the tabs, however on occasion my fingers strayed into Ctrl+q which, to my horror, quit Firefox!
A quick Google pointed me towards a post on the useful Add-On Mirrors site. I then went to the homepage of the author and installed the nice tool KeyConfig.
A quick restart of Firefox, then open KeyConfig (via Tools > KeyConfig), search for the Ctrl+q key press and disable.
Another restart of Firefox and it’s complete, no more accidental quits of Firefox! KeyConfig is a very nice and simple to use Add-On and will certainly be added to my default Firefox pack from now on, ace!