Tuesday, March 24, 2015

See devices connected to your network

sudo apt-get install nmap

Get IP range of the network with ifconfig command. Look for wlan0 if you are using wifi or eth0 if you are using Ethernet.

    user@user-notebook:~$ ifconfig

    wlan0 Link encap:Ethernet HWaddr 70:f1:a1:c2:f2:e9
    inet addr:192.168.1.91 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::73f1:a1ef:fec2:f2e8/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2135051 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2013773 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1434994913 (1.4 GB) TX bytes:636207445 (636.2 MB)

The important things are highlighted in bold. Here IP is 192.168.1.91 and the subnet mask is 255.255.255.0 which means that the ip address range on the network varies from 192.168.1.0 to 192.168.1.255.


It is advisable to use root privileges while scanning the network for more accurate information. Use the nmap command in following way:


sudo nmap -sP 192.168.1.0/24

    Starting Nmap 5.21 ( http://nmap.org ) at 2012-09-01 21:59 CEST

    Nmap scan report for neufbox (192.168.1.1)
    Host is up (0.012s latency).
    MAC Address: E0:A1:D5:72:5A:5C (Unknown)
    Nmap scan report for takshak-bambi (192.168.1.91)
    Host is up.
    Nmap scan report for android-95b23f67te05e1c8 (192.168.1.93)
    Host is up (0.36s latency).
Here there are three devices connected to a network.

~SOURCE!~

A GUI free program: WifiGuard

Friday, March 20, 2015

Create shortcuts with xbindkeys

Install xbindkeys 

sudo apt-get install xbindkeys
 

Create the default config file for xbindkeys 

xbindkeys --defaults > /home/your-user-name/.xbindkeysrc
 

When thats done, install xbindkeys-config, the GUI for xbindkeys

sudo apt-get install xbindkeys-config
 

Now the utility that actually does the "typing"

sudo apt-get install xvkbd
 

Once each is installed, start both applications by bringing up "Run Application"
 with ALT -F2.

xbindkeys
 
and

xbindkeys-config
 
The above is to start the GUI settings.
 
 
Ensure that <xbindings> is added to startup applications.

To have the GUI in applications, create a /usr/share/applications/xbindings_config.desktop

paste this there:

[Desktop Entry]
Name=Xbindkeys Setting
Comment=Set keys
Exec=xbindkeys-config
Icon=input-keyboard
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;

Make it executable.

To install in Opensuse:

Here and here.

Thursday, March 19, 2015

OpenSuse - First steps

It has a lot of one-click installation sources and many programs have links for Opensuse..

https://software.opensuse.org/find

Search for themes, icons and programsm including Deadbeef.

Xfce sources: http://download.opensuse.org/repositories/X11:/xfce/openSUSE_13.2/xfce.ymp

Multimedia codecs:
http://opensuse-guide.org/codecs.php

or directly this link that will be opened in the installer:
 
http://opensuse-community.org/codecs-kde.ymp


Also:

https://en.opensuse.org/Restricted_formats

For Deadbeef:

sudo zypper install deadbeef-restricted-plugins

VLC

Also, rpm packages can be installed with default program.

Search for such packages here:

http://rpm.pbone.net/
http://rpmfind.net/

Update in Terminal:
sudo zypper update


Friday, March 13, 2015

Create desktop file to see freespace

You need gnome terminal to create editable profile.

Open terminal and run

df -h

to see free space and identify the name of your system partition.

Let's say your system partition is /devsda5.

Then, create a desktop file with the content:

[Desktop Entry]
Name=Show free spacce
Comment=Show free space
Exec=gnome-terminal --window-with-profile=new1 -e "df -h /dev/sda5"
Icon=gnome-disks
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;

Save it to usr/share/applications and make it executable. Now you can run it from search.

To see space on all partitions, just use this line:

 Exec=gnome-terminal --window-with-profile=new1 -e "df -h"

Build and install packages in Arch, Manjaro, KaOS, Netrunner rolling etc

These systems use Pacman (CLI) to install programs.

To install in terminal:

first refresh repos:

sudo pacman -Syu

The generic install command is

sudo pacman -S packagename

Octopi is the Qt GUI for Pacman and is normally the software manager in the Arch-based-or-related systems that use KDE. Those that use Xfce or other GTK desktops will probably have Pamac, which  is a GTK GUI for Pacman. It is similar to Synaptic.

Octopi is able to install from already built packages (.pkg.tar.xz) but not tarball archives (.tar.xz).

Before searching for a program in Octopi be sure to refresh repos.

When the package is absent in repos, it can be built as follows:

Download the tarball package from AUR to (e.g.) ~/Build folder and extract it there, then go in terminal do

cd build/package_name

  • in order to build without installing

makepkg -s
(that will create an archive package .pkg.tar.xz in the package_name folder that can be installed with Octopi)

  • in order to build and install directly

makepkg -si




Friday, March 6, 2015

Wednesday, March 4, 2015

Format USB and write image from terminal command

1. Insert your USB drive into your system.
2. Open the terminal. (CTRL + ALT + T)
3. Look for the USB drive you want to format, by running:

 df
 
The command above will display the directory path of your various drives. Take note of the drive you wish to format.

df-command-unixmen

In this tutorial, the name of the drive am going to format is Seth and its path under the filesystem is /dev/sdc1.

3. Unmount drive using the syntax below:

 sudo umount /dev/sdc1
 
umount

4. Now run this command to format drive to fat32:

 sudo mkfs.vfat -n 'Ubuntu' -I /dev/sdc1
 
mkfs.vfat-unixmen

Understanding the above command

mkfs

mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that shall contain the filesystem. The size argument is the number of blocks to be used for the filesystem.

vfat

Formats the drive to FAT32, other formats available are mkfs.bfs, mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.minix, mkfs.msdos, mkfs.vfat, mkfs.xfs, mkfs.xiafs etc.

-n

Volume-name sets the volume name (label) of the file system. The volume name can be up to 11 characters long. The default is no label. In this tutorial my volume-name is Ubuntu.

-I

It is typical for fixed disk devices to be partitioned so by default, you are not permitted to create a filesystem across the entire device.

format-complete

Running $ df after formatting displays this.

df-after-format-unixmen

You are done and your pen drive has successfully been formatted.


In order to create a bootable USB flash drive, you will need coreutils (which provides dd). Most GNU distributions have coreutils already installed.
To use dd, open a terminal and write (substitute the correct path):

sudo dd if=/path/to/the/downloaded/iso of=/path/to/the/USB/device


to see the progress of this, open a separate terminal window and do
watch -n5 'sudo kill -USR1 `pgrep ^dd`

which every 5 secs reports the progress in the initial terminal window (source)


To check if the creation of the bootable USB stick was successful, use fdisk as root to check it. You should see an asterisk (*) like this in your USB line:

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 697 713728 17 Hidden HPFS/NTFS



(Sources here and here.)

---


As this may not always lead to success, here is a second solution:

get the script from here and make it executable(as root, with chmod +x /usr/bin/live-fat-stick) after copying it to /usr/bin/, make sure you have syslinux and gpart installed before running it.
Run the following as root (with su -, not using sudo) in terminal:
# live-fat-stick -l
to get the USB device path.

# live-fat-stick --suse /path/to/openSUSE-filename.iso /dev/sdXY
to copy iso to USB device and make it bootable.

# live-fat-stick -h
it shows help.

Multiple iso images from multiple distributions can be added to the USB device, boot menu will offer a choice of distribution to boot from. Scripts does not format or remove data from the device.