Probably I should conclude this series here.
The power issue is a niggling one, but couldn't solve it, so am living with a max battery life of 1.5 hours or so. Standby lifetime is around a week, so it's pretty nice to leave it on standby and start it up for a quick browse or something. Found that the Fn-backspace (or should I say Fn-delete?) combo works as the delete key (since the mac keyboard doesn't have a "backspace" and instead has a "delete" which works like a backspace).
Future work may be an upgrade to swfdec-mozilla 0.8 (currently installed is 0.6)which is supposed to let flash movies play OK. Currently using greasemonkey workaround to download from youtube and play with vlc on desktop.
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Sunday, February 22, 2009
checking which version is installed on ubuntu
To find which version of a package is installed on ubuntu: Googling led to this post on howtogeek and this one in ubuntuforums so I can do either dpkg -s packagename or aptitude show packagename Aptitude is much slower. Another option, apt-show-versions turns out to be not installed currently. aptitude search pattern searches for all packages which match pattern.
Wednesday, February 18, 2009
Miranda IM
Finally settled on Miranda IM for Yahoo and MSN. Trillian used to need re-login for MSN after a couple of hibernate/resumes. Pidgin had crashes with MSN.
Had to install two more plugins for Miranda, keepstatus and startupstatus, for my requirement of remaining logged in automatically whenever I use the machine. Miranda also used to give an error message on resume, saying that Yahoo login was refused. Figured that this was because the ethernet interface was not yet up when it retried. Tweaked the settings Options -> Status -> StartupStatus -> Set after 60000 ms and in Options -> Status -> KeepStatus -> Check Connection (ticked) and Delay between retries at 60 sec.
Also blocked spam using Options -> Events-> Ignore settings. A bit non-intuitive, "The following events are being ignored" - Unknown contacts, everything is enabled (i.e. everything is ignored).
Saturday, February 14, 2009
mp3 and wav as WinAmp Media File
While sorting files based on type in Windows explorer, both mp3 and wav files were being listed as WinAmp Media file. To prevent this, googled and adopted a similar strategy as given in the WinAmp forums:
- Remove the mp3 and wav files associations from WinAmp preferences (Ctrl-P in WinAmp to reach preferences, File Types on left pane).
- In Windows Explorer, Tools -> Folder Options -> File Types tab, Click New, Enter mp3 extension. Here, if it is already associated with some other app, it will complain. Then you need to remove the association from the other app...
- Click Advanced button at the bottom, delete all the Actions, create two new actions - Action Play with Application used to perform field set as
"C:\Program Files\Winamp\winamp.exe" "%1"
and Action Enqueue in WinAmp with the field set as"C:\Program Files\Winamp\Winamp.exe" /ADD "%1"
- Note of course that you need to put in the correct path to winamp.exe on your system, and that if the %1 is not within quotes, you will come to grief with any long filenames!
Thursday, February 12, 2009
multilingual show notices in Google docs
Created multilingual show notices in Google docs by copy-pasting from blogger which has Indic transliteration support. Telugu had a problem - on generating print preview or while printing, the generated pdf had wrongly placed diacritic marks. Downloading a doc doesn't help, since the Telugu fonts are not loaded. Maybe I'll try later after installing the Indic fonts and keyboard support.
Wednesday, February 11, 2009
krishna on dell t100 setup continues
- automysqlbackup.sh script from krishna used to backup and restore mysql databases. It gives two ways to restore:
# mysql --user=username --pass=password --host=dbserver database < /path/file.sql
The latter method fails with ERROR 1064 (42000) at line 1: Luckily the former method works, tho' while importing SI db, it gave an error ERROR 1298 (HY000) at line 2410: Unknown or incorrect time zone: 'NULL' the db seems to be working. After the database import, phplist said database needs to be upgraded. As given in the docs, went to Main Page -> System Functions -> upgrade and it took less than a second.
# or
# mysql --user=username --pass=password --host=dbserver -e "source /path/file.sql" database - Next, the php files were being served as MIME type application/x-trash. Not sure what exactly was wrong, but now it is working after
(a) DirectoryIndex index.php index.html added to /etc/apache2/apache2.conf
(b) index.html.old moved to another directory.
(c) Subscription page configured properly. - Commandline php had to be installed, with apt-get install php5-cli as given at ubuntuforums.org
- getmail downloaded from http://pyropus.ca/software/getmail/ and extracted from tar.gz.
- apachemails added to webserver's group with
useradd -G {group-name} username
as given here. Listed users and groups seeing /etc/group,ps -eo euser,ruser,suser,fuser,f,comm,label
showed that apache was being run as www-data so didchown apachemails:www-data apachebounces
- Later found (after many attempts, testing pop with and without notls option) that this version of phplist (2.10.9) would not read arbitrary files as mbox files (like the earlier 2.10.5 on the older krishna could!) .
Cannot open mailbox file Can't open mailbox /var/www/bounces/apachebounces: no such mailbox
So had to change mbox location to /var/mail/username for a valid username. - Before that, sendemaillib edited as given in PB's earlier post. Since I copied the scripts from the old krishna, did not have any user problems with running the scripts.
- Running processbounces gave
Error: IMAP is not included in your PHP installation, cannot continue
Installed imap module with apt-get install php5-imap - Now to lock up the system using the techniques given here, but passwd -l causes the message
Your account has expired; please contact your system administrator
probably due to this bug. So, did the editing of /etc/ftpusers and /etc/ssh/sshd_config instead.
Sunday, February 08, 2009
more on vm and finally not virtualizing after all
I'm filling in this post with stuff on the virtual machine just for completeness - we've decided to go ahead without virtualization for krishna since the only thing to be running on it would have been a single vm with phplist on it.
- Added gpm to use mouse if necessary on the local terminal.
- removed many daemons like bluetooth from /etc/rc3.d
- Was giving error on boot of vm, "Use of uninitialized value $uni in pattern match (m//) at /usr/bin/ckbcomp 3109." etc. Apparently this was due to a missing dependency and adding perl solves the problem. sudo apt-get install perl solved the issue.
- Cannot redir from lower ports as unprivileged user. So, 5080 redirected to port 80 and so on.
- Way to port-forward only a limited number of ports for passive ftp is discussed in experts-exchange. The syntax for vsftpd is given here, for example, specifying pasv_max_port and pasv_min_port
- Changed /etc/hostname and /etc/hosts so that each vm has it's own name.
- While starting the vms using kvm, use -daemonize -nographic and not & to put into background. Otherwise becomes a zombie or something.
- ftp server running on the vm was accessible from outside with firefox, not with filezilla or IE. Reason was probably that FF was rolling over to active mode.
- Packet sniffed with wireshark, it gave all out-going packets tcp checksum errors due to checksum offload, so disabled checking in wireshark. Edit -> Preferences -> TCP
- PASV ip address and port are specified as given here: http://en.wikipedia.org/wiki/File_Transfer_Protocol
"PORT 192,168,0,1,192,2". first 4 numbers are ip address, The port fields should be interpreted as p1×256 + p2 = port192x256+2 - Since qemu's natting was mangling the pasv packets, changing the ip to 10.0.2.2 - probably we have to go with ftp on raw server. This is in spite of setting the pasv_address in vsftpd.conf. After the packets leave the vm, the change is made by the NAT.
- Since ftp is on bare metal, phplist being on a single vm is more convenient, so why have a vm at all - hence, going with a bare metal install. Install itself took only 10 minutes!
Friday, February 06, 2009
removing X from server
Too late, found that sudo aptitude remove ubuntu-desktop would have removed all the stuff in one line. Anyway, went through the meta-package references given here and did the aptitude remove for many of them. Some daemons like bluetooth still left, manually hunting them down... sudo apt-get remove xserver-xorg to remove X.
building virtualized servers on a dell T100
This is yet another looong post. Starting from scratch, had to do everything from changing bios settings to adding and removing virtual machines. Maybe I'll skip over the many days of trial and error and will just summarize the actual steps to be taken here.
- The lights 1 2 3 4 on the front panel are only for diagnostics according to the Dell manual and do not indicate hard disks or anything like that.
- Warning message "Alert! cover was previously removed" and not booting till F1 or F2 is pressed. Solution as given here - Bios setup -> System Security -> Chassis Intrusion -> Enabled Silent.
- Much later, while installing KVM, found virtualization needs to be enabled in Bios as given here. So, as mentioned in the dell manual, went into Bios setup -> CPU Information -> Virtualization -> Enable. Also enabled the CPU info reporting to OS, which also was disabled by default.
- PB wanted to do JeOS as given here, the installation on the base machine was Ubuntu server 8.10 Intrepid amd64 build.
- Installed gui with sudo apt-get install ubuntu-desktop since I wanted to try out virt-manager. The installation of ubuntu-desktop stalled at 99% after downloading files for more than an hour, probably due to some network glitch. Did Ctrl-C, again ran the same command, this time it downloaded a few kB more and then finished the install with no more problems. The install itself took around 6 minutes. 4 GB RAM, amd64 kernel. Did apt-get remove gdm so that it would not boot into X.
- While installing virtual machines from CD with virt-manager as given here, wizard would not proceed until CD was unmounted in host OS. Then, the CD could be selected.
- Had to install qemu, without which install of virtual machines was failing. Listed in Ubuntu docs here, here and here.
sudo apt-get install kvm libvirt-bin ubuntu-vm-builder qemu bridge-utils - Trying to install from the same Ubuntu server CD using virt-manager was hanging at the point where it installs and configures grub. Tried the install in expert mode and installed Lilo instead, this works. For expert mode, hit F4 when booting from CD after choosing English (language of install).
- Virtual machines created with network options with virt-manager were not able to access the network. Only later did I know that all these machines needed was to be set to DHCP. QEMU has a strange and wonderful user mode virtual network which has a firewall / gateway / dhcp server at 10.0.2.2, DNS at 10.0.2.3. Since each instance of Qemu is a separate process, if set to DHCP, each Qemu virtual machine will get the address 10.0.2.15 ! And they are automatically NATed.
- Now tried the commandline vmbuilder, since the virt-manager based installs were taking so much time and user interaction.Did the install according to the docs, some find the install to take just a minute! But in my case, found it took two hours. Reason was that it was downloading from ubuntu.com instead of using CD.
- The --iso option for vmbuilder does not work, so the install was going to ubuntu.com for each package.
- Also found that lines separated by \ for a multiline command works if typed in, but takes only the first line if copy-pasted!! So, my first vmbuilder image was a basic default one. Luckily, the default made a run.sh filein the same directory, which gave the syntax to run the vm as
kvm -m 128 -drive file=disk0.qcow2 -net nic -net user $@
The trailing $@ is equivalent to $1 $2 $3..., which means that you can add any more commandline arguments to the script (run.sh) and they will be passed on to the kvm program. Man kvm says it takes the same arguments as kvm-qemu - and man kvm-qemu redirects to the qemu man page. - Again another trial - the commandline virt-install (since the vmbuilder was using so much network and time). . It complained of "Unsupported virtualization type" - apparently had to put --hvm in the arguments. Bridge mode causes it to crash. Reason seems to be that the bridging, tap interface etc should be manually set up beforehand. So, removed the bridge option --network bridge:eth1. Then, it has qemu-system-x86 running at 100% cpu for a long time - indefinitely? - with no disk activity, as seen with top. So abandoned this attempt. The command used was
virt-install --name testX3 --ram 512 --file testX3 file-size 6 --nographics --hvm --cdrom ubuntu-8.10-server-amd64.iso - The images created with vmbuilder could be copied and run using the kvm command. So, concentrating on those. Found the wonderful world of Qemu virtual networking! Redir seems to be the way to go, given at wikibooks. btm.geek says be sure to use bridging, but let's see how it goes with the user mode qemu. Now calling the virtual machines with
kvm -m 128 -hda disk0.qcow2 -hdb disk1.qcow2 -redir tcp:5555::22
for example exposes the ssh port 22 of the guest on the host machine's interfaces (localhost and eth0).
ssh -p 5555 user@localhost connects to the guest vm's sshd. We've to see if this method continues to work under load.
Tuesday, February 03, 2009
printing over network with command prompt
Printing from the Acer laptop over the network using the method given at computing.net forum by typing
net use lpt2: \\machine2\shared_printer_name /persistent:yes
type filename.bin > lpt2
Subscribe to:
Posts (Atom)