Search This Blog

16 August, 2016

virtual machine shared folder permission


When using Ubuntu on Virtual Box, you can share a folder between Windows Hosta and Ubunut Guest, after doing the sharing, you need to set the permission so that it can be accessed using the normal user login



You need to type the followinf command to add the permission for the normal user to access it

sudo usermod -aG vboxsf <youruser_name>

or

sudo usermod -aG vboxsf `whoami`


Wi-Fi command line commands

Wi-Fi(IEEE 802.11) command line useful commands

Wi-Fi AP Mode
1) Scan the network

iw dev wlan0 scan or
iw dev wlan0 scan ap-force


2) Connected Devices to the Wi-Fi Access Point (wifi AP mode)

Using hostapd cli:  hostapd_cli all_sta
using iw: iw dev wlan0 station dump


Wi-Fi Station/Client Mode

1) To Scan network

iw dev wlan0 scan 

to show only the SSID from the ouput
iw dev wlan0 scan | grep SSID






using ctag with PHP


ctags-exuberant -f php.tags --languages=PHP -R



23 July, 2016

ubuntu showing menu always

15.04 and baove has the ability to toggle the global menu as well as the local integrated menus (Via System Settings - Appearance - Behaviour tab) to be permanently on or off.

If you are running a fully up-to-date version of 14.04, this same ability has been backported.

To switch on permanently:

gsettings set com.canonical.Unity always-show-menus true

To switch off i.e. to autohide:

gsettings set com.canonical.Unity always-show-menus false

24 June, 2016

Highlighting or making prominent the active Terminal tab in Ubuntu Linux

For highlighting or making prominent the active tab of the Terminal in Ubuntu Linux

 create a file named ~/.config/gtk-3.0/gtk.css

and paste the below content, You can change the color as you want. Hope this helps


TerminalWindow .notebook tab:active {
    background-color: #b0c0f0;
}


31 March, 2016

git drop all local changes and commit and sync to remote server

There are times while working with git, you want to drop all your local changes and commit and sync the files to be same as the git server. The steps to follow are
1) fetch the latest history from the server
2) pointing your local master branch at it like this

git fetch origin
git reset --hard origin/master

if you want to do this for a branch, change the master with the branch name

18 February, 2016

Android Showing IP address and Route Table

For checking the IP address and Routing Table in Android using command line mode in the linux console is below. For this you need to root the device or it should be engineering build which engineers use for development.

To Show IP Address, MAC address and Interface Status
Type  netcfg  or ip addr

To See The Routing Table
cat /proc/net/route   OR   ip route show

To show DNS IP Addresss
getprop net.dns1
getprop net.dns2

net.dns1 for the Primary DNS and net.dns2 for the Secondary DNS

For changing the DNS IP Address:
setprop net.dns1 111.111.111.111
setprop net.dns2 222.222.222.222




tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...