Showing posts with label ubuntu 11.10. Show all posts
Showing posts with label ubuntu 11.10. Show all posts

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...

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...

Friday 23 November 2012

Video Transcoding With HandBrake In Linux

HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder available for major platforms: linux, mac, and windows. HandBrake converts video from nearly any format to a handful of modern ones.



Handbrake can save output in two containers, MP4 and MKV and I've been using it as a MKV transcoder for a while and I'm quite satisfied with it. Even though the official wiki says its not a ripper, I can see it to be quite useful DVD ripper.



Handbrake is available in CLI (HandBrakeCLI) and GUI (ghb) mode. Hence this offers the flexibility to choose the appropriate version according to your linux personality. As of now, we can install HandBrake from PPA and the latest version is v. 0.9.8 released back in July this year.

HandBrake can be installed from PPA. Issue the following commands in your terminal

$ sudo add-apt-repository ppa:stebbins/handbrake-releases
$ sudo apt-get update
$ sudo apt-get install handbrake-cli


Or if you wish to install the GUI version, type:

$ sudo apt-get install handbrake-gtk




I recommend using the CLI version since you can transcode/convert videos much more efficiently if you use the CLI version. But if you are not comfortable with the command line interfaces, the GUI version of HandBrake is also quite good.



Only problem I have felt is the naming convention of the commands for both the GUI and CLI versions of the tool. In order to run two versions of this tool, you need to type HandBrakeCLI for CLI version and ghb for the GUI version. The problem here is with the naming convention for the binaries. I mean, the names handbrake-cli and handbrake-gtk would be more straightforward than these badly chosen names. Otherwise, the tool does pretty good job of video conversion and can be good alternative if you are not comfortable with ffmpeg. Note that ffmpeg is also capable of video conversions of different formats and is a great tool. :)


Read more...

Saturday 3 November 2012

Make Your Linux Read Papers For You

Fed up of reading text files and PDF papers? Is you eye power degrading day by day and can't hold even few minutes on screen? Don't worry, you can easily make your linux system speak and read all those papers for you.

There are several text to speech tools available for linux but in this post, I will be using festival, a Text-to-speech (TTS) tool written in C++. Also, Ubuntu and its derivation are most likely to include by default espeak, a multi-lingual software speech synthesizer.

For ubuntu and debian based system, type the following to install festival:
samar@samar-Techgaun:~$ sudo apt-get install festival


Moreover, you can also install a pidgin plugin that uses festival:

samar@samar-Techgaun:~$ sudo apt-get install pidgin-festival




For now, you just need to install festival. Once you have installed festival, you can make it read text files for you. If you go through the online manual of festival, it says:
"Festival works in two fundamental modes, command mode and text-to-speech mode (tts-mode). In command mode, information (in files or through standard input) is treated as commands and is interpreted by a Scheme interpreter. In tts-mode, information (in files or through standard input) is treated as text to be rendered as speech. The default mode is command mode, though this may change in later versions."

To read a text file, you can use the command below:

samar@samar-Techgaun:~$ festival --tts mypaper.txt




The festival will start in text-to-speech (tts) mode and will read your text files for you. But now, we want to read PDF files and if you try to read PDF files directly (festival --tts paper.pdf), festival is most likely to speak the cryptic terms since it actually reads the content of PDF including its header (You know PDF is different than simple text file). So we will use a pdftotext command to convert our pdf file and then pipe the output to the festival so that festival reads the PDF files for us. You can use the syntax as below to read PDF files.

samar@samar-Techgaun:~$ pdftotext paper.pdf - | festival --tts


If you want to skip all those table of contents and prefaces or if you are in the middle of PDF, you can use the switches of pdftotext to change the starting and ending pages. For example, if I wish to read page 10 - 14 of a PDF, I would do:

samar@samar-Techgaun:~$ pdftotext -f 10 -l 14 paper.pdf - | festival --tts


Enjoy learning. I hope this post helps you ;)


Read more...

Saturday 27 October 2012

Linux Cat Command Examples

Monday 22 October 2012

Ubuntu Tweak Development Will Continue

Three days ago, Ubuntu Tweak developer Tualatrix had posted a blog post mentioning that the Ubuntu Tweak will no longer be developed but he has now changed his mind and has decided to continue the development because of support he received.

The developer writes
You made me know that Ubuntu Tweak is still valuable, and as the first software project I made 5 years ago, it is just like my baby, I don’t really want to give up the development.

and thanks all the good people who left the message for him and forked the app in github.

The blog post also mentions
Back to 5 years ago, I developed it just because of my practice on Linux programming, I felt freedom when I make things on Linux (Although I didn’t have developing experience on Windows and Mac then). But now I don’t feel any freedom about developing this software any more. The initial motivation is changed, and I’m still looking for new motivation.

Overall, he is not too satisfied with his current overload for working on this personal project while still managing time for his job and personal life.

Anyway, Ubuntu Tweak 0.8.1 is out and you can download from PPA.

PPA DEB link

Release Notes


Read more...

Saturday 13 October 2012

Empty Trash From Command Line In Ubuntu

CLI is such a sexy piece so why bother using GUI, even for cleaning up your trash. In this post, you will see how you can empty trash in Ubuntu from command line.

The trash you see in GUI is nothing but just the view for the files deleted by users which are temporarily moved to the special location of user's home directory. For any user, the trash location is ~/.local/share/Trash/. That is, whatever a user deletes gets saved in this location.

samar@samar-Techgaun:~$ rm -rf ~/.local/share/Trash/


I hope this becomes useful :)


Read more...

Enable Fingerprint Authentication In Ubuntu

So you got fingerprint reader in your device but have not been able to use it under ubuntu? Follow this How To to enable fingerprint authentication in ubuntu using the Fingerprint GUI from fingerprints reader integration team.

First make sure your fingerprint hardware is supported. You can check for the vendor and device ID by entering the following command:

samar@TG:~$ lsusb | grep -i finger | awk -F " " '{print $6}'
138a:0005
This link provides the list of the supported fingerprint readers.

Installation is easy. Fire up the terminal and enter the following commands:

sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui


You will have to restart the system or log out the session and login back to use and configure the fingerprint GUI.

Press Alt + F2 and type fingerprint-gui. From this GUI, you can configure and enroll your fingerprints.




Read more...