Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

18 October 2011

Installing Sun Java 6 on Ubuntu 11.10 - Oneiric Oclrot

There are two Java versions available one is OpenJDK and other is from Sun called Sun Java.
OpenJDK is supported by Ubuntu team and is directly available for download through Software Center.

OpenJDK works with most of applications offline or online, but some applications like Minecraft do not work on OpenJDK (well at least in case of me, it didn't). So here's how to download and install Sun Java 6 for Ubuntu 11.10 Oneiric Ocleot.

Step 1: Add an additional repository in your software sources list by 
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

Yes MAVERICK partner even if u have Oneiric running. This is because Canonical still didn't upload the sun-java6-jre and sun-java6-jdk packages to the Oneiric repos. You could later remove the Maverick repository.

Step 2: Update your sources list with 
sudo apt-get update

Step 3: Now install whichever package you want, either Java6-JRE which is Java Runtime Environment meant for just running Java apps or Java6-JDK - Java Development Kit meant for programming in Java by.
sudo apt-get install sun-java6-jre  (For Java6-JRE)
                                  OR
sudo apt-get install sun-java6-jdk (For Java6-JDK)
Accept all the license agreements from Java in terminal. 
If you aren't able to click the <OK> button, press TAB and enter.

This would install Java6 packages into your Ubuntu. 
You could even download and install Java from http://java.com. 

14 October 2011

Installing Google Chrome on Ubuntu 11.10 Oneiric Ocleot & 12.04 64-bit

Here's how to install Google Chrome (not chromium) in your brand new Ubuntu 11.10 Oneiric Ocleot.

Step 1: Download Google Chrome .deb from http://chrome.google.com and place it in your Downloads folder

Step 2: Install the three necessary packages for Google Chrome

In terminal type:  
sudo apt-get install libnspr4-0d libnss3-1d libxss1
Step 3: Now to Install Google Chrome type:
sudo dpkg -i ./Downloads/google-chrome-stable_current_amd64.deb
(Change the file name according to your downloaded .deb file)

Enjoy surfing on the fastest browser :)



29 September 2011

How To install Adobe Flash on Google Chrome - Ubuntu 11.10 - 64-bit

Hello there,
Here's a quick post involving instructions/steps for installing Adobe Flash Player in Google Chrome for Ubuntu 11.10 Oneiric Octeot. Google Chrome has inbuilt flash plugin now, but its only for 32-bit version of the browser, for 64-bit Google Chrome you must manually download and install flash into your Chrome.


Select Operating System  - Linux(64 bit)
and version Ubuntu(apt) or (tar.gz)

If you select apt your software center will automatically install Flash Player Plugin for Chrome
But in case if thats not working you can download tar.gz open it and follow the instructions as given below..

  • Extract the libflashplayer.so file on your desktop 

  • Now open your Terminal and type
sudo cp ./Desktop/libflashplayer.so /opt/google/chrome/plugins/
If the "plugins" folder is absent you can create it by
sudo mkdir /opt/google/chrome/plugins
Now restart the System, flash player should work now :)

06 August 2011

Ubuntu File System - Explained

Here's a short overview for a complete beginner explaining everything about file system in Ubuntu and how to manage files and folders, hide them, see them from terminal, work with them etc in a Linux Ubuntu OS. For this guide I will use Ubuntu 10.10 which I think is the most successful Ubuntu release till date. This guide is aimed for users which are completely new and are unfamiliar with Ubuntu structure i.e Windows users.

Isn't it same as Windows?
Simple answer: yes and no!
The visual part here is quite similar to Windows. But Windows files are arranged inside drives. These drives are alphabetically named like C drive, E drive etc. (where mostly the system files are stored in your C drive) and you store all you files, photos and videos inside these directories. Well, its the same way in Ubuntu all the files are kept inside a single drive called "Filesystem" and no other drives, in case you can create one but its really unnecessary to do so. You can always store it in the basic Ubuntu files system.

First Some Basics
Lets first explore what we already have on a new Ubuntu machine.
Unlike you had My Computer in Windows, here you have to explore your files through the "Places" tab.
Lets take a closer look at the menu, your "Home Folder" is your main working folder, you can store all your music, images, videos or documents as well as you can see your downloaded files in Home Folder. All these pre-created folders are then listed below the Home Folder. By default the files you download with default browser Mozilla  Firefox are stored in Downloads folder. The "My Computer" in Windows is similar to "Computer" as you can see above, through which you can manage all your drives. You can see the Drive C and Drive E which are Windows drives because I am duel booting with Windows i.e I have Windows installed with Ubuntu on my computer and can access all my Windows files from here. Next there is Network which is for your LAN and the Connect to Server thingy is for FTP servers if you have any.

Try exploring each one of them and get familiar.
As you now know that you have Desktop, Documents, Music, Images, Videos etc inside your Home Folder lets find where this Home Folder is located. First open up your "Computer" in "Places" tab now you will discover a lot of files, all of these are Ubuntu's system files. Lets not fiddle with them for now. Just to learn where Home Folder comes from open the "Home" folder, it will have another folder with the name of your Username and there you will find your "Home Folder". These are the basic folders you must know.

The Complex Part - Using Terminal
Terminal is the place from where you can give commands to your Ubuntu, by default all the applications you use automatically give commands to the terminal and shows the result which saves your times for typing. But you can still learn to manually give commands to the shell which can always be useful.
You can open the basic terminal (don't do this now) by doing Ctrl + Alt + F3 and return back with Ctrl + Alt + F7 but there is also a terminal window by GNOME which can be opened by Applications > Accessories > Terminal.
On opening the terminal the first thing which you will see is a blank window with your username an @ symbol your computers name and a $ written - this $ means the terminal is ready to accept commands from you.
The default directory for terminal is your Home Folder, you can change this by using "cd" command

The "pwd" command
On opening the terminal the terminal has a working directory - now a working directory is the one which is used whenever you use a command like for opening a script, the terminal will search for that script in a directory which is called as working directory.
To see the current directory or working directory use the pwd command.





This shows my working directory is /home/bhavesh

The "ls" command
ls command lists all the current files and folders inside working directory



The "cd" command
cd stands for Change Directory, it is basically used to change the current working directory for terminal.
Now you know the folders and files inside your working directory. Now lets try to change our working directory by "cd ./Desktop" command.
You will get a ~/Desktop before your $ which means your current working directory is Desktop inside Home folder. You can check this my doing "ls" again.

Now What?
After reading this you now have a basic idea of how are files and folders arranged inside your Ubuntu FileSystem, you can learn more Shell Commands from here http://linuxcommand.org/lts0020.php < This website has all linux commands and explanation for file management.

04 August 2011

C++ in Ubuntu (gedit)

Hi there,
      If you are a C++ programmer or you learn C++ in your school/college and you programmed in Borland C or Turbo C earlier in Windows and thinking it would be so good if I could write my programs in Ubuntu, here's a cookie for you. Unlike downloading compilers and debuggers in Windows, there is an easy way to write and test C++ codes in Ubuntu. This includes using the pre-included text editor (gedit) and two small scripts with some standard libraries which we would download.

Things we will need:
  • Gedit
  • Two small scripts (Compile and Run)
  • Ubuntu Build-essential package
1) Gedit
gedit is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor.
We can create and add external plugins to this text editor easily.

 2)  Compile and Run scripts
I have two scripts with me which are supposed to be added into gedit, you can download them from here,





3) Build Essential package
You will need Build Essentials for Ubuntu if you want to program anything, even if you download NetBeans IDE or any such IDE you will always need build-essential which contains all the libraries needed for programming

Download Buil-essential package by typing this in terminal
sudo apt-get install build-essential

Procedure

Do..

cd ~
mkdir -p  ~/.gnome2/gedit/tools
nautilus ~/.gnome2/gedit/tool
s

Copy and Paste the two downloaded scripts inside this newly created folder

chmod +x ~/.gnome2/gedit/tools/*


Now make a new C++ file in gedit by right clicking on desktop > Create Document > Empty File and name it as any_file_name.cpp . In gedit open Preferences (Edit > Preferences) go to Plugins tab and enable External Plugins.

After enabling External tools you would be able to see External Tools menu Tools > External Tools
Now write a simple C++ program and try executing it.
The scripts also add some shortcut keys for compilation and running the program
Press F5 to compile, now click "Shell Output" once and hit F7, this would run your program in a new Terminal window.


















Note: The programs you write are not exactly similar to the ones which you did in Turbo/Borland C++. You will have to make some changes..
Some of these changes include
1) Including .h extension to header file does not work try removing it and vice versa
for example: #include won't work, instead use #include
2) There is no conio.h header file to stop the screen from getting closed, you will have to use stdio.h and put getchar(); two times for pausing the screen
3) Always use "using namespace std; " after all your include files.

Always remember to save the file before compiling

Sample C++ program for Ubuntu














Please let me know if you have any problem installing or running the program :)

14 July 2011

Running Windows apps on Ubuntu

Since you have now tried Ubuntu and now are getting used to it but you still miss some of your Windows apps which you used for years before but don't find them now on Ubuntu? "WINE" which stands for "Wine Is Not An Emulator" is an application for Debian distros which can run most of your Windows application on Ubuntu. This is a life saver and will allow you to completely shift to a new OS. But it does have a drawback i.e you cannot run "all" your apps with wine which you could on Windows. WINE has some limitations and has its own .dll files. It supports most of the applications and needs .dll files for some which don't. WINE has an "Application Database" which lists the currently supported applications by wine and also shows the ones which don't work.
To find out weather your app would work with WINE just Google your app name and add winedb in front of it. It will lead you to a page in wine's application database and you can find out what you need to do to get an app working.
To install wine just Open up your Ubuntu Software Center > enter WINE in its search box and install it.

Installing any Windows application with wine is quite simple, copy the desired .exe windows executable file to Ubuntu partition like your desktop right click on it > Permissions > check Allow Executing File as Program


Note that if you try to check Allow executing file as program option and it gets unchecked again it means your .exe file is not on Ubuntu partition.

There is also winecfg which stands for Wine Configuration Tool. With this tool you can select your desired screen resolution for a particular app or apply a new windows theme, change sound, video settings etc. winecfg can be opened by typing winecfg in terminal or Application > Wine.

05 July 2011

Visual Basic in Ubuntu (Gambas)

Hi there,

Most Windows developers when migrate to Ubuntu miss their hard practiced and well known Visual Basic or Visual Studio where they built apps with easy programming and GUI designing tools. There are many other similar Developing tools for Linux which are free and open source for developing apps on Ubuntu. But for those who don't want to go for a hard way to learn new things from the beginning and continue doing the well mastered way of creating apps, there is a tool called Gambas which I can say is exactly similar to Visual Studio. Gambas website says Gambas almost means Visual Basic but its not a replica, even the language used to develop apps is same.
So if you are a Windows developer developing apps on Windows and want so shift to Ubuntu but cannot because you probably don't want to learn another programming language and learn using a new SDK you will be surprised to see how efficiently Gambas works. You can app PictureBoxes, Text Labels, Color Picker and attach a code to any action performed.
To install Gambas on your Ubuntu simple open Ubuntu Software Center and enter Gambas in the top right search box, you will find a Gambas2 which is 2nd version of Gambas. Install it and launch it through Applications > Programming > Gambas.

There is a Release Candidate Gambas v3 on Gambas website http://gambas.sourceforge.net/en/main.html . But you will have to compile it yourself, rather if you are a newbe just install Gambas v2 from Ubuntu Software Center.



Above pic shows Gambas2 GUI designer.



Place to write code for the application which looks similar to one in Visual Basic 6.

01 July 2011

Creating Shortcuts for launching items

This is a short tutorial covering everything that will help you for adding shortcuts for your GNOME desktop.

This is a absolute Beginner tutorial and is explained in detail with screenshots.

Shortcuts are key combinations which when pressed perform certain tasks like opening an application or giving a particular command to the terminal. Adding shortcuts is quite easy in Ubuntu GNOME 2 as it has a pre-installed GUI application. This Shortcut application has all functions like adding a new shortcut, deleting or editing a current shortcut.

To launch Shortcut manager go to System > Preferences > Keyboard Shortcuts.

This windows shows currently assigned shortcuts list, it has name of shortcut on left and key bindings on right hand side.

To add a shortcut click Add



You can set your shortcut name and add a command to start an application.

Now you may not know what is the command for a particular application, this command can be known in many ways like you can try entering name of an application in terminal to check application command.
Like entering "winecfg" (without quotes) in terminal window opens up wine configuration window if you have wine installed.

The second way to do this to install htop and see the current running system process name, htop is a terminal application which shows the currently opened applications and can close them or perform some other task, htop is similar to "Task Manager" in windows.

To install htop do "sudo apt-get install htop" without quotes in terminal and launch it  by going to Application > System Tools > Htop.


As you can see in above screenshot there is a process named "htop" running which is a command for my Htop application. So I can launch Htop by typing "htop" in terminal.

So if I want to add a shortcut for running my Htop application I will first set its name (whichever I want) and a command to launch it.
Then you must a key binding for it by clicking on the key binding space on the right hand side and pressing a desired key combination.
Like if I press "Shift" and "S" while selecting the shortcut I could open my Htop whenever I press Shift and S together.
This makes using Ubuntu faster than ever :)

15 June 2011

Installing Java JRE and JDK + Netbeans

Short information and steps to install Java JRE and JDK with Netbeans.

On ubuntu you don't get Java preinstalled, lets first see what is Java.

Wikipedia says:
Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary ofOracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, and is widely used from application software to web applications.[9][10]
 

So Java softwares can be used anywhere windows, linux, mac, mobile phones and even your car. A ubuntu user would need Java JRE (Java Runtime Environment)  to run Java applications.

To install Java JRE on ubuntu 10.10

Open Applications > Ubuntu Software Center

Now there are two versions of Java available for Ubuntu, one from Sun Microsystems and other Open Java, Sun Java was dropped out and now Ubuntu supports Open Java.

Type "java6" without quotes in your Ubuntu Software Center search box and click "The Java(TM) Runtime Environment(JRE) 6 " > Install.



After installing Java JRE now you would be able to run Java applications.

Installing Java JDK + Netbeans

Java JDK (Java Development Kit) is only necessary if you want to develop Java applications with an external IDE like Netbeans or Eclipse. You can install Java JDK in two ways, one which comes with Netbeans and other in which you have to install Netbeans and Java JDK separately.

You can install Netbeans which comes with JDK directly from Sun Java website (http://www.oracle.com/technetwork/java/javase/downloads/index.html)

Alternatively you can also install Netbeans IDE and JDK separately.
First install JDK from Ubuntu Software Center, search "java6" in Ubuntu Software Center search box and install "Sun Java(TM) Development Kit (JDK) 6" then download Netbeans IDE from http://netbeans.com or again from ubuntu software center.

To install Netbeans downloaded from netbeans.com move your file to Home folder and type this in terminal

./name_of_your_file.sh

replace "name_of_your_file" with the name of file in your Home Folder.

This will install Netbeans IDE and Java JDK on your Ubuntu and you can now develop Java apps.

Remember that If you have OpenJDK installed first uninstall it and install Sun Java from Ubuntu software center, Netbeans wont detect OpenJDK.

21 January 2011

Ubuntu :)

What you think which is the best operating system around? Windows 7, Mac? No its ubuntu :D



I downloaded the latest release of ubuntu i.e 10.10 three months ago (http://ubuntu.com), installed it and found it completely astounding. I was using windows xp earlier. Some of my friends said windows 7 is better than ubuntu, so I decided to give it a try, I got windows 7, it worked all fine but ultimately ubuntu took the cookie. Here are a few reasons.



1.Its the fastest.
I bet you, nothing's faster than this. It starts in 20 secs as compared windows 7 take 30 secs to start. It installs in five to ten minutes whereas windows 7 takes 20 to 30 minutes. Also ubuntu allows you to connect to your internet instantly as soon as you start your computer whereas windows take a longer time.

2.The finest
Ubuntu has an elegant look, soft corners and extremely customizable. You can even make it look like other operating systems like windows or mac with just a change of theme. There are a large range of themes available for ubuntu and they are easy to install.

3.It can run windows softwares.
Yes! your ubuntu can run windows software,  if you want to play games or apps  made for windows, you can. GTA- a very popular game and also NFS runs great with ubuntu. All you need is a software called wine.

4.Lots of apps.
Ubunu has thousands of softwares out there. It has a software center pre-installed , type whatever you want a select the software of your choice.  It has screenlets as you have a widgets bar on windows 7 and ofcourse lot more.

5.More than one desktop.
Ubuntu supports more than one desktops. You can have as many desktops as you want on your computer, it is really helpful when you are working with many applications and they don't fit in one single window. When you switch between these desktops you can apply your animations like 3D cube, which rotates and takes you to another desktop.




6.Help one click away.
If you are stuck anywhere with ubuntu, you can get help instantly. It has a large community and forum. It even has a IRC channel named #ubuntu where you can ask your questions and get answers from experts almost instantly.

7.Virus free.
Yea you no more have to worry about your files because virus's are impossible on ubuntu, you don't even need an antivirus. Read more here > https://help.ubuntu.com/community/Antivirus

So what else do you need? Download ubuntu.

Shobha Yatra 2024 - Gudi Padwa - Vasai Road | शोभा यात्रा २०२४ - गुढी पाडवा - वसई रोड

Vasai Road - Din Dayal Nagar Shobha Yatra 2024 on the ocassion of Gudi Padwa organized by Pandit Din Dayal Nagar Utsav Mandal and Rajadhiraj...