Tuesday, July 19, 2011

Installing ecb on Ubuntu Natty

OS: Ubuntu 11.04 Natty Narwhal
Kernel: 2.6.39-02063901-generic
Date: July 19th 2011

 Few days back I came across ecb (emacs code browser), really neat tool if you want to manage bigger project. However if you try to install ecb (ohh yes its in repository) there will be errors for dependencies, now the problem is these dependencies are not available in repository. Why so? Well, all these dependencies are part of Emacs however ecb (which is available in repository) doesn't seem to know about them. Check here.
 ecb development team seems to know the issue so they are probably providing support till next release however if you are willing to have it right away then follow further:


  •  Get current snapshot of ecb from CVS link.
  •  Extract it to any folder of your choice. 
  •  Create or Open ~/.emacs for editing.
  •  vi ~/.emacs
  •  Add following line to .emacs
  •  add-to-list 'load-path "/path/to/installation/directory/ecb-snap")
  • (require 'ecb) 
  • Re/Start emacs.
  • M-x ecb-activate would activate project management features.


 While playing around with ecb I came across two other good packages which are worth mentioning:
 color-theme to have different color schemes for editing as per your liking, here is one I liked.
 verilog-mode to support verilog keywords and coding style.
 And many more .emacs manipulations.

Got a tip from: http://stackoverflow.com/questions/3134026/emacs-23-2-with-ecb-2-40-file-error-cannot-open-load-file-semantic-ctxt

Saturday, April 16, 2011

Error 403 "Access Denied/Forbidden"

OS: Ubuntu 10.04 Lucid Lynx
Kernel: 2.6.32-30-generic-pae
Date: Few days back :P

Its been very very long,
 Anyways so I've a server in my balcony hosting my tiny website -- personal pages.
 The other day while my friend wanted to grab a pdf from there and hit an error "Error 403 "Access Denied/Forbidden".
 I was baffled as I could browse to the file on terminal. Apparently as it seems fix was quite easy as follow:
 Instead of trying to change httpd.conf or any other conf files for apache/apache2 this one is easier :)

 Considering directory structure: .../test/example.pdf and assuming you are in proper directories

 chmod +r in my case chmod +r example.pdf
 chmod +x in my case chmod +x test 

That should fix it :)

Thursday, December 30, 2010

adb not detecting adroid device

OS: Ubuntu 10.04 Lucid Lynx
Kernel: 2.6.32.26-generic
Date: December 30th, 2010

 I'm sure there must be tons of posts on this particular issue, however I had hard time finding solution so here it is.
 I got my android phone and can't be happier well after first few days wanted to tinker with it, so I got an android SDK extracted and ran android from tools directory to pull all required features. Then time to enter few udev rules so the USB device can be detected (consider it as installing drivers in windows system) Developer page explains how-to and provides Vendor-IDs for each device.

for e.g. I've Samsung Epic 4g and command lsusb provides following output

  • lsusb:
  • Bus 002 Device 006: ID 04e8:681c Samsung Electronics Co., Ltd
  • 04e8 is my vendor ID
however even after following all directions for adb devices output is
  • adb devices
  • List of devices attached 
          ???????????? no permissions

 which is not very helpful
so the workaround is starting adb server with super user permissions. as follows:
  • adb kill-server
  • sudo adb start-server
and then 
  • adb devices
  • List of devices attached 
          D70029974153 device
    yey I got it detected and working

    Wednesday, December 29, 2010

    Converting RAW Nikon camera files to jpg

    OS: Ubuntu 10.04 Lucid Lynx
    Kernel: 2.6.32.26-generic
    Date: December 29th, 2010

    Hi everyone,
     If you are wondering how to convert raw image files from Nikon cameras to jpg files, then here is a trick.

    •  Install ufraw sudo apt-get install ufraw
    • ufraw or ufraw gimp plugin can be used to manipulate the image, however just for conversion,
    • convert [filename].NEF [filename].jpg is sufficient
    I've not tested it on raw files by any other camera but I assume it should work as long as raw file format is supported by ufraw

    Saturday, September 4, 2010

    Ubuntu detecting less RAM

    OS: Ubuntu 10.04 Lucid Lynx
    Kernel: 2.6.32-24-generic and 2.6.32-24-generic-pae
    Date: Sept 4th, 2010

    Hey everyone,
     We bought new 2gig RAMs (2 modules) for my room mates laptop, we were pretty excited. BIOS detected it well, however Ubuntu showed up with 2.92GB RAM, even if he had shared video memory it would never be 1GB.
     So I looked around and found out that if you are using 32 bit OS over 64 bit hardware (processor), Generic kernel can't detect any more than 3GB of RAM.
     So solution for using 4GB RAM (more than 3GB) is to have 64 bit OS for 64 bit hardware or else use PAE kernel instead of generic.
    • Just search for PAE kernel in synaptic and install proper kernel package, restart the computer and you are good to go 
    Enjoy

    This solution was posted at: http://ubuntuforums.org/showthread.php?t=1402138 last checked Sept 4th, 2010

    Thursday, August 19, 2010

    Acrobat Read out Loud

    OS: Ubuntu 10.04 Lucid Lynx
    Kernel: 2.6.32.42-generic
    Date: August 19th, 2010

    Hi,
     I need to read through a lot of pdfs or papers and if its a day long reading on computer screen, it gets pretty annoying and stressful for eyes after a while. So I've been looking for 'Acrobat Read Out Loud' like feature. Unfortunately I couldn't find anything out there and Acrobat read out loud wasn't working out of the box.
     So here is how I get it working:

    • Install eSpeak speech engine
    • Install libgnome-speech7
    • Install libgnome-speech-dev
    • At this point you may need to restart, I am saying "may" because I rebooted computer and don't know what would be result without reboot
    • Open Acrobat Reader -> Edit -> Preferences -> Reading -> Driver Choose espeak, I tried festival and failed, 
    • I'm currently looking for more voices, I don't like robot-like voice but its good as for now.
    • Extra: If you like to continue reading from last point, you may want to check Edit -> preferences -> Documents -> Restore Last View ......
    Hope this helps you,

    Friday, June 11, 2010

    Complete installation of Xilinx ISE suite

    OS: Ubuntu 10.04 Lucid Lynx
    Kernel: 2.6.31.22 - generic
    Date: June 11th, 2010
     
    Installing ISE is probably pretty simple but I found getting every aspect working is bit of a work
     So here is procedure which I followed and got everything to work as per my requirements.

     Some prerequisites and heads ups are:
    • I used iso image of Xilinx ISE (i.e. I didn't try webinstall) and if you want to use cd/dvd there is particular way to mount it, you will have to check about it.
    • My installation directory is /media/WorkSpace/Xilinx (default is /opt/Xilinx). Here I'll assume /path/to/installation/folder/Xilinx
    • On windows machine (or probably other linuxes as well) path for ISE components is /path/to/installation/folder/Xilinx/10.1/ however I found it to be simply /path/to/installation/folder/Xilinx so if you find any path mismatch please correct it according to your requirements.
    • My system is 32-bit and I used 10.1 version of Xilinx ISE so the guide suppose to work with them.
    I suppose thats all for now will add if I remember something else or if I get a feedback asking for something

    Now procedure to get it installed:
    • Mount iso image in home directory under some folder (or anywhere where use have full rights else installation will fail).
    • Open termianl then cd to image mounted folder and run setup script (./setup).
    • Follow the steps to complete installation. Write down installation path somewhere, even Xilinx installation window shows all paths, you can copy and paste those to some text file or write them down on a paper.
    • Assuming installation competed successfully, here are steps just to start ISE with a single command (I called it startise, you can call whatever you feel like).
    • echo "export DISPLAY=:0 >> /path/to/installation/folder/Xilinx/ISE/settings32.sh
    • echo "exec ise" >> /path/to/installation/folder/Xilinx/ISE/settings32.sh
    • chmod +x /path/to/installation/folder/Xilinx/ISE/settings32.sh Now you can run ISE from this particular settings32.sh however for system wide access use following command
    • sudo cp /path/to/installation/folder/Xilinx/ISE/settings32.sh /usr/local/bin/startise (You can replace startise by whatever name you like)

    Well thats installation and starting ISE however if you have noticed chipscope, xps and some other compatible programs will not just work.
    Follow the steps to setup your environment. Again my installation folder is /media/WorkSpace/Xilinx, Here we are using path/to/installation/folder/Xilinx
    I setup environment as I need it (through a simple shell script), however uf you want, you can just add these lines to .bashrc (in home folder) so as to get it setup on startup
    • export PLATFORM=lin
    • export XILINX=/path/to/installation/folder/XILINX/ISE for e.g. export XILINX=/media/WorkSpace/Xilinx/ISE
    • export XILINX_EDK=/path/to/installation/folder/XILINX/EDK
    • export CHIPSCOPE=/path/to/installation/folder/XILINX/ChipScope
    • export XILINX_PLANAHEAD=/path/to/installation/folder/Xilinx/PlanAhead
    • export PATH=$PATH:${XILINX}/bin/${PLATFORM}:${XILINX_EDK}/lib/${PLATFORM}:${CHIPSCOPE}/bin/${PLATFORM}: ${XILINX_PLANAHEAD}/bin/${PLATFORM}
    • export LD_LIBRARY_PATH=${XILINX}/lib/${PLATFORM}:${XILINX_EDK}/lib/${PLATFORM}:${CHIPSCOPE}/lib/${PLATFORM}: ${CHIPSCOPE}/xilinx/lib/${PLATFORM}:${XILINX_PLANAHEAD}/lib/${PLATFORM}
    • Thats seems enough for getting everything running (not sure if Xilinx have any more features).
    • Probably the last piece of installation is to get programming USB cable working:
    • Prerequisites, Install following programs:
    • sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev fxload
    • I would assume you want USB drivers to be at /path/to/USB/driver/folder for e.g. /media/WorkSpace/Xilinx/ in my case and get USB drivers lib
    • git clone git://git.zerfleddert.de/usb-driver
    • Compiling USB drivers:
    • cd /path/to/USB/driver/folder/usb-driver
    • make
    • Now you need to link these compiled drivers with impact tool. This step can be added to setting up environment step (script or .bashrc)
    • export LD_PRELOAD=/path/to/USB/driver/folder/usb-driver/libusb-driver.so
    At this point USB driver installation and linking is done, however you will still need to add few tweaks to make it work without giving an error for root user.
    Basically we need to copy /path/to/installation/folder/Xininx/ISE/bin/lin/xusbdfwu.rules to /etc/udev/rules.d with proper name and by replacing TEMPNODE by tempnode however procedure is as follows (I didn't just copy pasted it but went through procedure you can try it the other way).
    • sudo sed /path/to/installation/folder/Xilinx/ISE/bin/lin/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' > /etc/udev/rules.d/50-xusbdfwu.rules
    • I used 50-xusbdfwu.rules as a new name to maintain consistency with naming convention in rules.d directory, however I suppose any name would be fine.
    • sudo cp /path/to/installation/folder/Xilinx/ISE/bin/lin/xusb*.hex /usr/share
    • sudo /etc/init.d/udev restart
    • If you do lsusb after connecting powered ON board through a USB cable, lsusb should show Vendor id as 03fd and product id as 0008 for Xilinx cable (This one didn't work for me right away I needed to Restart my machine)
    After install steps:
    Xilinx complains about missing gmake utility while compiling hardware, simply add soft link to make to get it working
    • sudo ln -s /usr/bin/make /usr/bin/gmake

    As you can see it was pretty lengthy process and I needed quite a while to get everything working. Along the way I found many tutorials and to-do's, I'm really thankful to all of them for taking efforts, all links I followed are mostly listed at the end of this page. I'm sure I must have missed some pieces, if you find any missing link in this guide please mail me, I'll try to solve it at my best

    Links followed (Last Checked June 5th 2010):
    http://www.george-smart.co.uk/wiki/Xilinx_JTAG_Linux
    http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/03/msg00101.html
    http://forums.xilinx.com/t5/EDK-and-Platform-Studio/EDK-10-1-sp3-Ubuntu-8-10/m-p/27344
    http://ubuntuforums.org/showthread.php?t=255573
    http://heilubuntu.blogspot.com/search?q=xilinx
    http://www.xilinx.com/support/answers/11630.htm

    Thats all for Xilinx installation.

    Few Notes

    Hey,
     Its Summer again :) Got some time to document my struggle with Xilinx and got my site up and running.
     So from now on most of the posts which appear here will be available at: ubuntu section of my website.

     Another news: Blogger came up with new layouts, yippie. That means you will have to put up with periodically changing blog design -- Sorry about that in advance.
     
    Anyway enjoy.

    Thursday, May 20, 2010

    Upgrade Issue (Especially for someone using edgers ppa), Broken upgrade

    OS: Ubuntu 10.04 Lucid Lynx
    Kernel: 2.6.31.22 - generic
    Date: May 29th, 2010

    Hey guys,
    I was pretty excited about 10.04 and new social networking support. I wanted to get it as soon as possible but alas I couldn't here is an error which I received:

    An unresolvable problem occurred while calculating the upgrade:
    E:Unable to correct problems, you have held broken packages.

    This can be caused by:
    * Upgrading to a pre-release version of Ubuntu
    * Running the current pre-release version of Ubuntu
    * Unofficial software packages not provided by Ubuntu

    If none of this applies, then please report this bug against the
    'update-manager' package and include the files in
    /var/log/dist-upgrade/ in the bug report.


    Restoring original system state

    Looking around a little I came to know its an issue with third party softwares. 
    So there was option of clean upgrade where I was supposed to remove all third party softwares which included edgers driver for x server (if you have followed previous post about installing drivers for 3D games) and in term UI and all. Which is really scary :s.

     Luckily I found a roundabout way to do it, Here are steps:
     
    Deactivate all third party repositories:
    •  System --> Administration --> Software Sources --> Other Software
    Untick all repositories --> Close.

    If you have already executed update to new distribution:
    cd to /var/log/dist-update then cd to latest directory (for each upgraded try there will be a directory created with date as its name)
    • cat main.log 
    Around the end of this file - main.log you will see conflicting repository (mostly xorg repository)
    Look for packages related to this repository in synaptic
    • Select package --> Package (tab) --> Force Version and force it to downgrade to package available in Ubuntu repository

    Now you are set to go retry upgrade and it should work without any issue at all :) 

    Have fun hope that works for you as well.
    This solution was posted at : http://ubuntuforums.org/showthread.php?t=1488156 last checked May 20th, 2010

    Saturday, May 8, 2010

    Upgrade to 10.04

    Hi Everyone,
     This one is not much of a work around but a stumbling stone.
     So I explained adding edgers-ppa for Video driver in one of previous posts, however it turns out that third party installations are preventing me to upgrade to 10.04 Lucid. My speculation is edgers-ppa as other third party softwares shouldn't really cause any issue for upgrade. I will still try one method mentioned at (https://help.ubuntu.com/community/CleanUpgrade) but it can wait till I finish up with my finals.
     I don't really think anyone is following here to get the solution but if you are then put a comment if you are upto trying the link mentioned.
    Regards :)