May 12, 2010
- Add the Loopback Adapter to the Windows client machine.
- Configure this adapter as following:
- Disable ‘File and Printer Sharing for Microsoft Networks’.
- Choose appripriate IP address and netmask, such as: 169.254.0.1 and 255.255.255.0.
- Under ‘Advanced’ settings, check ‘Enable LMHOSTS Lookup’ and ‘Disable NetBIOS over TCP/IP’
- Under Putty, configure the SSH Tunnel as:
Source port: 169.254.0.1:139
- Test the connection by entering \\169.254.0.1 at Run prompt in Windows.
March 28, 2010
I tried connecting to my samba print server from my xp notebook. The printer was always visible, connectable and accepted documents for printing but never led to a physical print. I could solve it by visiting:
and adding the printer to CUPS. It worked immediately!
December 13, 2009
In Ubuntu server, you can put any disk that is not used for a give period of time to sleep using hdparm command. Simply do something like:
hdparm -S 20 /dev/sdb
hdparm -S 20 /dev/sda
to put the disks to sleep after 100 seconds (20 x 5)
To have it programmed automatically on bootup, write the same lines into /etc/rc.local.
December 6, 2009
You have to understand the mechanism first:
1. The xbmc recognizes lircd as a generic remote control.
2. lirc further can connect to various remotes based on configuration in /etc/lircd.conf and present them as lirc remote to xbmc.
Now, first of all, you have to know what is the name of your remote device in linux. For this, you need to install input-utils:
apt-get install input-utils
Now when you say:
it shows you all the input devices on your system. In my case, among other, I see:
bustype : BUS_PCI
vendor : 0x1043
product : 0x4876
version : 1
name : "saa7134 IR (ASUSTeK P7131 Hybri"
phys : "pci-0000:05:00.0/ir0"
bits ev : EV_SYN EV_KEY EV_REP
This shows that the remote is indeed connected to the system and recognized as /dev/input/event6 device. This device number may change among different boots. We shall fix it by a trick in the lirc configuration.
Now if you want to see whether the events from your remote are being received by the system or not, issue the following:
input-events -g -t5 6
This shows the events received from event6 device with a 6s timeout. Press the buttons on your remote and you should see the codes received on the console.
If you want to see how the remote is mapping keys to keycodes, then isssue the following command:
input-kbd 6 > keyMapIR.txt
where 6 indicates the device id. You might have a different one.
In case, you decide to change this encoding then you can change the keycodes in the keyMapIR.txt file and upload it back to the remote as:
input-kbd -f keyMapIR.txt 6
But normally this will not be required.
Now that you know that your device is connected and working properly, we can proceed to install lirc.
apt-get install lircd
During its installation, please choose the appropriate remote make. In my case, I chose ASUS MyCinema. That sets it. Now lirc waits for a connection on a given address. We do not go in this detail. If you look in the /etc/lirc/lircd.conf, you would see something like:
After tweaking, I have this file as following:
one 0 0
zero 0 0
Please note that the names of the buttons have been changed a bit to match with the xbmc configuration. Now after changing this file and having restarted lircd, you should issue irw command and press buttons on the remote to check the proper encoding of the keys by lirc. If everything is perfect, then we can now proceed to the xbmc configuration.
The file that we want to edit is /usr/share/xbmc/system/Lircmap.xml. Here you should add a section like the following:
The device name “lirc.conf” is the same that you see when you run irw command. You can see that the keys correspond to the keys in lircd config file.
Finally, we want lircd to always connect to the right device even if its device number changes after reboot. To this end, we need to change the /etc/init.d/lirc as follows:
#For remote only detection support, we need
#both REMOTE_DEVICE and TRANSMITTER_DEVICE undefined
if [ -z "$REMOTE_DEVICE" ] && [ -z "$TRANSMITTER_DEVICE" ] && [ -c $dev ]; then
#If we have a REMOTE_DEVICE or REMOTE_DRIVER defined (either because no devices
#were defined, OR if we explicitly did), then populate REMOTE_ARGS
if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
if [ -n "$REMOTE_DEVICE" ] && [ "$REMOTE_DEVICE" != "none" ]; then
if [ -n "$REMOTE_DRIVER" ] && [ "$REMOTE_DRIVER" != "none" ]; then
#Now, if we ALSO have a transmitter defined, add some args
#To make the first lircd listen up
if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
whereas $REMOTE_DEVICE is defined as REMOTE_DEVICE=’saa7134*’ in /etc/lirc/hardware.conf. This step makes sure that after a reboot, the lircd always connects to the IR device regardless of its device number assigned by linux kernel.
Just in case it is of help to someone, here is my /etc/lirc/hardware.conf file:
#Chosen Remote Control
REMOTE=”Asus MyCinema P7131″
#Chosen IR Transmitter
#Don’t start lircmd even if there seems to be a good config file
#Try to load appropriate kernel modules
# Default configuration files for your hardware if any
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
December 4, 2009
This assumes you use:
1. Putty as ssh client
2. Xming as X server on Windows XP
First you should save a session in Putty that connects to the given server. Now, from a command prompt, execute:
Xming :0 -multiwindow -clipboard
to start the Xming server. And,
plink -X -load RsrvSession xterm
to start the X-based remote connection using Putty session stored as RsrvSession.
If you need all the fonts, then install the Xming-fonts package on Windows. That is all to it.
November 14, 2009
- Insert your USB flash drive (1GB should be enough, although less may work too, I just haven’t tested it with less)
- Go to http://unetbootin.sourceforge.net/
- Click on Download (for Windows)
- Install the .exe
- Open Unetbootin.
- In the UNetbootin window, there will be a drop-down menu “==Select Distribution==”
- There will also be one called “==Select Version==”
Select 9.04_Live for the latest version of Ubuntu: 9.04 Intrepid Ibex, or 8.04_Live for 8.04 Hardy Heron LTS (Long Term Support)
- In the bottom left corner of the window, there will be another drop down menu. It will either say “Hard Disk” or “USB Drive”. You want it to say USB Drive
- Click OK
- Wait for everything to finish. While you are waiting, DO NOT CLOSE THE UNETBOOTIN WINDOW OR UNPLUG YOUR USB DRIVE
- On the same ordifferent computer, plug in your USB Drive, and restart. Right at the beginning of the boot, press F12 (may be different) repeatedly, select USB Drive with the arrown keys and spacebar, and Ubuntu will boot from USB drive.
Note: If you encounter an error from SYSLINUX on bootup saying “Error: Could not find kernel image”, try formatting the USB drive with FAT16 (or FAT) instead of FAT32.
November 14, 2009
mkdir -p /usr/local/distcc/bin
ln -s /usr/local/bin/distcc c++
ln -s /usr/local/bin/distcc cc
ln -s /usr/local/bin/distcc g++
ln -s /usr/local/bin/distcc gcc
DISTCC_HOSTS="localhost otherhost anotherhost"
export CONCURRENCY_LEVEL DISTCC_HOSTS PATH CCACHE_PREFIX
distccd --daemon --allow 192.168.X.X (run on otherhost)
time make -j12 CC="ccache gcc"
time make modules -j12 CC="ccache gcc"
mv /lib/modules/2.6.28 /lib/modules/2.6.28_old
time make modules_install
time make install
time mkinitramfs -o initrd.img-2.6.28 2.6.28
dpkg -i linux-firmware_1.2_all.deb
November 10, 2009
What will you do, if all of a sudden, without any apparent reason, the clipboard stops working? There is not much except to reboot, eh? Stop. The reason could be a malfunctioning application that is not letting go of the clipboard. Try searching for this GetOpenClipboardWindow utility. It will inform you of the application holding the clipboard lock. Quitting that application should solve this problem without a reboot.
November 8, 2009
After a power surge, your linux server could be rendered un-bootable because of a corrupt file-system journal. If you are lucky and there are no physical errors, then the following could get your computer back to life.
- Boot the linux box using live-cd (any bootable installer for server computers).
- Choose “rescue a broken system”.
- Get to the shell and issue the following command:
fsck.ext3 /dev/sda1(or other, depending on your partition)
- The list of partitions can be displayed using:
October 3, 2009
net rpc SHUTDOWN -f -I 192.168.XX.XX -U USERNAME%PASSWORD
net rpc SHUTDOWN -r -f -I 192.168.XX.XX -U USERNAME%PASSWORD