tag:blogger.com,1999:blog-49170842846448759132024-02-08T23:16:41.058+11:00Notes From UndergroundBrave the man who fears nothingAleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-4917084284644875913.post-21355135994373073992009-07-24T09:50:00.001+10:002009-07-24T10:09:45.819+10:00Picasa 3 on Fedora 11 network problemWas getting this message:<br /><br />Login failed. Please check that you are connected to the internet ...<br /><br />Log:<br />less /root/.google/picasa/3.0/drive_c/Documents and Settings/root/Local Settings/Application Data/Google/Picasa2<br /><br />Request made via proxy<br />Post data size: 109<br />[140187] id 3: Error: HttpOpenRequest failed (12157)<br />[140188] id 3: Failed to establish connection. will retry if possible<br />[140189] id 3: Stream summary:<br />POST request: https://www.google.com/accounts/ClientAuth (0)<br />Modified request headers:<br /> Added header: Content-Type: application/x-www-form-urlencoded; charset=utf-8<br />Added header: Accept-Encoding: gzip<br /><br /><span style="font-weight: bold;">Solution:<br /></span>Copied from <a href="http://groups.google.com/group/Google-Labs-Picasa-for-Linux/browse_thread/thread/4851af6758a0809f/c49218515b9acaed?pli=1"> here</a>.<br /><br /><span style="color: rgb(153, 0, 0); font-family: arial;">yum install wine</span><br /><span style="color: rgb(153, 0, 0); font-family: arial;">cp /usr/lib/wine/wininet.dll.so /opt/google/picasa/3.0/wine/lib/wine/wininet.dll.so</span>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com2tag:blogger.com,1999:blog-4917084284644875913.post-19388022298122486112009-06-28T05:14:00.006+10:002009-08-19T23:11:26.409+10:00FiWi on Fedora 11 on Dell Inspiron 1525 (BCM4312 / Dell Wireless 1395 adapter)# check if it's the correct version<br />lspci -knn | grep -i -e network -e Wireless<br /><br />from <a href="http://www.broadcom.com/support/802.11/linux_sta.php">http://www.broadcom.com/support/802.11/linux_sta.php</a> download and extract 2.6.29 kernel patch and 32 or 64-bit driver and then run<br /><br />patch -p1 < patch_2.6.29_kernels<br />make -C /lib/modules/`uname -r`/build M=`pwd` clean<br />make -C /lib/modules/`uname -r`/build M=`pwd`<br />rmmod ndiswrapper b43 ssb bcm43xx b43legacy<br /># change the following line to reflect your kernel<br />cp wl.ko /lib/modules/2.6.29.5-191.fc11.i686.PAE/kernel/drivers/net/wireless/<br />depmod<br /># and now comes the climax - WiFi led lits up<br />modprobe wlAleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com1tag:blogger.com,1999:blog-4917084284644875913.post-37483919749004448332009-04-25T09:04:00.005+10:002009-04-25T10:29:35.790+10:00Mailto links to Google Apps Gmail in FF3http://techblog.appirio.com/2008/08/defaulting-your-mailto-links-to-google.html<br />http://www.addictivetips.com/internet-tips/easiest-way-to-set-gmail-as-default-firefox-3-mail-client/<br /><br />Go to<br /><span style="color: rgb(0, 0, 0);font-family:arial;" >about:config</span><br />and set the following settings to <span style="color: rgb(0, 0, 0);font-family:arial;" >true</span>:<br /><span style="color: rgb(0, 0, 0);font-family:arial;" >network.protocol-handler.external.mailto</span><br /><span style="color: rgb(0, 0, 0);font-family:arial;" >gecko.handlerService.allowRegisterFromDifferentHost</span><br /><br />When on gmail page, go to (replace <span style="font-family:arial;">lichner.name</span> with your domain):<br /><span style="color: rgb(0, 0, 0);font-family:arial;" >javascript:window.navigator.registerProtocolHandler('mailto','https://mail.google.com/a/lichner.name/mail/?extsrc=mailto&url=%s','Google Apps')</span><br /><br />Click <span style="color: rgb(0, 0, 0);font-family:arial;" >Add Application</span> button that should appear in top right corner.<br /><br />If the button doesn't appear, make sure that quotes are not replaced with smart quotes. If it still wouldn't work, try it in save mode:<br /><span style="color: rgb(0, 0, 0);font-family:arial;" >firefox -safe-mode</span>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com2tag:blogger.com,1999:blog-4917084284644875913.post-10425777714524087112009-01-22T01:24:00.015+11:002009-02-05T15:54:52.066+11:00Cobbler on CentOS 5http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F<br /><br />rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm<br /><br /><br />yum install cobbler<br />service cobblerd start<br /><br /><br /><b>web Interface<br /></b>https://fedorahosted.org/cobbler/wiki/CobblerWebInterface<br />vim /etc/cobbler/modules.conf<br />#change<br />[authentication]<br />module = authn_configfile<br /><br />- might use default password or change it to cobbler with:<br />htdigest /etc/cobbler/users.digest "Cobbler" cobbler<br /><br />Run with:<br />http://127.0.0.1/cobbler/web<br />username: cobbler, password: cobbler<br /><br /><i><span style="color: rgb(39, 78, 19);"># the web interface didn't work till I created this file and added entry for cobbler in hosts file</span></i><br />vim /etc/httpd/conf.d/cobbler_my.conf<br /><virtualhost><br /></virtualhost><VirtualHost *:80><br /><virtualhost><virtualhost> ServerName cobbler<br />DocumentRoot /var/www/cobbler<br /></virtualhost></virtualhost></VirtualHost><br /><virtualhost><br />service httpd restart<br />service cobblerd restart<br /><br /><br /></virtualhost><b>vim /etc/cobbler/settings</b><br />#change<br />next_server: '192.168.1.1'<br />server: '192.168.1.1'<br />manage_dhcp: 1<b><br /></b><br /><span style="font-weight: bold;">vim /etc/xinetd.d/tftp</span><br />#change<br />disable = no<br /><virtualhost><br /></virtualhost><span style="font-weight: bold;">vim /etc/cobbler/dhcp.template</span><br />#edit<br />subnet 192.168.1.0 netmask 255.255.255.0 {<br /> option routers 192.168.1.1;<br /> option domain-name-servers 192.168.1.1;<br />option subnet-mask 255.255.255.0;<br />range dynamic-bootp 192.168.1.100 192.168.1.254;<br /> filename "/pxelinux.0";<br /> default-lease-time 21600;<br />max-lease-time 43200;<br />next-server $next_server;<br />}<br /><br /><br />service cobblerd restart<br />service xinetd start<br />service dhcpd start<br /><br />chkconfig cobblerd on<br />chkconfig xinetd on<br />chkconfig dhcpd on<br /><br /><br /><br />#if got errors with dhcpd, repeat:<br />vim /etc/cobbler/dhcp.template<br />cobbler sync<br />service dhcpd start<br />less /var/log/messages<br /><b><br />ks menu<br /></b><i><span style="color: rgb(39, 78, 19);"># yet to be done - don't want a menu</span><b style="color: rgb(39, 78, 19);"><br /></b><span style="color: rgb(39, 78, 19);"># might add systems:</span><br /><span style="color: rgb(39, 78, 19);">#00:0c:29:46:17:d1 i386<br />#00:0c:29:70:55:9a x86_64</span><br /><span style="color: rgb(39, 78, 19);">#edit</span></i><b><br /></b>vim /etc/cobbler/pxedefault.template<b><br /></b><b><br /></b><b>download image<br /></b>#make download to folder /isos if possible or after download move iso to /isos<br />rtorrent<br /><backspace><br />ftp://ftp.iinet.net.au/linux/centos/5.2/isos/i386/CentOS-5.2-i386-bin-DVD.torrent<b><br /></b>ftp://ftp.iinet.net.au/linux/centos/5.2/isos/x86_64/CentOS-5.2-x86_64-bin-DVD.torrent<b><br /></b><b><br />mount iso image<br /></b></backspace>mkdir -p /mnt/Centos52<br />mount -t auto -o loop /isos/CentOS-5.2-i386-bin-DVD.iso /mnt/Centos52<br />cobbler import --mirror=/mnt/Centos52 --name=CentOS-5.2-i386<br /><backspace><b><br /></b><b>#add extra repositories</b><br />cobbler repo add --name=CentOS-5.2-i386-UPDATES --mirror=ftp://ftp.iinet.net.au/linux/centos/5.2/updates/i386/ --priority=40 --createrepo-flags="-c cache"<br /><br /> #!schedule daily sync!<br /></backspace>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com3tag:blogger.com,1999:blog-4917084284644875913.post-52065646350611774852008-12-15T01:50:00.021+11:002009-07-04T01:08:13.418+10:00Duall boot Vista and Fedora 10, installed from hard driveI wanted to install Fedora 10 on my wife's Dell notebook from a downloaded dvd iso image, without burning it on a disk. I found that it could be possible with <a href="http://unetbootin.sourceforge.net/">UNetbootin</a>, but the problem was that Vista came installed on NTFS, which is not readable by anaconda installer. The solution was to create a temporary FAT32 partition.<br />This is how it worked:<br /><br />In Vista use Disk Manager to create space on your HDD (right click on Computer and select Manage). Shrink the last partition by at least 10G and in the created space make a new 4G FAT32 partition and give it a drive letter. Your linux distro will be installed in the remaining space.<br /><br />Download the Fedora 10 dvd iso and save it to the new partition.<br /><a href="http://unetbootin.sourceforge.net/">Download</a> and run UNetbootin. Choose to install from ISO image and select the image. Choose to install to hard drive. UNetbootin will then create c:\images folder and also extract packages from the iso image, which is pointless, but just let it do what it's doing.<br /><br />Move the c:\images folder to the new partition. The partition should now contain your distro ISO image and the images folder.<br />After reboot, you should see a new boot menu. Select UNetbootin and when asked from which partition to install, select the last one. Then select to install in free space.<br /><br />When the installation was finished, linux booted fine, but Vista complained about a missing boot loader. The problem was that grub was pointing to the first partition, but Vista was installed on the second (or even third - this is confusing me :), courtesy of Dell. The fix was to edit grub.conf and find the second occurance of rootnoverify and change 1 to 2 on that line:<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >vim /boot/grub/grub.conf</span><br /><br />change<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >title Windows Vista</span><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >rootnoverify (hd0,1)</span><br /><br />to<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >title Windows Vista</span><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >rootnoverify (hd0,2)</span><br /><br />(the title will differ, could be "other" if you haven't changed it during installation)<br /><br />When in Vista, run UNetbootin again and let it uninstall itself. The UNetbootin boot menu and all folders it created on the Vista drive will be gone.<br /><br />I haven't yet come to deleting the termporary 4G Fat32 partition, but I guess the partition number in groub.conf for the linux partitions would have to be decreased by one when the partition is deleted or linux wouldn't boot.<br /><br /><span style="font-weight: bold;"><br />Accessing the Vista NTFS partition from linux</span><br /><br />http://fedorasolved.org/post-install-solutions/ntfs-read-write<br />http://www.ntfs-3g.org/index.html#usage<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >yum -y install ntfs-3g</span><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >mkdir -p /mnt/c</span><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >mount -t ntfs-3g /dev/sda2 /mnt/c</span><br /><br />to make it permanent add an entry to fstab file.<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >echo '/dev/sda2 /mnt/c ntfs-3g defaults 0 0' >> /etc/fstab</span><br /><br />(sda2 might be sda1, depending on where Vista lives)<br /><br /><span style="font-weight: bold;">Allowing root gui login</span><br />http://www.cyberciti.biz/faq/fedora-10-root-login/<br /><br /><span style="color: rgb(102, 0, 0);font-family:arial;" >sed -i '/root/ s/^/#/' /etc/pam.d/gdm<br /></span><span style="color: rgb(102, 0, 0);font-family:arial;" >sed -i '/root/ s/^/#/' /etc/pam.d/gdm-password<br /></span><span style="color: rgb(102, 0, 0);font-family:arial;" >sed -i '/root/ s/^/#/' /etc/pam.d/gdm-fingerprint</span><br /><code></code>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com0tag:blogger.com,1999:blog-4917084284644875913.post-25782120572343091852008-11-28T11:07:00.003+11:002008-11-28T11:40:37.840+11:00Vimperator for Opera<a href="http://my.opera.com/Blazeix/blog/2008/07/04/vimperator-for-opera">http://my.opera.com/Blazeix/blog/2008/07/04/vimperator-for-opera</a><br /><span style="font-family:monospace;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;" >mkdir -p ~/.opera/keyboard</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >cd ~/.opera/keyboard</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >wget http://files.myopera.com/Blazeix/blog/vimperopera.ini</span><br /><br />Copied from the above page:<br /><ul><li>Open up your preferences window and navigate to Advanced->Shortcuts->Keyboard Setup and choose 'vimperopera'. Press O.K.</li><li>(Optional) To get a more authentic Vim[perator] experience, you may want to hide all of your toolbars except for the tab bar and address bar. Do this from the Tools->Appearance->Toolbars tab, and press Shift+m to toggle the menu bar on/off. I put my address bar at the bottom of the window, and kept the tab bar at the top. I hid all the other toolbars.</li><li>While in opera, <a href="http://my.opera.com/Tamil/skins/get.pl?id=8164">download</a> <a href="http://my.opera.com/community/customize/skins/info/?id=8164">Standard Slim Skin</a>.</li></ul>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com1tag:blogger.com,1999:blog-4917084284644875913.post-31383545769603176442008-11-13T20:13:00.033+11:002008-12-03T05:05:48.519+11:00Vim - my config on CentOS<span style="font-size:100%;">set vim as a default editor<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >echo "export EDITOR=/usr/bin/vim" >> /etc/profile</span><span style="font-size:100%;"><br />disable flow control in a terminal (unblock ctrl+s, ctrl+q for use in vim)<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >echo "stty -ixoff -ixon" >> ~/.bashrc<br /></span><span style="font-size:100%;"><br />config:<br /></span><span style="font-size:100%;"><span style="color: rgb(153, 0, 0);font-family:arial;" >echo '</span><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set mouse=a</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set number</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-size:100%;" >set ts=2</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set shiftwidth=2</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set expandtab</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set softtabstop=2</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >set smartindent</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >map <c-q> :mksession! ~/.vim/.session </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >cr</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >map </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >c-s</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" > :source ~/.vim/.session </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >cr</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >nmap </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >F2</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" > :update </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >cr</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >imap </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >F2</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" > </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >C-O</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >:update </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >cr</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >></span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >' >> /etc/vimrc</span><span style="font-size:100%;"><br /></span><br /><span style="font-size:100%;">Without the key mappings above, vim would be too painful for me to use for programming.<br />Ctrl+q ... save vim's state e.g. what files are opened, cursor position, ...<br />Ctrl+s ... restore saved state<br />F2 ... save current file - works in insert mode too<br /><br /></span><span style="font-weight: bold; line-height: 30px;font-size:100%;" >X11 clipboard</span><span style="font-size:100%;"><br /><span style="font-size:100%;"><a href="http://lug.wsu.edu/node/1239">http://lug.wsu.edu/node/1239</a></span><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >yum install vim-X11</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >echo "alias vim='/usr/bin/vimx'" >> ~/.bashrc</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-size:100%;" ><span style="font-family:arial;">. ~/.bashrc</span></span><span style="font-size:100%;"><br /><br /></span><span style="font-weight: bold; line-height: 30px;font-size:100%;" >rails support</span><span style="font-size:100%;"><a href="http://www.vim.org/scripts/script.php?script_id=1567"><br />http://www.vim.org/scripts/script.php?script_id=1567</a><br />Before running, check for latest version and replace 9499 below.<br /><span style="color: rgb(153, 0, 0);"><span style="font-family:arial;">mkdir ~/.vim<br />cd ~/.vim<br /></span></span></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >wget <a class="linkification-ext" href="http://www.vim.org/scripts/download_script.php?src_id=9499" title="Linkification: http://www.vim.org/scripts/download_script.php?src_id=9499">http://www.vim.org/scripts/download_script.php?src_id=9499</a></span><br /><span style="font-size:100%;"><span style="color: rgb(153, 0, 0);font-family:arial;" >unzip rails.zip</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >rm rails.zip</span><br /><br />enable rails docs<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >:helptags ~/.vim/doc</span><span style="font-size:100%;"><br />then run<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >:help rails</span><span style="font-size:100%;"><br /><br /></span><span style="font-weight: bold; line-height: 30px;font-size:100%;" >haml+sass syntax highlighting</span><span style="font-size:100%;"><br /><a href="http://www.vim.org/scripts/script.php?script_id=1773">http://www.vim.org/scripts/script.php?script_id=1773</a><br /><a href="http://www.vim.org/scripts/script.php?script_id=1979">http://www.vim.org/scripts/script.php?script_id=1979</a><br />Again, check for latest versions and modify 8461 and 7447 below.<br /><span style="color: rgb(153, 0, 0);font-family:arial;" >mkdir ~/.vim/syntax</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >cd ~/.vim/syntax</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >wget <a class="linkification-ext" href="http://www.vim.org/scripts/download_script.php?src_id=8461" title="Linkification: http://www.vim.org/scripts/download_script.php?src_id=8461">http://www.vim.org/scripts/download_script.php?src_id=8461</a></span><br /><span style="color: rgb(153, 0, 0);font-family:arial;" >wget <a class="linkification-ext" href="http://www.vim.org/scripts/download_script.php?src_id=7447" title="Linkification: http://www.vim.org/scripts/download_script.php?src_id=7447">http://www.vim.org/scripts/download_script.php?src_id=7447</a></span><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >echo '<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >au! BufRead,BufNewFile *.haml setfiletype haml</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >au! BufRead,BufNewFile *.sass setfiletype sass</span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" ><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >' >> ~/.vim/filetype.vim</span><span style="font-size:100%;"><br /></span><span style="font-size:100%;"><br />problem with haml.vim - carriage returns errors<br /><a href="http://railshacks.blogspot.com/2008/05/railsvim-breaks-in-hardy-heron.html">http://railshacks.blogspot.com/2008/05/railsvim-breaks-in-hardy-heron.html</a><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >vim ~/.vim/syntax/haml.vim</span><span style="font-size:100%;"><br />and save with<br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >:w ++ff=unix</span><span style="font-size:100%;"><br /><br /></span><span style="font-weight: bold; line-height: 30px;font-size:100%;" >Swap Escape and Caps Lock keys</span><span style="font-size:100%;"> (to love vim more)<br /><a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/Keyboard-and-Console-HOWTO">http://www.ibiblio.org/pub/Linux/docs/HOWTO/Keyboard-and-Console-HOWTO</a><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >echo '</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >remove Lock = Caps_Lock</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >keysym Escape = Caps_Lock</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >keysym Caps_Lock = Escape</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >add Lock = Caps_Lock</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >'> ~/.</span><span style="font-size:100%;"><span style="color: rgb(153, 0, 0);font-family:arial;" >Xmodmap</span><br /><br />File ~/.Xmodmap is processed by /etc/X11/xinit/xinitrc-common when X starts.<br />To take effect immediately, do </span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >'xmodmap ~/.</span><span style="font-size:100%;"><span style="color: rgb(153, 0, 0);font-family:arial;" >Xmodmap</span></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >'</span><span style="font-size:100%;"><br /><br />Same on Windoze<br /><a href="http://www.emacswiki.org/emacs/MovingTheCtrlKey#toc11">http://www.emacswiki.org/emacs/MovingTheCtrlKey#toc11</a><br /></span><span style="font-size:100%;">save the next 3 lines in a file, e.g. swapEscCL.reg and execute</span><br /><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >REGEDIT4</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,01,00,3a,00,3a,00,01,00,00,00,00,00</span><span style="font-size:100%;"><br /><br /></span><span style="font-weight: bold; line-height: 30px;font-size:100%;" >tips</span><span style="font-size:100%;"><br /></span><span style="color: rgb(153, 0, 0);font-family:arial;font-size:100%;" >:%s/^/ /</span><span style="font-size:100%;"> ... indent all lines<br /></span><span style="font-size:100%;"><span style="color: rgb(153, 0, 0);">:.,.+3s/^/ /</span> ... indent 4 lines from cusor down<br /><span style="color: rgb(153, 0, 0);font-family:arial;" ><c-v>2><esc></span> ... indent 2x on a selected range<br /><br /><span style="font-weight: bold;">references</span><br /><a href="http://lucumr.pocoo.org/articles/vim-as-development-environment">vim as development environment</a><br /><br /><span style="font-weight: bold;">to do</span><br />fix problem with javascript highlighting<br />now have to do<br /><span style="color: rgb(153, 0, 0);font-family:arial;" >:set </span></span><span style="color: rgb(153, 0, 0);font-family:arial;" >syntax=javascript</span><br />perhaps filetype is not correctly set for js<br /><hints id="hah_hints"></hints>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com2tag:blogger.com,1999:blog-4917084284644875913.post-23457046475539846992008-11-13T13:33:00.011+11:002008-11-13T19:01:38.781+11:00CentOS 5 root bash prompt<a href="http://www.pantz.org/software/shell/enhancingshellprompt.html">http://www.pantz.org/software/shell/enhancingshellprompt.html</a><br /><br />Default root prompt doesn't show host and current folder, because root doesn't have ~/.bashrc file, that loads /etc/bashrc. To fix it, simply copy .bashrc from other user's home dir or, if you don't need to include /etc/bashrc, create the .bashrc file with<br /><span style="color: rgb(153, 0, 0);"><span style="font-family:arial;">echo 'PS1="[\u@\h \W]\\$ "' > /root/.bashrc<br /></span></span>which can also go to %post in kickstart.<br /><br />To load the change without relogin, run<br /><span style="color: rgb(153, 0, 0);"><span style="font-family:arial;">. ~/.bashrc<br /></span></span>(don't miss the dot at the beginning)Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com0tag:blogger.com,1999:blog-4917084284644875913.post-52395468122714582712008-11-13T01:32:00.012+11:002008-11-20T17:42:25.923+11:00Blogger setup<span style="font-weight: bold;">Blogger content width in the classic template</span><br />I found the default width too narrow. Made it wider in Settings, Layout, Edit HTML with the following replacements:<br /><br />width: 660px; => <span style="color: rgb(153, 0, 0);font-family:arial;" >width: 1000px</span><br />width: 410px; => <span style="color: rgb(153, 0, 0);font-family:arial;" >width: 780;</span><br />max-width:700px; => <span style="color: rgb(153, 0, 0);font-family:arial;" >max-width:1000px;</span><br /><br /><span style="font-weight: bold;">Google Analytics</span><br />Once editing the template, why not to add <a href="http://www.google.com/support/analytics/bin/answer.py?answer=55604&topic=11126">Google Analytic code</a>.<br />Not using Google Analytic yet? Sign up <a href="http://www.google.com/analytics/sign_up.html">here</a>.<br />Why?<span style="font-weight: bold;"><br /></span><span>"It's easy -- and free!"<br /><br /><span style="font-weight: bold;">Sitemap</span><br />Sign up for </span><a href="http://www.google.com/webmasters/tools/"><span>Google Webmaster Tools</span></a><span> and add your blogspot url as a new site. Then go to Sitemaps, Add Sitemap, select Add General Web Sitemap and type atom.xml in step 3 (ignore steps 1 and 2).<br /><br /></span><span>Good place to check</span> is <span><a href="http://www.google.com/webmasters/">Google Webmaster Central</a> and <a href="http://blogging.nitecruzr.net/2007/07/what-is-my-blog-site-feed.html">one more</a> about blog feeds and <a href="http://help.blogger.com/bin/answer.py?answer=55373">yet nother one</a> about using custom domain.<br /></span>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com0tag:blogger.com,1999:blog-4917084284644875913.post-60010378996433477122008-11-12T23:33:00.010+11:002008-11-17T01:44:47.857+11:00CentOS 5.2 - my desktop configuration<span style="font-size:100%;">Normally I use Fedora for desktop, but this time I tried something a bit different<br /><br />Started with kickstart that I previously put together to install headless server and then I installed gnome and the rest.<br /><br /><b>Gnome</b><i><br /></i><span style="font-family:arial;">yum groupinstall 'X Window System' 'GNOME Desktop Environment'</span><br /># if get error:" 0002483: nautilus-sendto requires a non-existent libgaim.so.0" do<br />http://bugs.centos.org/view.php?id=2483<br /><span style="font-family:arial;">wget </span><a style="font-family: arial;" href="http://mirror.centos.org/centos/5/os/i386/CentOS/nautilus-sendto-0.7-5.fc6.i386.rpm">http://mirror.centos.org/centos/5/os/i386/CentOS/nautilus-sendto-0.7-5.fc6.i386.rpm</a><br /><span style="font-family:arial;">rpm -Uvh --nodeps nautilus-sendto-0.7-5.fc6.i386.rpm</span><br /><br /><br /><span style="font-weight: bold;">Display</span><br />It was a nightmare </span><span style="font-size:100%;">to set up the correct resolution</span><span style="font-size:100%;">. First I was trying to find correct setting for my monitor on internet and manually edit xorg.conf, but had no luck. Then I was just fiddling with System/Preferences/Screen Resolution and System/Administration/System and the follwing commands till I got it right, but can't say what made it work.<br /><br /><span style="font-family:arial;">system-config-display --reconfig</span><br /><span style="font-family:arial;">Xorg -configure</span><br /><span style="font-family:arial;">xinit</span><br /><br />The resulting config looks like this:<br /><b style="font-size: 24px; line-height: 30px;"><br /></b><span style="font-family:arial;">cat /etc/X11/xorg.conf</span><br /></span><span style="font-size:100%;"><span style="font-family:arial;"># Xorg configuration created by system-config-display</span><br /><br /><span style="font-family:arial;">Section "ServerLayout"</span><br /><span style="font-family:arial;"> Identifier "single head configuration"</span><br /><span style="font-family:arial;"> Screen 0 "Screen0" 0 0</span><br /><span style="font-family:arial;"> InputDevice "Keyboard0" "CoreKeyboard"</span><br /><span style="font-family:arial;">EndSection</span><br /><br /><span style="font-family:arial;">Section "InputDevice"</span><br /><span style="font-family:arial;"> Identifier "Keyboard0"</span><br /><span style="font-family:arial;"> Driver "kbd"</span><br /><span style="font-family:arial;"> Option "XkbModel" "pc105"</span><br /><span style="font-family:arial;"> Option "XkbLayout" "us"</span><br /><span style="font-family:arial;">EndSection</span><br /><br /><span style="font-family:arial;">Section "Monitor"</span><br /><span style="font-family:arial;"> Identifier "Monitor0"</span><br /><span style="font-family:arial;"> ModelName "LCD Panel 1680x1050"</span><br /><span style="font-family:arial;"> HorizSync 31.5 - 65.5</span><br /><span style="font-family:arial;"> VertRefresh 56.0 - 65.0</span><br /><span style="font-family:arial;"> Option "dpms"</span><br /><span style="font-family:arial;">EndSection</span><br /><br /><span style="font-family:arial;">Section "Device"</span><br /><span style="font-family:arial;"> Identifier "Videocard0"</span><br /><span style="font-family:arial;"> Driver "nv"</span><br /><span style="font-family:arial;">EndSection</span><br /><br /><span style="font-family:arial;">Section "Screen"</span><br /><span style="font-family:arial;"> Identifier "Screen0"</span><br /><span style="font-family:arial;"> Device "Videocard0"</span><br /><span style="font-family:arial;"> Monitor "Monitor0"</span><br /><span style="font-family:arial;"> DefaultDepth 24</span><br /><span style="font-family:arial;"> SubSection "Display"</span><br /><span style="font-family:arial;"> Viewport 0 0</span><br /><span style="font-family:arial;"> Depth 24</span><br /><span style="font-family:arial;"> EndSubSection</span><br /><span style="font-family:arial;">EndSection</span><br /><br />Now, when looking at the first line of the file above, it seems that<br /></span><span style="font-size:100%;"><span style="font-family:arial;">system-config-display --reconfig</span><br />made it work.<br /></span><span style="font-size:100%;"><br /><br /><b>USB Mouse & Keyboard</b><i><br /></i>This was another issue that gave me hard time, but this time it was of my own making. I forgot that I purposely disabled USB support in kickstart with this line:<br /><span style="font-family:arial;">bootloader --location=mbr --append="nousb enforcing=0"</span><br /><br />Worked that out from startup log:<br /><br /><span style="font-family:arial;">dmesg | grep usb</span><br />#got message: "usbcore: USB support disabled"<br /><br /><span style="font-family:arial;">vim /boot/grub/grub.conf</span><br /># and remove nousb to get USB working<br /><br /><b>PgAdmin<br /></b>Install DAG repo from<b><br /></b>http://dag.wieers.com/rpm/FAQ.php#B<br />then<br /><span style="font-family:arial;">yum install pgadmin3</span><br /><br /><span style="font-weight: bold;">Firefox Flash plugin</span><br />download yum repo rpm from adobe.com and then run<br /><span style="font-family:arial;">yum install flash-plugin</span><br /><br /><b>Firefox Java plugin</b><br />http://it.megocollector.com/?p=832<br /><span style="font-family:arial;">cd /usr/lib/mozilla/plugins</span><br /><span style="font-family:arial;">ls -s /usr/java/jre1.6.0_10/plugin/i386/ns7/libjavaplugin_oji.so ibjavaplugin_oji.so</span><b><br /></b># java location might differ, see what's in /usr/java folder<b><br /><br />gnome-do and deskbar-applet<br /></b>They look fancy, but in the end, alt+F2 might be good enough for me.<br /><br />gnome-do : activate with Win+space<br />http://rpm.pbone.net/index.php3/stat/4/idpl/9221111/com/gnome-do-0.4.2.0-1.el5.kb.i386.rpm.html<br /><br />deskbar applet : activate with alt+F3<br />http://rpm.pbone.net/index.php3/stat/4/idpl/4838900/com/deskbar-applet-2.17.2-3.el5.rf.i386.rpm.html<br /><br /></span>Finally, xterm's gray background makes me sad.<br /><span style="color: rgb(153, 0, 0);font-family:arial;" >echo 'XTerm*background: white' >> /etc/X11/Xresources</span><span style="font-size:100%;"><br /></span>Aleš Lichnerhttp://www.blogger.com/profile/16267994428822303350noreply@blogger.com0