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

Thursday, September 3, 2015

Run jar files in Linux

0 comments

Run jar files in Linux

When people try to run the jar file, they click on it, It opens with an archive manager and showing the files. So how to run it by clicking on it ?
Well, it's easy, first you have to have java installed, whether it's Openjdk or OracleJdk.
Second mark it as executable.

make it executable

Then customize the "Open with" tab like these pictures :

Open with

Openjdk

Choose Openjdk or Oraclejdk, Depending on what you have.

Note : this process executed in Nautilus file manager, However it's almost the same steps for other file managers.

We can do it using Terminal too, first make it executable :

chmod +x test.jar

then run it with this command : 

java -jar test.jar



     
Read more...

Sunday, June 21, 2015

Open and close CD / DVD Drive using this trick

0 comments

Open and close (CD / DVD Drive) using this trick

Linux terminal (or Shell language generally) can do many beautiful things such as tricks, whether in terms of benefit of programming, or in terms of tricks and entertainment, and in this lesson we will learn about small code that executes an infinite loop which make the drive (CD / DVD Drive) closes and opens itself repeatedly, and of course will not stop unless you stop your own script, and you will learn about it.

1. First, Create a new text file under any name you want (for example, I I would call it script), at the end of your file name, add .sh 
now the name will be like this : script.sh

Create Document


Script.sh


2. Now, copy the following codes, and paste then in the text file script.sh :

#! / Bin / sh
while [1 = 1]
do
#eject CDROM
eject
#pull CDROM tray back in
eject -t
done

3. Save the file and close it.

4. Go to the File Properties and Permissions tab, check the option appeared in the picture :

allow executing file as program

5. Now run the file, and if this message appears, press Run in Terminal, and now you will see how the drive will still opens and closes on its own, until you stop it.

run in terminal


How do I stop it ? Simply close the terminal window.

     
Read more...

Saturday, May 16, 2015

How to Check MD5 Hash using Terminal

0 comments

How to Check MD5 Hash using terminal

In this post, we will explain how to check the md5sum value on Linux distributions, using the Terminal.

What is MD5 and why  should be validated ?


When you download the ISO file, for example (whether an operating system or program or any other file) it is advisable to test its health, safety and file security, lest there be damaged or corrupted, in this case it's called MD5 Test or hash value (retail), which is about mathematical equation consists of a set of numbers and letters, and the way to verify the equality of the value of the real hash to the given party publisher with the value of the ISO file that is loaded; the higher the ISO file size the greater the need for a testing process to avoid errors during use.

Test Method


There are some different software in the Linux system to verify the integrity of the file and is known to many, but in here we will test the validity through the Terminal, without the need for programs.

1. Open the terminal Ctrl + Alt + T and paste the following command :

cd Downloads

Downloads must be replaced with the name of the folder in which the file to check is allocated in.

2. paste the following command :

md5sum ubuntu-11.10-dvd-i386.iso

Replace ubuntu-11.10-dvd-i386.iso with the desired file.

3. The following result will appear, note that you have produced a hash value :

8044d756b7f00b695ab8dce07dce43e5 ubuntu-11.10-dvd-i386.iso

4. Now you should check matching the number that publisher gave you, with the number that resulted in the terminal, the correspondence with each other, the safe the file is, but if they have not corresponded you must re-download the file again.

5. That's it.

     
Read more...

Wednesday, February 11, 2015

How to Set Chromium into Private (Incognito) Mode by Default

0 comments

How to Set Chromium into Private (Incognito) Mode by Default


If you like Chromium and keeping your browsing private, use Incognito mode. you can always use that mode by clicking "New incognito window" from the menu as the image bellow shows :

New incognito window

Or by just pressing Ctrl + Shift + N.

However here’s a handy trick for always starting Chromium in incognito mode by default.
First, edit Chromium.desktop which is located here /usr/share/applications/chromium.desktop. I"m using nano here, so the command will be :

sudo nano /usr/share/applications/chromium.desktop 

In this code : Exec=chromium %U add --incognito, so It will be Exec=chromium --incognito %U

Now when you open Chromium, It will open in incognito mode.

     
Read more...

Monday, October 27, 2014

What is MAC Address ? And how to change it on Linux ?

0 comments

What is MAC Address ? And how to change it on Linux ?

Mac is a physic Address of media connected to the Internet or a local network, such as a network card, modem, network switches and hubs, Bluetooth, Ethernet, and wifi, and other ...

The mac address is in this format :

- MM:MM:MM:SS:SS:SS 

There are many ways to find out your mac address of your devices either by going to network-manager(very easy).

network-manager mac address linux

but I will show you how, using macchanger (install it first).

type this command :

macchanger wgp0s96f0u1 --show

The red one is name of your interface. replace that red one with yours.

To change the mac address :

sudo macchanger wgp0s96f0u1 --mac=00:53:17:b5:ad:cc 

Don't forget to change the red ones, change that mac address to the one you like. 


     
Read more...

Monday, October 6, 2014

Netflix on Linux

0 comments

Netflix on Linux

Netflix now works on Linux with no Wine tricks required. All it takes to start watching Netflix on Linux right now is Google Chrome and a quick user agent tweak, and soon won’t be necessary.

But for now we have to do some tweaks to make it works.

What we need to play Netflix on Linux

- Having the last Google chrome

- NSS 3.16.2 or greater

- Hacking The user Agent by installing and using this extension : "User-Agent Switcher" and pasting these text lines as you see in the image bellow :

Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2114.2 Safari/537.36

netflix on linux - user agent

Soon It will not require any tweaking and we will get rid of this extension, so we can watch Netflix without any complications.


netflix on linux



     
Read more...

Thursday, August 28, 2014

Simply Change the Home page in Firefox

0 comments

Simply Change the Home page in Firefox

Without Going to Preferences then General and then change the Home page.

In this step, all you need is to go to the website you want to make it the Home page and grab the Tab to the Home icon like the images show :

firefox home page

and this message will appear, click yes

firefox home page


     
Read more...

Saturday, August 16, 2014

Tip : make VLC running automatically full screen

0 comments

Tip : make VLC running automatically full screen

VLC media player is strong and supports a lot of video formats, and in this quick tip we will explain how you can make VLC automatically and directly run video in Full Screen mode .

Open the program, click on the Tools list in the top bar of the program, and then click on Preferences, open the Settings window, click on the Video tab and then place the tick on the option fullscreen as the following image shows :

vlc preferences


     
Read more...

Saturday, August 9, 2014

You can not change the cursor themes in Ubuntu

0 comments

You can not change the cursor themes in Ubuntu

In this tutorial, we give the solution to the problem of not being able to change the mouse theme in Ubuntu, and the cause of this problem because Ubuntu distribution uses Compiz.

You may notice that when your choose a mouse theme different theme from the default one which is DMZ-White,  through you used tweak-tool or other tools, it will not change, except in a few applications, such as Firefox, and others ... As in the other parts of the system, it will remains on the default theme.

To solve this problem, follow these instructions :

1 Open the terminal Ctrl + Alt + T and paste the following command :

sudo gedit /usr/share/icons/default/index.theme 

2. will open a window containing the text of the following codes, or similar :

[Icon Theme] 
Inherits=DMZ-White 

3, note, the red color, which must be changed to the name of the desired Theme mouse :

Suppose we want black mouse Theme, you must first open tweak-tool application in order to know the name of the theme that we want a DMZ-Black, then we write in the text file as it is written entirely in the tweak-tool, taking into account the large and small letters.

Thus, for the rest of themes, for example, I want the red mouse, looking for its name in the tweak-tool and then type it in the script editor.

  4. log out of the system, which is an important step to activate the new mouse theme.

5. Enjoy it.

     
Read more...

Wednesday, August 6, 2014

Guide to install Java on Ubuntu

0 comments

Guide to install Java on Ubuntu

Installing Java is one of the few things that people do after installing Ubuntu, and in this post we will guide you to install Java on Ubuntu 14.04 with clarifying the differences between the various copies Java.

OpenJDK against JRE against Oracle JDK 

Before proceeding to install Java, we must be aware of the differences between these copies of Java, let's take a quick look for these versions:

JRE: It is an abbreviation for (Java Runtime Environment), which is the application you need to pan ordinary users to run applications written in Java, this is all you need if you are not a programmer.

JDK: It is based on the Java Development Kit, and this is what you need to do some development processes and programming related to Java.

OpenJDK: It is the application of open-source Java Development Kit, and this version is also suitable for the needs of most casual users, but the advantage back to the JRE in this context.

Oracle JDK: it is the official version of Oracle's Java Development Kit, and the examples that you use, the editor compile Android Studio.

Java installation on Ubuntu 14.04 


# Before starting the installation, you should check whether the Java software installed you actually have to verify the existence of Java in the system, open the terminal Ctrl + Alt + T and paste the following command :

java-version 

- If you see the following output or similar :

The program 'java' can be found in the following packages: 
* Default-jre 
* Gcj-4.6-jre-headless 
* Openjdk-6-jre-headless 
* Gcj-4.5-jre-headless 
* Openjdk-7-jre-headless 
Try: sudo apt-get install 

It means that Java is not installed on the computer, and you'll need to install it, so we will proceed to the installation process now.

Installing the JRE 

Open a terminal Ctrl + Alt + T and paste the following command :

sudo apt-get install default-jre 

Installing OpenJDK 

Open a terminal Ctrl + Alt + T and paste the following command :

sudo apt-get install default-jdk 

Installing Oracle JDK 

Open a terminal Ctrl + Alt + T and paste the following commands (* Make sure to have high-speed Internet, it will download a lot of files in the case of Oracle JDK).

sudo add-apt-repository ppa: webupd8team/java 
sudo apt-get update 
sudo apt-get install oracle-java8-installer 
sudo apt-get install oracle-java8-set-default 

(* If you want to install the seventh version of the oracle jdk, replace java8 b java7 in the above commands).

     
Read more...

Saturday, July 26, 2014

How to activate the BackSpace button in Firefox on Ubuntu

0 comments

How do you activate the BackSpace button in Firefox on Ubuntu ?

If you were Windows user before, you might have noticed that when you press the Backspace button in Firefox, the browser goes back back to the previous page.

In case you want to activate this button, follow these steps :

1. Type in the search bar this phrase about:config

about:config


2. Warning message will appear, accept it.

about:config warning


3. Type in the box provided word Backspace

Backspace


4. Double click on the phrase that appeared in front of you browser.backspace_action and then change the value to zero (0)

browser.backspace_action


     
Read more...