Wednesday, December 30, 2015

Download video from Arte online 7+

  1. start the video on the arte website
  2. right click on that page and select “View Page Source”
    enter image description here
  3. search "player" inside an address ending with "json' enter image description here
  4. open that address
  5. on that page you are looking for an address that starts with "http://" and ends with ".mp4". But there are many addresses like that of different quality/resolution, and they may be in French, German, or a different original language like English. So, in order to select the correct address, find it in a group of lines identified according to:
    • quality: if you want HD ,search for "HD -"
    • language version; look in the address (or in that 3-4 line group); for example, VO is original version, VOF is French original version if the original is French, STF stands for French subtitles, VA stands for German (Allemande) version, STA for German subtitles.
enter image description here
  1. open that address and the video will start (now you can check if you have selected the correct language)
enter image description here 7. save video/page, or with FlashGot addon in Firefox or by other such method send the link to an external enhanced downloader like Flareget, uGet, Axel.

Saturday, November 28, 2015

Fix installation problems with aptitude

sudo apt-get install aptitude

sudo aptitude --full-resolver -f install <package>

Wednesday, October 21, 2015

Switch keyboard layouts

Alternative to panel tray plugins:
  1.  with a search/launch application like Synapse, Dash, etc
  2. as launchers in a dock or panel 

1. Use Synapse and similar.

The idea is to use the `setxkbmap` command, thus:

setxkbmap us

setxkbmap us intl

setxkbmap fr

setxkbmap ro std_cedilla

And put such commands in desktop files like:

[Desktop Entry]
Name=Keyboard US International dead Keys
Exec=setxkbmap us intl

Copying these file.desktop files in /usr/share/applications should make them searchable with launchers like Synapse, Unity Dash, Whisker Menu etc.

2. As launchers.

After creating desktop files as above they can be added (as for any other application) to a panel or dock as launchers.

If put all in a folder they can be stacked together in Plank dock.

MPV: my ~/.config/mpv/input.conf file

# mpv keybindings
# Location of user-defined bindings: ~/.config/mpv/input.conf
# Lines starting with # are comments. Use SHARP to assign the # key.
# Copy this file and uncomment and edit the bindings you want to change.
# List of commands and further details: DOCS/man/input.rst
# List of special keys: --input-keylist
# Keybindings testing mode: mpv --input-test --force-window --idle
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
# Strings need to be quoted and escaped:
#   KEY show-text "This is a single backslash: \\ and a quote: \" !"
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
# The default keybindings are hardcoded into the mpv binary.
# You can disable them completely with: --no-input-default-bindings

# Developer note:
# On compilation, this file is baked into the mpv binary, and all lines are
# uncommented (unless '#' is followed by a space) - thus this file defines the
# default key bindings.

# If this is enabled, treat all the following bindings as default.
#default-bindings start

#MOUSE_BTN0 ignore                      # don't do anything
#MOUSE_BTN0_DBL cycle fullscreen        # toggle fullscreen on/off
#MOUSE_BTN2 cycle pause                 # toggle pause on/off
#MOUSE_BTN3 seek 10
#MOUSE_BTN4 seek -10
#MOUSE_BTN5 add volume -2
#MOUSE_BTN6 add volume 2

# Mouse wheels, touchpad or other input devices that have axes
# if the input devices supports precise scrolling it will also scale the
# numeric value accordingly
#AXIS_UP    seek 10
#AXIS_DOWN  seek -10
#AXIS_LEFT  seek 5
#AXIS_RIGHT seek -5

## Seek units are in seconds, but note that these are limited by keyframes
#RIGHT seek  5
#LEFT  seek -5
#UP    seek  60
#DOWN  seek -60
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
# Don't show them on the OSD (no-osd).
#Shift+RIGHT no-osd seek  1 exact
#Shift+LEFT  no-osd seek -1 exact
#Shift+UP    no-osd seek  5 exact
#Shift+DOWN  no-osd seek -5 exact
# Skip to previous/next subtitle (subject to some restrictions; see manpage)
#Ctrl+LEFT   no-osd sub-seek -1
#Ctrl+RIGHT  no-osd sub-seek  1
#PGUP add chapter 1                     # skip to next chapter
#PGDWN add chapter -1                   # skip to previous chapter
#Shift+PGUP seek 600
#Shift+PGDWN seek -600
#[ multiply speed 0.9091                # scale playback speed
#] multiply speed 1.1
#{ multiply speed 0.5
#} multiply speed 2.0
#BS set speed 1.0                       # reset speed to normal
#q quit
#Q quit-watch-later
#q {encode} quit 4
#ESC set fullscreen no
#ESC {encode} quit 4
#p cycle pause                          # toggle pause/playback mode
#. frame-step                           # advance one frame and pause
#, frame-back-step                      # go back by one frame and pause
#SPACE cycle pause
#> playlist-next                        # skip to next file
#ENTER playlist-next                    # skip to next file
#< playlist-prev                        # skip to previous file
#O no-osd cycle_values osd-level 3 1    # cycle through OSD mode
#o show-progress
#P show-progress
#I show-text "${filename}"              # display filename in osd
#z add sub-delay -0.1                   # subtract 100 ms delay from subs
#x add sub-delay +0.1                   # add
#ctrl++ add audio-delay 0.100           # this changes audio/video sync
#ctrl+- add audio-delay -0.100
#9 add volume -2
#/ add volume -2
#0 add volume 2
#* add volume 2
#m cycle mute
#1 add contrast -1
#2 add contrast 1
#3 add brightness -1
#4 add brightness 1
#5 add gamma -1
#6 add gamma 1
#7 add saturation -1
#8 add saturation 1
# toggle deinterlacer (automatically inserts or removes required filter)
#d cycle deinterlace
#r add sub-pos -1                       # move subtitles up
#t add sub-pos +1                       #                down
#v cycle sub-visibility
# stretch SSA/ASS subtitles with anamorphic videos to match historical
#V cycle ass-vsfilter-aspect-compat
# switch between applying no style overrides to SSA/ASS subtitles, and
# overriding them almost completely with the normal subtitle style
#u cycle-values ass-style-override "force" "no"
#j cycle sub                            # cycle through subtitles
#J cycle sub down                       # ...backwards
#Ctrl+A cycle audio                      # switch audio streams
#_ cycle video
#T cycle ontop                          # toggle video window ontop of other windows
#f cycle fullscreen                     # toggle fullscreen
#s screenshot                           # take a screenshot
#S screenshot video                     # ...without subtitles
#Ctrl+s screenshot window               # ...with subtitles and OSD, and scaled
#Alt+s screenshot each-frame            # automatically screenshot every frame
#w add panscan -0.1                     # zoom out with -panscan 0 -fs
#e add panscan +0.1                     #      in
#cycle video aspect ratios; "-1" is the container aspect
#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
#POWER quit
#PLAY cycle pause
#PAUSE cycle pause
#PLAYPAUSE cycle pause
#STOP quit
#FORWARD seek 60
#REWIND seek -60
#NEXT playlist-next
#PREV playlist-prev
#VOLUME_UP add volume 2
#VOLUME_DOWN add volume -2
#MUTE cycle mute
#CLOSE_WIN {encode} quit 4
#E cycle edition                        # next edition
#l ab_loop                              # Set/clear A-B loop points
#L cycle-values loop "inf" "no"         # toggle infinite looping
#ctrl+c quit 4

# Apple Remote section
#AR_PLAY cycle pause
#AR_CENTER cycle pause
#AR_NEXT seek 10
#AR_NEXT_HOLD seek 120
#AR_PREV seek -10
#AR_PREV_HOLD seek -120
#AR_MENU show-progress
#AR_MENU_HOLD cycle mute
#AR_VUP add volume 2
#AR_VUP_HOLD add chapter 1
#AR_VDOWN add volume -2
#AR_VDOWN_HOLD add chapter -1

# For tv://
#h cycle tv-channel -1                  # previous channel
#k cycle tv-channel +1                  # next channel

# Legacy bindings (may or may not be removed in the future)
#! add chapter -1                       # skip to previous chapter
#@ add chapter 1                        #         next

# Not assigned by default
# (not an exhaustive list of unbound commands)

# ? add sub-scale +0.1                  # increase subtitle font size
# ? add sub-scale -0.1                  # decrease subtitle font size
# ? sub-step -1                         # immediately display next subtitle
# ? sub-step +1                         #                     previous
# ? cycle-values window-scale 0.5 2 1   # switch between 1/2, 2x, unresized window size
# ? cycle colormatrix
# ? add audio-delay 0.100               # this changes audio/video sync
# ? add audio-delay -0.100
# ? cycle angle                         # switch DVD/Bluray angle
# ? add balance -0.1                    # adjust audio balance in favor of left
# ? add balance 0.1                     #                                  right
# ? cycle sub-forced-only               # toggle DVD forced subs
# ? cycle program                       # cycle transport stream programs
# ? stop                                # stop playback (quit or enter idle mode)

Alt+a cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
Ctrl+a cycle audio                      # switch audio streams
Ctrl+f cycle fullscreen        # toggle fullscreen on/off
Ctrl+s cycle sub                            # cycle through subtitles
Meta+UP add sub-pos -1                       # move subtitles up
Meta+DOWN add sub-pos +1                       #                down
Meta+Alt+s cycle sub-visibility
MOUSE_BTN0 ignore                      # don't do anything
MOUSE_BTN0_DBL cycle fullscreen        # toggle fullscreen on/off
MOUSE_BTN2 cycle pause                 # toggle pause on/off
MOUSE_BTN3 add volume 2
MOUSE_BTN4 add volume -2
#MOUSE_BTN5 add volume -2
#MOUSE_BTN6 add volume 2
MOUSE_BTN1 cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
Ctrl+RIGHT seek  60
Ctrl+LEFT  seek -60
UP    add volume 2
DOWN  add volume -2

Fluxbox: my ~/.fluxbox/keys file

 #Mod1    == Alt
 #Mod4    == Windows key
 #Control == Ctrl
 #Shift   == Shift


# launch applications
Mod4 F1 :Exec pcmanfm
Mod4 F2 :Exec palemoon
Mod4 F3 :Exec pcmanfm
Shift Mod4 F3 :Exec gksu pcmanfm
Mod4 t :Exec lxterminal
Mod1 x :Exec gnome-terminal
Mod4 x :Exec oblogout
XF86HomePage :Exec firefox
Mod4 p :Exec lxrandr
Mod4 z :Exec libreoffice --writer
Shift x :Exec lxtask
Ctrl Shift p :Exec bash -c 'xfce4-screenshooter -r'
#0xff61 :Exec bash -c 'xfce4-screenshooter -r'
Mod4 s :Exec synapse
Mod4 m :Exec /usr/share/applications/mousepad.desktop
Ctrl Mod1 r :Exec setxkbmap ro std_cedilla
Ctrl 2 :Exec xrandr --output VGA1 --mode 1360x768 --rate 60.02 --right-of LVDS1 --output LVDS1 --mode 1600x900
Ctrl 1 :Exec xrandr --output VGA1 --mode 1360x768 --same-as LVDS1 --output LVDS1 --off
Ctrl 3 :Exec xrandr --output VGA1 --off --output LVDS1 --mode 1600x900 --rate 60.08
Mod1 t :Exec xinput set-prop 16 "Device Enabled" 1
Ctrl t :Exec xinput set-prop 16 "Device Enabled" 0
Ctrl Esc :Exec oblogout

# click on the desktop to get menus
OnDesktop Mouse1 :HideMenus
OnDesktop Mouse2 :WorkspaceMenu
OnDesktop Mouse3 :RootMenu

# scroll on the desktop to change workspaces
OnDesktop Mouse4 :PrevWorkspace
OnDesktop Mouse5 :NextWorkspace

# scroll on the toolbar to change current window
OnToolbar Mouse4 :PrevWindow {static groups} (iconhidden=no)
OnToolbar Mouse5 :NextWindow {static groups} (iconhidden=no)

# alt + left/right click to move/resize a window
OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
OnWindowBorder Move1 :StartMoving

OnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}
OnLeftGrip Move1 :StartResizing bottomleft
OnRightGrip Move1 :StartResizing bottomright

# alt + middle click to lower the window
OnWindow Mod1 Mouse2 :Lower

# control-click a window's titlebar and drag to attach windows
OnTitlebar Control Mouse1 :StartTabbing

# double click on the titlebar to shade
OnTitlebar Double Mouse1 :Maximize

# left click on the titlebar to move the window
OnTitlebar Mouse1 :MacroCmd {Raise} {Focus} {ActivateTab}
OnTitlebar Move1  :StartMoving

#---THIS IS MINE!!!!!#################
# scroll on a window's titlebar to shade
OnTitlebar Mouse4 :Shade
OnTitlebar Mouse5 :Shade

# middle click on the titlebar to lower
OnTitlebar Mouse2 :Close

# right click on the titlebar for a menu of options
OnTitlebar Mouse3 :Minimize
OnTitlebar Mouse3 Shift :WindowMenu

# alt-tab
Mod1 Tab :NextWindow {groups} (workspace=[current])
Mod1 Shift Tab :PrevWindow {groups} (workspace=[current])

# cycle through tabs in the current window
Mod4 Tab :NextTab
Mod4 Shift Tab :PrevTab

# go to a specific tab in the current window
Mod4 1 :Tab 1
Mod4 2 :Tab 2
Mod4 3 :Tab 3
Mod4 4 :Tab 4
Mod4 5 :Tab 5
Mod4 6 :Tab 6
Mod4 7 :Tab 7
Mod4 8 :Tab 8
Mod4 9 :Tab 9

# open a terminal
Mod1 F1 :Exec lxterminal

# open a dialog to run programs
Mod1 F2 :Exec fbrun -font monospace-14

# open dmenu
#Mod4 space :Exec dmenu_extended_run
Mod4 space :Exec dmenu_recency
#Mod4 space :dmenu_regency -b -fn 'Monospace 12'

# volume settings, using common keycodes
# if these don't work, use xev to find out your real keycodes
176 :Exec amixer sset Master,0 1+
174 :Exec amixer sset Master,0 1-
160 :Exec amixer sset Master,0 toggle

# current window commands
Mod1 F4 :Close
Mod1 F5 :Kill
Mod1 F9 :Minimize
Mod1 F10 :Maximize
Mod1 F11 :Fullscreen

# open the window menu
Mod1 space :WindowMenu

# exit fluxbox
Control Mod1 Delete :Exit

# change to previous/next workspace
Control Mod1 Left :PrevWorkspace
Control Mod1 Right :NextWorkspace

# send the current window to previous/next workspace
Mod4 Left :SendToPrevWorkspace
Mod4 Right :SendToNextWorkspace

# send the current window and follow it to previous/next workspace
Control Mod4 Left :TakeToPrevWorkspace
Control Mod4 Right :TakeToNextWorkspace

# change to a specific workspace
Control F1 :Workspace 1
Control F2 :Workspace 2
Control F3 :Workspace 3
Control F4 :Workspace 4
Control F5 :Workspace 5
Control F6 :Workspace 6
Control F7 :Workspace 7
Control F8 :Workspace 8
Control F9 :Workspace 9
Control F10 :Workspace 10
Control F11 :Workspace 11
Control F12 :Workspace 12

# send the current window to a specific workspace
Mod4 F1 :SendToWorkspace 1
Mod4 F2 :SendToWorkspace 2
Mod4 F3 :SendToWorkspace 3
Mod4 F4 :SendToWorkspace 4
Mod4 F5 :SendToWorkspace 5
Mod4 F6 :SendToWorkspace 6
Mod4 F7 :SendToWorkspace 7
Mod4 F8 :SendToWorkspace 8
Mod4 F9 :SendToWorkspace 9
Mod4 F10 :SendToWorkspace 10
Mod4 F11 :SendToWorkspace 11
Mod4 F12 :SendToWorkspace 12

# send the current window and change to a specific workspace
Control Mod4 F1 :TakeToWorkspace 1
Control Mod4 F2 :TakeToWorkspace 2
Control Mod4 F3 :TakeToWorkspace 3
Control Mod4 F4 :TakeToWorkspace 4
Control Mod4 F5 :TakeToWorkspace 5
Control Mod4 F6 :TakeToWorkspace 6
Control Mod4 F7 :TakeToWorkspace 7
Control Mod4 F8 :TakeToWorkspace 8
Control Mod4 F9 :TakeToWorkspace 9
Control Mod4 F10 :TakeToWorkspace 10
Control Mod4 F11 :TakeToWorkspace 11
Control Mod4 F12 :TakeToWorkspace 12

Manjaro Fluxbox: installing printer Canon Pixma MG2450

If you enable AUR you can identify them in Pamac. Search canon and mg2400.

Also with yaourt using terminal.

They are:

cnijfilter-common-mg2400 - and cnijfilter-mg2400series -

Be sure that gutenprint is also installed.

sudo pacman -S gutenprint

Maybe instead of gutenprint or along with it foomatic-db-engine  is also needed.

For the integrated scanner the driver is scangearmp-common (a common package).

The printer needs to be manually added.

Monday, October 12, 2015

Install from source

Never succeeded just yet, but the idea is:

Usually compiling involves nothing but execute a couple of commands. Try entering the directory, execute ./configure if no errors appear then execute make and if no errors appear then finally execute make install. If any of the previous steps go wrong then keep looking for the binaries, otherwise you have compiled and installed your first program from sources 

 (comment under this answer)


  • enter directory, execute ./configure
  • if no errors appear then execute make
  • if no errors appear then finally execute make install

Friday, October 9, 2015

Set mime types

Generic mime types for categories (that are not standard but work) should be like:

See and edit your mimetypes asociations and forms in


To get the mime type of a file from the command line use

file --mime-type -b filename

Generic mime types (all files):



Thursday, October 1, 2015

Install multiple deb files

terminal in folder  
sudo dpkg -i *.deb

The downside is that it installs everything without warning of any incompatibility or broken package.

Process video (or audio) with ffmpeg - trim, cut, join without transcoding.

The general command is

ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... 

The option -c stands for the "codec" to be used.

 -c copy means the file is not re-coded.

followed by time  (like  00:03:05.0 ) is the start time: all before that point is removed

followed by time (like 00:03:05.0 ) stands for the duration of output: all after that is removed

 -to serves to specify the end time inside the input (sometimes simpler to use instead of -t)


To keep data after a start point (up to the end):

ffmpeg -i INPUT -c copy -ss START_TIME -map 0 OUTPUT

To keep data between two time points:

ffmpeg -i INPUT -c copy -ss START_TIME -to END_TIME -map 0 OUTPUT

To keep data of a certain duration after a certain point:

ffmpeg -i INPUT -c copy -ss START_TIME -t DURATION_TIME -map 0 OUTPUT

To keep data of a certain duration after beginning:

ffmpeg -i INPUT -c copy -t DURATION_TIME -map 0 OUTPUT

To keep data from beginning up to a time point:

ffmpeg -i INPUT -c copy -to TIME_POINT -map 0 OUTPUT


To join mpeg files (including transport files)

 ffmpeg -i "concat:INPUT-1|INPUT-2" -c copy -bsf:a aac_adtstoasc OUTPUT


create a file called `join.txt` with the content

file 'path-to-INPUT1'
file 'path-to-INPUT2'


 ffmpeg -f concat -i join.txt OUTPUT

Monday, September 28, 2015

Generic convert command

To run a convert command on a selected file and keep the name of the file without adding the input extension into the output name

program "$0" "${0%%.*}".extension' %f


convert "$0" "${0%%.*}".png' %f

That can be used in a desktop file with bash:

Exec=bash -c 'convert "$0" "${0%%.*}".png' %f

Access FREEBOX disk (France)

Open in (file or web) browser: dur

Tuesday, September 22, 2015

Use Google Chrome flash in Firefox

Flash plugin is no longer supported for Linux as a separate package, but it still available for Google Chrome.

So, after installing Google Chrome and removing other flash plugins:

sudo add-apt-repository ppa:nilarimogard/webupd8&&sudo apt-get update&&sudo apt-get install freshplayerplugin

Wednesday, September 16, 2015

Fix font of internet browsers

~Superuser question: Different font in Linux Mint KDE affecting Google search and Gmail


Enter about:config in the address bar. Search for gfx.downloadable_fonts.enabled and change this flag to false. This option will be saved to your ~/.mozilla/firefox/prefs.js file which will then be loaded every time your start your browser.


Launch Chrome from the command line:
google-chrome --disable-remote-fonts

Monday, July 20, 2015

See available version of a program in terminal

To check the available version of a program in terminal, whether installed or not:

sudo apt-cache policy <program_name>

Friday, July 17, 2015

Install tar.gz package in Manjaro

pacman -U /path/to/filename.tar.gz

Edit plank dock settings manually

The config file is ~/.config/plank/dock1/settings

Settings are clearly described in the file and changes are immediate after saving the file.

Wednesday, July 8, 2015

Create and edit file using terminal

Open the terminal and fire (if you need sudo):

sudo nano path/to/file/filename


Type or paste the content you want

CTRL-G to see help options

CTRL-O to write to disk; confirm and save with ENTER.

Monday, June 15, 2015

Add Open Folder as Root to PCMan File Manager's context menu

Create the directory ~/.local/share/file-manager/actions

 In that folder, create root.desktop (not pcman_root.desktop or anything else).

leafpad ~/.local/share/file-manager/actions/root.desktop

Add this content:

[Desktop Entry]
Tooltip=Open Folder As Root
Name=Open Folder As Root

[X-Action-Profile profile-zero]
Exec=/usr/bin/gksu /usr/bin/pcmanfm %u
Name=Default profile
Save the file.

Restart pcmanfm:

killall pcmanfm


Tuesday, May 26, 2015

Monday, May 25, 2015

Set Xterm font size

Create or edit this file:

Add this:

xterm*font:     *-fixed-*-*-*-18-*

(or other font size)

Then do

xrdb -merge ~/.Xresources

Friday, May 22, 2015

Record playing sounds with Audacity

  1. If not already installed, add PulseAudio Volume Control (pavucontrol) to your system. This is usually available in the distribution's repository.
  2. Ensure that PulseAudio is running. In Audacity's Device Toolbar, set the Host to ALSA and the input device to pulse.
    • On systems where PulseAudio is the default sound system the input device may be set to default.
    • The output may be set to pulse or to any available soundcard.
  3. Ensure that "Software Playthrough" is not enabled in the Transport Menu then left-click on the Recording Meter to turn monitoring on.
  4. Open PulseAudio Volume Control and choose the "Recording" tab.
  5. In the "Capture from" dropdown, select the "Monitor" option of the playback device used by the application you want to record from, as shown below (ALSA may be accessible as seen below only when the recording software is running; so, you might need to start some sound and then the recording in Audacity to see this option):
  6. Launch the application that you wish to record and begin playback.
  7. In the "Recording" tab of PulseAudio Volume Control, drag the volume sliders so that the input level in Audacity's Recording Meter is to left of 0 dB (-6 dB is a good level to aim for).
    • The playback level of the application being recorded will also affect the level of the recording. Use the "Playback" tab in PulseAudio Volume Control or the volume control in the application to adjust the output level.
  8. When the input level has been correctly adjusted, press the Record button in Audacity .

Audacity should look like so:

The PulseAudio Volume Control should see Audacity:

Thursday, May 21, 2015

Record audio and split

To record, one can use Audio Recorder or Audacity. To split the recorded audio, import it in Audacity, and after identifying the separation between two tracks, click there and then Ctrl-B (that is 'Tracks-Add label at selection').

Then,  Ctrl-Shift-L (File-Export multiple).

Saturday, May 16, 2015

Set cursor theme in terminal

sudo update-alternatives --config x-cursor-theme

Also set your theme in /usr/share/icons/default/index.theme

Thursday, May 7, 2015

Xfce menu launcher 'Whiskermenu' shortcut

To have that with a shortkey the command is:


Skype in Antergos Arch

Skype is in multilib repo (i386). Enable it first by editing pacman.conf. In Terminal:
sudo gedit /etc/pacman.conf
Edit file by uncommenting below lines

Include = /etc/pacman.d/mirrorlist
Then, to update sources and install Skype:
sudo pacman -S skype

Thursday, April 30, 2015

Repair USB sticks

The next command wipes the entire disk, not only the partition table. (tested)
 sudo dd if=/dev/zero of=/dev/sdb bs=1M

( to see what path is your stick use the command `lsblk`)

To only wipe the partition table and Master Boot Record do

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1

to see the progress of this, open a separate terminal window and
watch -n5 'sudo kill -USR1 `pgrep ^dd`'
You will need to use gparted to create a new partition table and format.

Tuesday, April 28, 2015

Istall Adobe Reader in Ubuntu 14.04

For Ubuntu 14.04 LTS (or 13.10), 32 or 64-bit

[ from: ]
Adobe Reader 9 is not in the 'Partner' repository for 13.10 (or later).
  1. Download Adobe Reader (32-bit), from Adobe site:
    From here: .. reader .. 9.5.5
  2. Open a command line, change to the directory containing .deb file.
  3. Install package, forcing to accept 32-bit version and any errors:
    sudo dpkg -i --force-architecture AdbeRdr9.5.5-1_i386linux_enu.deb
    sudo apt-get -f install
  4. Add the missing 32-bit libraries: (skip this step for 32-bit)
    sudo apt-get install libxml2:i386 lib32stdc++6
  5. (OPTIONAL) Run for first time, to get icon in Unity menu bar.
    acroread <path>/<MyDocument>.pdf

Friday, April 24, 2015

Google search and translate selected text with shortcut

Install xclip

sudo apt-get install xclip

opensuse -here

Create a script like so:
#! /bin/sh
sh -c 'firefox "$(xclip -o)"'

Save it as

For translating:
#! /bin/sh
'sh -c 'firefox "$(xclip -o)"'

Adapt for custom languages, save as

Add shortkey for `sh path_to_our_script`

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: Bcast: Mask:
    inet6 addr: fe80::73f1:a1ef:fec2:f2e8/64 Scope:Link
    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 and the subnet mask is which means that the ip address range on the network varies from to

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

    Starting Nmap 5.21 ( ) at 2012-09-01 21:59 CEST

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


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.


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

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..

Search for themes, icons and programsm including Deadbeef.

Xfce sources:

Multimedia codecs:

or directly this link that will be opened in the installer:


For Deadbeef:

sudo zypper install deadbeef-restricted-plugins


Also, rpm packages can be installed with default program.

Search for such packages here:

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"

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:

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


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

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

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

Understanding the above command


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.


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.


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.


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.


Running $ df after formatting displays this.


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.

Tuesday, February 24, 2015

Recover text files with `strings`

Open a terminal in the target folder:

strings target.doc > recovered.doc
change <.doc> as needed.

Monday, February 23, 2015

Virtual Box

Hosting Windows

  • Guest addins and extension pack has to be installed.
  • To be able to get access to an attached USB device we need to be in the vboxusers group. This can be done from Users and Groups after having installed the gnome-system-tools Install gnome-system-tools or from the command line by
    sudo usermod -aG vboxusers <username> 
    Reboot or logout/login for group membership to take effect.
  • Share a folder between the host and the guest - here -

1. Open VirtualBox, and with the Windows 7 virtual machine selected in the left side, click the 'General' button on the "Details" tab.

Review image

2. In the settings window that appears, click the "Shared Folders" entry (last one) and then click on the little folder icon with a + on it (on the right) to add a new shared folder...

Review image
Review image

3. A new dialog appears, called Add Share. Click the arrow on the "Folder Path" field and select 'Other.' Search for the folder you want to share with the Windows 7 virtual machine and click OK...

Review image

4. You will now see the full path to the folder you want to share and you can give it a name or just leave it as it is. Click OK to close the "Add Share" dialog...

Review image

5. You will now see the folder in the "Shared Folders" section. Click OK to close the settings dialog...

Review image

6. Now, start the Windows 7 virtual machine. When the system is fully loaded, open My Computer and click on the "Map network drive" button...

Review image

7. In the new window that appears, select a driver letter on the "Drive" field (any letter you want from the list), and... here is the big secret... type \\vboxsrv\ followed by the name of your shared folder, in the "Folder" field!

Also, don't forget to check the "Connect using different credentials" option either.

Review image

After this, click the "Finish" button and you will be prompted to insert the username and password of your Linux machine. Check the "Remember my credentials" option and click the OK button...

Review image

You can see your shared folder in the My Computer window, under the Network Location section... and it also shows how much space is left on the drive...

Review image

Saturday, February 21, 2015

How to enable the new right-corner username menu in Chromium

In Google Chrome in Windows the old user avatar icon was replaced with a name-menu in the right corner.
How to get that in Linux Chromium?
enter image description here enter image description here

Set to 'enabled' and restart.
There is also another feature: setting that to 'disabled' will show the Google account user image instead of the avatar, or that image will become available among the avatar images.

Mount partition at startup

After trying unsuccessfully many well voted solutions, the one that worked is this

In terminal to see the UUID number of the partition:

sudo blkid

and get something like this:

/dev/sda1: LABEL="Windows 10" UUID="4ADE68FCDE68E1A5" TYPE="ntfs"
/dev/sda2: LABEL="Depo-ntfs" UUID="0F0CB2371E36F1DB" TYPE="ntfs"
/dev/sda5: LABEL="Ubuntu" UUID="03a03b26-176c-4004-baa6-c541367b5095" TYPE="ext4"
/dev/sda6: UUID="fc9a8598-aed9-42fa-aadc-e5f8a8cb4717" TYPE="ext4"
/dev/sda7: LABEL="Mint" UUID="738cefdf-c180-41cd-90b6-9f963c94aead" TYPE="ext4"
/dev/sda8: UUID="511de639-15bd-4a99-bcb0-074353e86b13" TYPE="ext4" 

use gparted or something to find which is which, or type 'mount' after having mounted it to see the dev/sdX details about it.

Now go

gksudo gedit /etc/fstab

and add at the end something like

UUID=0F0CB2371E36F1DB  /media/WHATER_PARTITION_NAME ntfs rw,nosuid,nodev,noatime,allow_other 0 0

Replacing the UUID with the proper number and your partition name (the one that you see it in File Manager or as Flag in Gparted) - also instead ntfs other type if the case.

Install Megasync monochrome icons

May be reset after updates.

You need `git` installed
sudo apt-get install git
Then download from here or here. Download, extract, open terminal in that folder and follow this instructions
git clone
cd megasync-elementary

How to make apt:// urls to open with apturl?

sudo apt-get install apturl
Latest version of chromium already uses xdg-open for any x-scheme-handler links.To configure xdg-open with apturl , go through following steps:
Make sure they are all set correctly:
  • Hit Alt+F2
  • Enter gconf-editor
  • Navigate to the /desktop/gnome/url-handlers/apt/command, it should be set to apturl "%s"
In terminal:

xdg-mime default apturl.desktop x-scheme-handler/apt