Thursday, May 19, 2011

Finding shutter actuations on your Canon DSLR


I used gphoto2 on Linux, actual command is:

gphoto2 --get-config /main/status/shuttercounter

connect your camera to USB on computer and run this :)

Monday, April 18, 2011

Kindle Collections

It is frustrating to manage those hundreds of books on Kindle into collections by moving them one-by-one. I might try this soon and see if it works.

Monday, March 15, 2010

Friday, August 28, 2009

ATI Mobility Radeon HD 3470 for Ubuntu 9.04?

I am looking to make this card work with Ubuntu 9.04 and could not find any relevant articles with steps to make this work. ATI does seem to have a driver for this card, but it freezes up my box (32 bit) :(

I will update this article if I can figure this out.

Wednesday, July 29, 2009

Combine Multiple PDFs into one in Linux

Don't you love the way Linux has evolved. I needed to combine few pdf files into one and was looking for a pdfedit kind of thing with capabilities for combining multiple pdfs and this guy from Ubuntu Geek provides the steps clearly.

sudo apt-get install gs pdftk

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE= -dBATCH ...

Simple, isn't it!

Saturday, February 07, 2009

Playing mp3 from command line using MPlayer

I have been looking for a command line tool to play my music on the remotely connected machine (yeah it's my mythtv box and I usually just ssh to it and have my speakers connected to it).

This is how you can do it if you are looking to play all the mp3 files in that directory:

> mplayer dir *.mp3

Simple as that!

Also, you could use the "-loop 0" to repeat the song/playlist forever :)

> mplayer -loop 0 filename.mp3

Of course you may want to wait for my new project MuTruss to do more exhaustive search and then create your own playlists. But till it comes live, you have to just use plain old wild cards :)

Have fun!

Friday, January 30, 2009

Dual monitors on Ubuntu 8.10

I specified the Ubuntu version because it may change your experience. And for the record, I love this new version so far.

From command line:

1. First backup your xorg.conf file
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.back

2. Install Nvidia-glx using the following command 
# sudo apt-get install nvidia-glx

3. Now edit the xorg.conf file as follows
Under the module section, replace “nv” with “glx”. Under the device heading, make sure that Driver says “nvidia”. Under the screen section, add the following line:

Option “RenderAccel” “true”.

4. Save the file and Reload X by hitting Ctrl+Alt+Backspace.

5. If that works fine, open and edit the xorg.conf file, go to the section "Screen" and add the following
# Turn on NVidia’s TwinView
Option “TwinView”
# Set the resolution for both monitors
Option “MetaModes” “1280×1024 1280×1024″

6. Save the file and Reload X by hitting Ctrl+Alt+Backspace.

7. If the orientation is off, add the following under the screen settings
Option “TwinViewOrientation” “LeftOf”

Another way to do this is using: gksudo nvidia-settings

Using the GUI tool:

This has to be the easiest task in the world! Go to Settings -> nvidia settings and do the stuff old fashioned "Windows" way :)

Tuesday, March 18, 2008

Mounting Windows Shares In Ubuntu

I have been looking for a permanent solution to annoying ways to mount a Windows share on my Ubuntu box and this reference comes handy:

Reference: http://note2.industriousone.com/mounting-windows-shares-ubuntu

More specifically the steps are:

1. create a mount in your /mnt folder

$ sudo mkdir /mnt/mount_point

2. create the following entry in your /etc/fstab file

//windows_share/specific_folder /mnt/mount_point cifs exec,credentials=/etc/cifspw 0 0

3. Create a password file /etc/cifspw with the login credentials for your Windows account.

username=MyUser
password=MyPassword

4. Secure the password file
$ sudo chmod 600 /etc/cifspw

5. Run this command to get the mount

$ sudo mount -a

Be a happy child.

Monday, February 25, 2008

Error Message: "Access Is Denied" When You Try to Open NTFS File System Folders

I connected am external HDD to my laptop which was previously used with another installation of windows and surprising got this error for almost all the folders:
Access Denied
After spending an hour or so I figured out the solution which is:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B823306

Saturday, December 22, 2007

Finding the version number of your Ubuntu

$ cat /etc/lsb-release

OR

$ lsb_release -a

Friday, August 17, 2007

Creating playlists for mplayer

$ find music_folder_name -name "*.mp3" -print > output_playlistname

NOTE: mp3 or any other media extension which mplayer can play should be specified.

$ mplayer -playlist
output_playlistname

Enjoy

Sunday, July 29, 2007

gtkpod for Podcasts

I found this weird thing with gtkpod (gtkpod-aac as well), that it cannot properly transfer the podcasts in (mp4 format) to my iPod. It shows it transfered but I cannot see it in my iPod. I also tried to get hpodder to work, but it didn't. Why are certain things in Linux so complicated while they should be simpler. I know we keep blaming the h/w vendors for not releasing the specs so that we can build software to work with it, but it seems there are a lot of apps which support iPod connectivity including podcasts. I may have to go the Rockbox way, which is not necessarily a bad thing, but I am not comfortable keep switching my iPod software to make things work.

Wednesday, May 09, 2007

Deleting services from Windows XP

# sc delete

Help page:

DESCRIPTION:
SC is a command line program used for communicating with the
NT Service Controller and services.
USAGE:
sc [command] [service name] ...

The option has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]"
Commands:
query-----------Queries the status for a service, or
enumerates the status for types of services.
queryex---------Queries the extended status for a service, or
enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

The following commands don't require a service name:
sc

Friday, April 13, 2007

Uninstalling Cygwin from Windows

ref: http://cygwin.com/ml/cygwin/2004-06/msg00964.html

To uninstall Cygwin you have to:

rmdir /s /q C:\cygwin
regedit -s rmcygwin.reg

[rmcygwin.reg]
REGEDIT4

[-HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions]
[-HKEY_CURRENT_USER\Software\Cygnus Solutions]

Disabling AutoPlay in Windows XP Professional

ref: http://answers.yahoo.com/question/index?qid=1005112800135

Start > Run > gpedit.msc
(Left Pane) Computerer Configuration > Administrative Templates > System
(Right Pane) Set "Turn off autoplay" to "Enabled"

Saturday, June 10, 2006

gcc vs. g++: compiler issues

The GCC package contains compilers for several different languages. The extension on the source-file determines which language the compiler will recognise, but the name that you use to invoke the compiler will determine which libraries will be included by default.

With the .cpp extension, your source file will be compiled as a C++
source file. But, by using the name gcc to call the compiler, you are effectively saying that you only need the C libraries. To get the C++ libraries, you should use the name g++: g++ -o test test.cpp