My laptop’s power pack is broken. Gave it to a repair place, but there’s little hope. A new one would cost at least 3.5k. 🙁
So I move to the desktop computer which the others of the family use. It’s evil, it runs Windows XP.
First, you have to manually open an app and connect to the internet, while Ubuntu automatically connects once plugged in.
Once connected, it started downloading something. I was baffled for some time until I found out it was updating the antivirus. Antivirus! And you don’t have multiple workspaces to work in.
For the work I was going to do, I wanted to keep an instance of Notepad always on top. But apparently there’s no option when you right click on the title bar.
I turned off the computer and wrote this blog post from the phone.
Category Archives: Uncategorized
The $0.99 earphone
I ordered an earphone (the one in pic) last week from ebay, which was priced at $0.99 (free shipping). And I received it just seven days later nicely packaged in a big envelop. It looks just like as was advertised, has quite good sound quality, and no defects to be seen.
Well, the factory cost of the earphone would be less than $0.99. But it would obviously cost more than $0.99 to send a package like that from Hong Kong to Sri Lanka, right? Or am I wrong?
Getting rid of distracting thoughts
We’re always distracted by our own thoughts.
Suppose you’re reading a book. Suddenly you might want to check the twitter stream. Or you might want to check out Wikipedia for a singer you love. Then you’ll notice that you’ve received some emails and want to reply them, or, worse, follow the links in them. This line of distractions is endless.
One of the simplest methods to avoid distractions is to write them down. When you’re doing something, have a small text editor opened in the background. Write in all the thoughts that come to you in it. This will prevent these thoughts from staying in your mind and getting stronger so that you’ll no more be able to resist.
Here’s an example text I wrote today while reading a book:
check today’s quotables
wikinews new messages?
check wiki abt trip hop
that fb app
mmmmmmm
sigh
the last of the mohicans
fix the bicycle wheel
spanner?
zombie 😀
google reader greader
task – The best to-do list manager ever
task is a console-based to-do list manager with facilities to do everything you can imagine with the lists. As a student I’ve used dozens of to-do list managers and have never come across a better application.
The fact that this is console-based can be daunting to some, but believe me, getting used to task is a piece of cake.
In Ubuntu, you can install task by running
sudo apt-get install task
To add a task, run
task add Buy soap
To view the task list, run
task ls
To mark the first task as done, run
task 1 done
All other tasks are similarly simple. You can duplicate, prioritize, manage in projects, tag, modify and annotate tasks. For a more comprehensive tutorial check the Taskwarrior site.
How to search for porn with no porn results – Blekko
You heard it right, search for porn with no porn results. That’s one thing the newest search engine in the town can do. Ladies and gentlemen, say hi to Blekko.
Blekko introduces us a new concept called slashtags that filters the search results and comes up with only the ones we’re interested in. For example using the slashtag /chess will show up results from only the sites associated with chess. If you want to search for porn in sites which don’t have adult content, search porn /noporn.
http://blekko.com/ws/porn+/noporn
Blekko says the sites for the built-in slashtags are carefully chosen by humans. And users can built their own slashtags too. The quality of the search results are still far behind Google, of course, but Blekko deserves giving a try.
Installing Xilinx in Linux
Xilinx is the most widely used FPGA simulator available and can be installed in multiple platforms. Here’s how I installed it in my linux system which runs Ubuntu 10.10.
In the Xilinx folder, select the archive that contains the ISE data and extract it. In my case it was named ise_SFD.tar
Open up a terminal, go to the extracted directory and type:
sudo ./setup
A installer will open and follow the simple instructions given. The install takes up more than 5GB in the drive. After the setup is completed, go to the ISE directory inside the installation directory and enter the following command in the terminal:
. settings32.sh
Notice the space after the first dot and the letter s. Now you’re ready to run the ISE. Just enter the following command:
ise &
This should start the ISE. However you’ll have to run the above two commands in order to start ISE each time. What I did was to write a bash script with the two commands above and gave it executable rights with chmod.
Good luck!
Quick view PDFs in your browser
There’s news that Chrome is going to get its own PDF viewer. Yes, opening PDFs in Chrome has always been a real pain in the ass. But there’s always been better alternatives to opening the PDFs in your browser.
In the google search page, simply click on the Quick View button and the PDFs are rendered in an HTML-like format. This won’t load the actual PDFs, but for most of our day-to-day needs and previewing the PDFs, Quick View serves just fine.
A sudden "Desktop effects could not be enabled" problem in Ubuntu 10.10
UPDATE: If you ran into the “desktop effects could not be enabled” error, try one of the following:
- Check if you have installed the recommended drivers for your video card in System -> Administration -> Additional Drivers
- In case of NVidia cards, install the latest driver as showin in this post
- Remove any theme-related software you installed recently. Eg: compositing managers, themes
- Install the compiz-fusion-plugins-extra package
- Try the command: compiz –replace
- Completely remove all the compiz stuff and reinstall
- Try this: http://ubuntuforums.org/showpost.php?p=9212078&postcount=10
- Install Ubuntu Tweak
The above are some of the methods different people around the world have solved the issue. But there’s no guarantee these may work for you.
When I switched on the laptop today evening I had no idea that I was in for a shock. All the desktop effects had gone; the desktop cube nowhere to be seen; no animations or effect whatsoever; and docky reports some compositing problem.
Then I go to my Appearance Preferences and find out that Visual Effects option has been set to None. Trying to change it resulted in the age-old problem: “Desktop effects could not be enabled”.
I do some googling and find out that I’m not alone and there’s an easy remedy, too. Just go to the Package Cleaner in Ubuntu Tweak, click Purge PPAs and purge the Compiz package out of the list. And everything’s back to normal.
No, wait. Not everything. I had once installed the extra compiz plugins package which added some cool new effects, and it’s gone missing. Apparently this and the update I did in the last boot has resulted this.
And later found out that it was actually the update that messed up the things. All you have to do is to go back to the previous version.
Saving a video into a sequence of images
I wanted to create a GIF out of a part of a video sequence. But how could one extract a sequence of images from a video? After some googling FFMPEG turned out to be the savior. Here’s a sample command for taking a series of snapshots out of a video using ffmpeg:
ffmpeg -ss 23 -i kids.mp4 -f image2 -vframes 50 a%2d.jpg
23 is the position in the video to start extracting images (in seconds). kids.mp4 is the input video file. image2 says that the output would be in JPEG format. 50 is the number of frames to capture. a%2d.jpg is the format of the output file, i.e. in this case the files would be saved as a01.jpg, a02.jpg, etc.
The next step would be to convert the sequence of images to a GIF, which can be easily done using GIMP.
Installing Matlab 2008a on Ubuntu 10.10
Update: This method also worked in Ubuntu 11.04.
So I successfully installed Matlab on Ubuntu after much ado. Here’s how I did it.
First mount the matlab ISO:
sudo mkdir /media/matlab
sudo mount matu2k8a.iso /media/matlab/ -t iso9660 -o loop
Create a base directory for Matlab manually:
sudo mkdir /usr/local/matlab
Go to where the ISO is mounted and run the installer:
sudo ./install
Give the path of the directory we’ve already created for the Matlab base directory. Give the serial key and the license file when prompted.
After the setup is completed, don’t start Matlab. Create a .matlab directory in your home and give user permissions.
mkdir ~/.matlab
sudo chown -R ${USER}:${USER} ~/.matlab
Done! Now you can run Matlab using the command:
sh /usr/local/matlab/bin/matlab
You can of course add a shortcut to your main menu.
EDIT: When you’re adding a shortcut to the main menu or desktop, add the “-desktop” option (without quotes) at the end of the command, otherwise only the popup screen will be displayed.