Archive

Archive for the ‘Unix’ Category

AdGaurd for blocking ads and tracker!

Hi, I just want to share my own experience of blocking the ads and trackers in PCs and Android devices. In PC normally we do use some kind of antivirus but normally we are not aware of the tracker, many sites always use that information for tracking our web activity and in case of mobile, we really do not think about these things! But I care. Again I do not want to see any kinds of advertisement in my browser or on my mobile apps. That’s why also bought so many apps for my android devices. By the way, I like to do some tricks with my devices. The first thing I do with my phone is how to do root and unlock the bootloader to use TWRP for flashing… Previously I used SuperSU but now using Magisk for Systemless root, which is now compatible with Android Pay.

For blocking ads in my android I used AdAway which is really nice but you need to become root. As for ad blocking it modifies the hosts files in the mobile and blocks the ads. But it cannot block the tracking. Then I was looking for the alternatives which will block the ads as well as can block the tracking. Then I found AdGuard. Did some research before installing and google for reviews… I found it’s good for using. I started with a trial on my mobile. The good thing about this is that you do not have to be root for using this. Without being root you can block ads and track in your device. I am sure if you try you will like it. When I found it is good for android and PC then I decided to purchase. Instead of going for a monthly subscription I found a lifetime license is a good option. I purchased a license for 2 PCs and 2 android devices. Like now you can see 30% off for back to school!

AdAway (root): https://f-droid.org/en/packages/org.adaway/

AdGuard (universal): https://adguard.com/

SSH Allowing remote hosts to connect to local forwarded ports

Sometimes some ISP dont allow user to use port 22 to ssh other server then user could not connect his desired server.
To solve this problem in server which user wants to connect, another port should be forwarded to 22 port. Then user can connect to that port.

In server side, someone should forward that port. Thats the problem… 😦

server side: ssh -gL 8022:localhost:22 localhost

& user should use -p switch to connect that server.

user side: ssh -p 8022 user@server_name

Categories: Unix Tags:

cut command

cut command displays the selected columns or fields from each line of a file.

Column selection mode:

A column is one character position. This type of selection is specified with -c option. List entries can be open (from the beginning like in -5, or to the end like in 6-), or closed (like 6-9).
cut -c 4,5,20 foo # cuts foo at columns 4, 5, and 20
cut -c 1-5 a.dat | more # print the first 5 characters of every line in the file a.dat

Field selection mode:

In this mode cut selects not characters but fields delimited by specifiec one character delimiter specified by option -d. The list of fields is specified with -f option ( -f [list] )

cut -d “:” -f1,7 /etc/passwd # cuts fields 1 and 7 from /etc/passwd cut -d “:” -f 1,6- /etc/passwd # cuts fields 1, 6 to the end from /etc/passwd

The default delimiter is TAB. If space is used as a delimiter, be sure to put it in quotes (-d ” “).

Categories: Ubuntu, Unix

Running jnlp files in Linux while using Firefox

it is quite simple you need to install jdk & you have to choose which file to open that.

1. Install jdk from http://java.sun.com

sudo ./jdk-6u14-ea-bin-b03-linux-i586-10_mar_2009.bin

2. try to open java web start file ( jnlp ) from browser and when browser prompt – openwith – direct to always open with /bin/javaws

Thats all you are done.

Categories: Ubuntu, Unix

installing VMWARE on UBUNTU (.bundle file)

To install .bundle file in ubuntu you need to run the following command

sudo sh VMware-Player-2.5.1-126130.i386.bundle

then follow the instruction & you are done.

Categories: Ubuntu, Unix

Install OpenOffice.org 3.0 on Ubuntu

In installing openoffice3 in ubuntu we have to first remove the existing openoffice from our system

sudo apt-get remove openoffice*.*

download a copy of OpenOffice.org 3.0 (OOo_3.0.0_LinuxIntel_install_en-US_deb.tar.gz worked for me) and extract the download:

tar -zxvf Ooo_3.0.0_LinuxIntel_install_en-US_deb.tar.gz

That will create a directory called something like OOO300_m9_native_packed-1_en-US.9358
Switch into the DEBS directory in that directory:

cd OOO300_m9_native_packed-1_en-US.9358/DEBS/

Now all you need to do is install all of those .deb packages:

sudo dpkg -i *.deb

That will do the trick. Once you’ve given your password your system should install all of the required files.

With that done you should have just one thing left to do: Install the desktop integration package. That should be in the DEBS folder:

cd desktop-integration

From that folder install the package:

sudo dpkg -i openoffice.org3.0-debian-menus_3.0-9354_all.deb

If everything works out you should be able to open OpenOffice.org 3.0 from the Applications menu on your desktop.

Disclaimer: It is always a good idea to backup your important stuff before removing applications and installing new ones.

One other problem with removing my previous version of OpenOffice.org was that my aspell spellchecker got messed up. Coincidence? Maybe, but if you have the same problem you may need to re-install aspell-en to get your spellchecker for apps such as pidgin working again.

Categories: Ubuntu, Unix

.bz2 extension handling

The .bz2 extension belongs to the bzip2 compression utility which replaces gzip. You may unpack the .tar.bz2 files directly using one of the following commands:

        using the newer version of tar:
tar xjf

or, using the older version of tar:
tar xIf

or, with all versions of tar:
bunzip2 -c | tar xf -

Categories: Ubuntu, Unix