OK so dd-wrt's builtin Dyndns.org updater somehow gave in. Tried changing it to opendns, played around with settings etc → no avail.
Now, it's technically possible to just update dyndns every minute. But that will definately break the update policy and I'll be banned. So I made this little script that I put on a machine in the internal network:
cat update-dyndns.sh
#!/bin/sh
# Arno's update-dns-script, run by cron every 1 min
# Get current ROUTER IP
ROUTERIP=`wget -q -O - http://router|grep "IP: "|sed 's/<[^>]*>//g'|sed 's/.*IP..//'`
CMNIP=`ping -c 1 -w 1 <myhostname>|grep PING |sed 's/^.*(//'|sed 's/).*//'`
# echo $ROUTERIP
# echo $CMNIP
if [ "$ROUTERIP" = "$CMNIP" ]; then
# echo IPs are the same
# don't do anything :)
echo "Last DDNS check at " `date` > /root/dnsupdate.txt
else
# echo IPs differ
# echo We need to update it
#update now
wget -q -O - "https://<user>:<password>@members.dyndns.org/nic/update?hostname=<myhostname>" >/dev/null
echo "Last DDNS update at" `date` > /root/dnsupdate.txt
fi
And to make sure it's run every minute, "crontab -e" and insert:
* * * * * /root/update-dyndns.sh
That was it :) Didn't bother removing the debug/explanatory comments ;)
tixe's
Thursday, 23 May 2013
Friday, 3 May 2013
centOS annoyances
OK after some time using centOS I have three things to rant about:
- Can't find a good photo management program. For now I use shotwell in mint in a VirtualBox machine and over sshfs. Somewhat slow.
- Something's up with gpg-agent and/or Enigmail and/or Thunderbird in centOS. Wherever I start up Thunderbird, I can send a digitally signed email WITH ATTACHMENT only and exactly ONCE. After that, every intent of sending my next digitally-signed mail with an attachment fails with "GPG returned an unknown error". Great. Sending signed mail without attachments works ok.
- Dropbox works (yum install dropbox), but for some reason stops working on reboot →? Some error message saying <somefilename>.zip doesn't exist →? "yum remove dropbox; yum install dropbox" fixes it, but it's kind of awkward...
- Can't find a good photo management program. For now I use shotwell in mint in a VirtualBox machine and over sshfs. Somewhat slow.
- Something's up with gpg-agent and/or Enigmail and/or Thunderbird in centOS. Wherever I start up Thunderbird, I can send a digitally signed email WITH ATTACHMENT only and exactly ONCE. After that, every intent of sending my next digitally-signed mail with an attachment fails with "GPG returned an unknown error". Great. Sending signed mail without attachments works ok.
- Dropbox works (yum install dropbox), but for some reason stops working on reboot →? Some error message saying <somefilename>.zip doesn't exist →? "yum remove dropbox; yum install dropbox" fixes it, but it's kind of awkward...
Monday, 25 March 2013
yum downgrade
OK Found a nice yum command: downgrade.
Doesn't sound very useful, but it solved some of my trouble here:
…blablabla…
Doesn't sound very useful, but it solved some of my trouble here:
…blablabla…
--> Finished Dependency Resolution
Error: Package: openssh-clients-5.3p1-81.el6_3.x86_64 (updates)
Requires: openssh = 5.3p1-81.el6_3
Installed: openssh-5.3p1-84.1.el6.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
openssh = 5.3p1-84.1.el6
Available: openssh-5.3p1-81.el6.x86_64 (base)
openssh = 5.3p1-81.el6
Available: openssh-5.3p1-81.el6_3.x86_64 (updates)
openssh = 5.3p1-81.el6_3
The text "Available: <package+version>" means the package can be installed, but yum doesn't want to, since it's not the latest version (-81). Latest version is already installed (-84).
Luckily it's easy to revert to the previous version when a package depends on that.
Just yum downgrade openssh-5.3p1-81.el6.x86_64
yum then understands it's actually your meaning to install a not-newest package :D
Wednesday, 20 March 2013
Opengazer for cerebral palsy
The son of one of my friends appears to have cerebral palsy. That means no motion control. Except for maybe his eyes. He's 10 and never was able to communicate.
For now, this is my plan:
Connect an eye mouse (opengazer) to dasher or something similar.
A Tobii device would be great, but costs $×n, so just for checking if my little friend can use it, it's definately overkill. Could be we could fund it in the future, if applicable.
For now, I got dasher to speak spanish via espeak :
Now, building opengazer (on linux mint 14) I ran into a few problems:
1 VXL libraries. Now, the docs suggest these MUST be installed from source. It kind of works anyway here.
Solution: apt-get install libvxl1.14 libvxl1-dev
2 Make errors
change PointTracker.h (thanks to http://ubuntuforums.org/showthread.php?t=2041502):
from:
class TrackingException: public exception {};
to
class TrackingException: public std::exception {};
3 Linking errors - change Makefile (thanks to https://github.com/opengazer/OpenGazer/issues/1):
# the object must come BEFORE linking
Originally the %.o rule is as below:
g++ -c $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(INCLUDES) $<
I had to change the order to make it look like:
g++ -c -o $@ $(INCLUDES) $< `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(CPPFLAGS)
Also the opengazer rule was:
g++ $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs` $(LINKER) $^
And I modified it to be:
g++ -o $@ $^ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs` $(LINKER) $(CPPFLAGS)
4 Change Makefile to be aware of the VXL libs:
from:
VXLDIR = /opt
to:
VXLDIR = /usr
# due to .h files loated in /usr/include/vxl/core/
----------
make
and it kind of works. "Kind of", because I can't hold my head entirely still :D
For now, this is my plan:
Connect an eye mouse (opengazer) to dasher or something similar.
A Tobii device would be great, but costs $×n, so just for checking if my little friend can use it, it's definately overkill. Could be we could fund it in the future, if applicable.
For now, I got dasher to speak spanish via espeak :
- In one terminal, start "espeak -v es-la".
- In another, start "dasher --appstyle=direct"
- Focus on the first terminal (little seems to happen: dasher keeps grabbing focus)
- Start using dasher to make up words. Espeak will speak it when you hit a paragraph mark ¶ (technical details: espeak reads line by line).
Now, building opengazer (on linux mint 14) I ran into a few problems:
1 VXL libraries. Now, the docs suggest these MUST be installed from source. It kind of works anyway here.
Solution: apt-get install libvxl1.14 libvxl1-dev
2 Make errors
change PointTracker.h (thanks to http://ubuntuforums.org/showthread.php?t=2041502):
from:
class TrackingException: public exception {};
to
class TrackingException: public std::exception {};
3 Linking errors - change Makefile (thanks to https://github.com/opengazer/OpenGazer/issues/1):
# the object must come BEFORE linking
Originally the %.o rule is as below:
g++ -c $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(INCLUDES) $<
I had to change the order to make it look like:
g++ -c -o $@ $(INCLUDES) $< `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(CPPFLAGS)
Also the opengazer rule was:
g++ $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs` $(LINKER) $^
And I modified it to be:
g++ -o $@ $^ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs` $(LINKER) $(CPPFLAGS)
4 Change Makefile to be aware of the VXL libs:
from:
VXLDIR = /opt
to:
VXLDIR = /usr
# due to .h files loated in /usr/include/vxl/core/
----------
make
and it kind of works. "Kind of", because I can't hold my head entirely still :D
I like dvorak. But I like my custom dvorak layout even better. So how do I add that to the gnome desktop in centOS?
In Linux mint I used a hacked "no" symbols file, available in my xkb folder on google drive.
Turned out this was an easy one. Download and:
# cp no /usr/share/X11/xkb/symbols/
and then add the layout with the keyboard layout manager (Norwegian → Dvorak).
Bob's my uncle. I can write spanish, french and math as easy as before :D
Monday, 18 March 2013
clementine on centos 6.3
Hmm clementine didn't work out-of-the-box
The correct solution is here: http://pkgs.org/centos-6-rhel-6/nux-dextop-i386/clementine-1.0.1-5.el6.nux.i686.rpm.htmland consist in this:
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/i386/
yum install clementine
Now, after that I ran into gstreamer trouble. It's related to gstreamer-plugins-bad not using latest libvpx. To fix:
yum remove libvpx
rpm -ivh ftp://ftp.pbone.net/mirror/atrpms.net/el6.3-x86_64/atrpms/stable/libvpx-0.9.7.1-1_1.el6.x86_64.rpm
yum install gstreamer-plugins-bad
(note that my machine is 64bit. Could be you need to adjust that link)
apt-get? yum.
Being used to apt-get (network-auto-install) and dpkg (install downloaded packages) in linux mint, I found counterparts in centOS:
yum install <something> - installs a package and its dependencies. Can use -y to skip the "install? y/n", but that isn't always a good idea, for example I once uninstalled X and gnome automagically this way.
yum whatprovides <some missing system file> - Looks for packages that provide a specific file; for example I found that "yum whatprovides libQtGui.so.4" was in qt-x11, needed for VirtualBox to run.
rpm -e <something> - remove an installed program.
apt-get = yum
dpkg = rpm
Some useful yum commands:
yum search <something> - searches for a package. Can use partial name, and it's case insensitive.yum install <something> - installs a package and its dependencies. Can use -y to skip the "install? y/n", but that isn't always a good idea, for example I once uninstalled X and gnome automagically this way.
yum whatprovides <some missing system file> - Looks for packages that provide a specific file; for example I found that "yum whatprovides libQtGui.so.4" was in qt-x11, needed for VirtualBox to run.
Some useful rpm commands:
rpm -ivh <something> - install an rpm package.rpm -e <something> - remove an installed program.
A NOT so useful rpm command:
rpm --force <something> - force the install of some package. This made me suffer a lot, uninstall X & gnome, causing incompatibilities and broke yum. Time to repeat an advice given on irc: "Don't use --force. Yum doesn't have that function, and for a reason."
Subscribe to:
Posts (Atom)