Advance Configuration and Power Interface (ACPI) or APM ( Advance Power Management ) support for Ubuntu 10.04 was not installed by default after server installation. I needed this so that during power outage I can just press the power button to automatically shutdown the PC.
sudo aptitude install acpi acpi-support apm
This will install the power-button-power-off feature in you server.
82579 based Ethernet network cards are only supported in Kernel 2.6.36 and up, thus Ubuntu 10.04 LTS will not have out-of-the-box support for the network card. I needed this to work since I’ll be using this as my server and 11.04 is not LTS, I have no choice. To fix this with the motherboard I have from Intel, here are the steps that I did…
- Download the driver source from Intel driver webpage here, or the latest one they have. Double check if the driver supports the version of the network card, the one I have is 82579.
- Ready the Ubuntu server, install make gcc g++ and linux headers
aptitude install make gcc g++ linux-headers-`uname -r`
- Un-pack the src driver that you just downloaded, compile and install.
tar -xvf [filename].tar
- If everything goes well, no error should come out, then enable your new ethernet card.
- You can check your new network card via ifconfig
Note: If you update your kernel or linux image via aptitude safe-upgrade or dist-upgrade, you need to remove the e1000e module, re-compile the driver and install the newly compiled driver again.
Here’s a way to block users from using a different DNS address other than your own local DNS server to bypass OpenDNS filtering. I’m currently using Shorewall in an Ubuntu 8.04 LTS server setup as my Firewall, Gateway and DNS, and works nicely. This should also work in 10.04 or other Ubuntu install that has Shorewall firewall. Side effect for the user will be that they wont be able to surf the net until they revert back to the assigned DNS to use.
In your Shorewall Rules file, add this above the other rules.
DNS/ACCEPT $FW net
DNS/ACCEPT net $FW
DNS/DROP loc net
DNS/DROP net loc
$FW is your firewall/gateway and in my setup my DNS. You can change $FW to loc:<dns_ip_address> if your DNS is located in another machine other than your gateway.
Have fun raining in on their parade 😉
P.S. You can add filters to allow certain IP or MAC addresses to use DNS outside (i.e. Google DNS ).
I have a linux Ubuntu server and a dynamic IP for the DSL connection. The office needs web filtering and getting a static IP will just add cost to the now tight budget. Looking around there is actually a way to update OpenDNS IP address under linux. Below are what is needed to be installed and configured.
- Any latest Ubuntu server ( I’m using Ubuntu 10.10 Server )
- ddclient installed (use “aptitude install ddclient”)
- net connection, I have set up my linux server as a firewall/gateway
After installing ddclient, go to /etc and edit ddclient.conf, below is the format that I used, modify it to suite your configuration.
<openDNS_network_label_here> #this can be found under settings, just the label, nothing else should be added here
Save the new configuration file and restart the client
Also make sure that the network that your going to update the IP address has set its Dynamic IP Update option enabled. This can be found under the advance setting of the network.
Ran into a problem returning an XML data with special characters encoded into it through an AJAX call. The problem was that special characters (i.e. ñ -> ñ) throws an error when being returned through XML and is in the process of being parsed by the browser.
XML does not support named entities by default, you have to declare it before hand. Only < > & " and ' are predefined.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
Got this from here…
Instead of using named entities in the XML (I think this also affects JSON, I could be wrong since I didn’t test this is JSON) like ñ, use character references to support special character encoding.
white space = =
ñ = ñ = ñ
they are all the same… #160 is referenced/mapped to ” ” and #241 is referenced/mapped to ñ
So when forming your XML before returning it through an AJAX call, form the special characters via character reference.
Hope this helps you out there having this problem.
Encountered this problem today while testing an image upload AJAX script in tomcat. Later on I found out that the folder is actually protected Win7 and tomcat couldn’t write the cache or temporary file into the folder.
So anyone having this problem, check the following…
- What OS are you running? Vista/Win7?
- What IDE are you using?
- Was your IDE elevated to admin status?
So, check your OS, I’m using Win7. I was developing this under WinXP a few months back, and now under Win7, the folder is protected since it was under the “Program Files (x86)” folder group. (Argh!)
I closed my IDE, using IDEA IntelliJ 9.0, ran the IDE under “Administrator Level” and the problem disappeared!
So check those out first.
Been busy around.. but a little heads-up, I’ll be posting and update to installing tomcat and java to Ubuntu 9.10 since I’m “forced” to upgrade now lol… also I’ll be posting a tutorial on how to login-authenticate and query google Analytics using flash AS2, which I think some of you there are also having some problems 😉
I’m now developing in flash actionscript 2…. ok from one language to the other….
I’m currently playing around with Java Native Interfaces(JNI) and I must say its been too long since I programmed in Java. Its good to be back! Anyway, lets hop to the main topic…
I was following the tutorial from Sun in creating my first JNI and calling my compiled C++ library, I was stuck in the last part where this error popped out whenever I tried to invoke
the error was…
java.lang.UnsatisfiedLinkError: no HelloWorld in java.library.path
at HelloWorld.<clinit>(HelloWorld.java:<line number>)
Could not find the main class: HelloWorld. Program will exit.
one way of fixing this is to include the current location of your newly compiled shared library (ex. HelloWorld.so). I’m using Ubuntu linux,so to include the current folder where your “.so” file is located, invoke…
or you can also do …
Stay tune 😉