Showing posts with label tricks and tips. Show all posts
Showing posts with label tricks and tips. Show all posts

Tuesday 18 June 2013

Setting Installation Of Android Application To SD Card

Well this is old stuff and several applications with much more functionalities are probably out in the play store but just decided to post it here because it proved useful while playing with older android OS.

Follow the steps below to enable installation of new softwares to the SD card on the android phones by default (Tested on android 2.2).
  • Enable USB debugging on phone (from somewhere in Settings->About Phone)
  • Connect device with PC using USB cable
  • Open command prompt/terminal
  • Open android debugger bridge (change directory to the location where android sdk is installed)
  • Type: adb.exe devices
  • Type: adb.exe shell
  • On the new console, type: set pmInstallLocation 2
    Here, 2 means External memory

Note: "get pmInstallLocation" can be used to query for the available locations you can install softwares to.

That's all. Hope it helps :)


Read more...

Tuesday 2 April 2013

Step By Step Turbo C++ IDE In Ubuntu 12.04

Well we are doing our labs based on the traditional Turbo C++ IDE and I decided to write this blog post with the information on how I installed it on my Ubuntu box.

First thing first, download Turbo C from internet. For your ease, I've uploaded it HERE.

We will have to install dosbox to run the windows dos mode applications so lets install it:

samar@samar-Techgaun:~$ sudo apt-get install dosbox


Once you install dosbox, unzip the content to somewhere in your $HOME directory. In my example, I unzipped the content of the Turbo C zip file into ~/Tools/TurboC3/. Now launch the dosbox by typing dosbox in the terminal. A dosbox emulation window will appear which will look like your old DOS system.

In the window, type the following (make sure you type appropriate path for your installation):

mount C: ~/Tools/
C:
cd TurboC3
INSTALL.EXE


And, then follow the on-screen information. Refer to the screenshots below:















Once the installation finishes, you can then run the Turbo C by mounting the drive again and then navigation to C:\TC (cd C:\TC\BIN). If you need to use the Turbo C++ IDE frequently, my suggestion would be to add an autoexec entry in your dosbox configuration. The default configuration file resides in ~/.dosbox/dosbox-0.74.conf (My version of dosbox is 0.74 hence the file name, by default). Open up this file and in the section of [autoexec], add the lines below:

[autoexec]
mount C: ~/Tools/
C:
cd TC\BIN
TC.EXE


Adding this entry will run the above commands during the startup of dosbox thus giving you the Turbo C IDE interface directly on running dosbox.

I hope this helps :)


Read more...

Saturday 9 March 2013

Check Battery Status From Terminal [How To]

Since I had no graphical interface for some reason, I needed some alternative way to check the battery status. If your system includes acpi command, you can just use this command but I had no luxury of such command and here's how you can do the same thing I did. The /proc/ virtual file system has information of different states among which the ACPI information is one. The ACPI information provides us the details of device configurations and power status of the system. Below is one flavor of the command to check the battery status:

samar@Techgaun:~$ cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: unknown
remaining capacity: unknown
present voltage: 12276 mV

samar@Techgaun:~$ cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 4400 mAh
last full capacity: unknown
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 250 mAh
design capacity low: 150 mAh
cycle count: 0
capacity granularity 1: 10 mAh
capacity granularity 2: 25 mAh
model number: Primary
serial number:
battery type: LION
OEM info: Hewlett-Packard


The first command provides the general status of the battery and the second command provides the detailed information about battery. The other way is to use the upower command that talks with the upowerd daemon. Upowerd daemon is a default daemon in ubuntu and few others for power statistics. Below is the command to see battery details:

samar@Techgaun:~$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Sat Mar 9 10:12:17 2013 (5 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: empty
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 47.52 Wh
energy-full-design: 47.52 Wh
energy-rate: 0 W
voltage: 12.28 V
percentage: 0%
capacity: 100%
technology: lithium-ion


If you wish to install acpi for future uses, you can do so by typing the command below:

samar@Techgaun:~$ sudo apt-get install acpi


Play around with different switches by looking over the help and man pages. You will find this tool quite useful :)


Read more...

Wednesday 30 January 2013

Search Text Over Multiple PDF Files In Linux

You can use the old grep command or the small script using the pdftotext command to search text over multiple pdf files but we are talking about a simple utility that lets us to search text in PDF files.

The pdfgrep tool lets you perform grep style search over multiple pdf files easily from the terminal. It depends upon the poppler package and under ubuntu, you can just type the command below to install pdfgrep.

samar@\Techgaun:~$ sudo apt-get install pdfgrep


Once pdfgrep is installed, you can perform any kind of search like you would do while using the grep command. Enjoy grepping the PDF files :)


Read more...

Tuesday 29 January 2013

How To Check Which Groups You Belong To

In this post, you will get to know about a simple command that lets you know what groups the particular user belongs to. Users and groups are the one of the several concepts employed in the Linux systems for access control.

From the man page, the groups command does is:
Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed).

So if you are interested in finding what group a particular user is in, run the command as below. Replace samar with your USERNAME and you are good to go:

samar@Techgaun:~$ groups samar

samar : samar adm cdrom sudo vboxusers ....


I hope this proves useful :)


Read more...

Saturday 26 January 2013

NCell PRBT Settings Information

This post provides the information regarding how to use the PRBT system provided by NCell.

Original Link: PRBT Information @ Ncell

Q1.What is PRBT?

PRBT service enables the ones who call you to listen to a popular melody or sound instead of the regular tone. The sound or melody is heard by the caller till the call is answered. Your friends and partners, regardless of operator, location and phone model while calling you can hear melodies, sounds and personal greetings chosen by you instead of usual phone tone.

Q2. How to activate PRBT service?

PRBT can be activated by one of the following ways:

I. SMS: On your Message box type A and send it to 900227

II. IVR: Dial 9208 and follow the instruction.

III. USSD: Dial *100*2# and follow the USSD guide instruction.

Q3. How to set a PRBT?

Any PRBT of your choice can be set via SMS, IVR or Web once the user has activated the PRBT service. Stated below are the ways a subscriber can set a PRBT.

I. SMS: Type BUY PRBTcode sends it to 9209.

II. Web :

i. Log on to prbt.ncell.com.np

ii. Click on Order for your choice of PRBT song

III. IVR: Dial 9208 to choose the tone of your choice.

Q4. What are the features with new PRBT system?

The PRBT system allows a subscriber to perform the following:

I. SMS

a. Download multiple PRBTs at once

Example:

DownPRBTcodePRBTcodePRBTcode

b. Gift PRBT to friend

Example: Gift Mobile number

II. Web

To activate any of the features below, the user will have to login with mobile number and password on prbt.ncell.com.np

a. Assign different PRBT to different callers.

i. Click on MY PRBT > PRBT Settings > Advanced Setting

b. Create Group and allocate a PRBT for a group.

i. Click on MY PRBT > Group Management

c. Play different PRBT in different time slots.

i. Click On MY PRBT > PRBT setting > Add

d. Copy a PRBT from a friend.

i. Click on MY PRBT > Copy PRBT

Q5. How much does a PRBT cost and what is the validity?

Each PRBT will attract Rs. 10 excluding the taxes.

Q6. Is there monthly subscription price?

Yes. There will be Rs 10 monthly subscription price without applicable taxes. The subscription will be renewed automatically unless the subscriber chooses to discontinue the service.

Q7. How deactivate PRBT?

You can deactivate by any of the following ways:

I. SMS : In your message box type R and send it to 900227

II. IVR : Dial 900 follow instruction

III. USSD : Dial *100*2# and follow the instruction




Read more...

Thursday 10 January 2013

Create Backup Of List Of Apps Installed In Ubuntu

When my laptop's HDD was near to death, I had created backup of the list of all applications and packages I'd installed in my Ubuntu so that I would be able to install them easily in my new system in new HDD. I had forgotten about it but today suddenly remembered and am sharing this simple technique. Fire up the terminal and type the following:

samar@Techgaun:~$ sudo dpkg --get-selections > installed_apps




Now the list of packages will be saved in the installed_apps file and you can use it for future reference. I hope this is useful ;)


Read more...

Wednesday 28 November 2012

How To Export LibreOffice Impress Slides As Images

I was trying to export individual slides from LibreOffice Impress but I had to select each of the slide and then export it which was getting really really irritating with larger slides. With a quick search, I found an Impress extension that lets you export all the slides at once.

So the addon I was talking about is Export as Images extension which lets you export all the Impress slides or Draw pages into different image formats. The formats supported are JPG, PNG, GIF, BMP and TIFF format.

Once you install the extension, it adds a menu entry "Export as images..." to File menu and allows you to choose a file name for exported images, image size as well as some other parameters.

Installing Export as Images extension


First grab the extension from HERE or see if newer version is available from HERE.



Once you have downloaded the extension, the installation is pretty straightforward. Open up the Extension Manager from Tools menu and then click on Add. Now navigate to the folder containing your newly downloaded extension and select it. Once the installation succeeds, make sure to restart your LibreOffice Impress to make sure the extension gets activated.

Now open any presentation and to export all the slides as images, go to Files menu where you'll find a new entry Export as images... just below the Export... option.



The GUI for the extension is self explanatory. I hope this proves useful to you :)


Read more...