Monday, January 26, 2015

Command to cycle displays

I have found here about Disper. See link for details.

It can be installed from Synaptic or the terminal.
The command to cycle between clone, extended, internal and external displays should be like this:
disper --cycle-stages='-e : -c : -S : -s' --cycle
and that can be run with a short-key.
Disper will detect displays and use the maximal resolutions by default. If no external display is connected, nothing will happen when the short-key is touched.

Friday, January 23, 2015

Use Thunar custom actions to extract audio from video (without transcoding)

sudo apt-get install libav-tools
sudo apt-get install parallel  
Add the following command to Thunar custom actions:

xfce4-terminal -e "parallel avconv -i '{}' -map 0:1 -c:a copy '{}.m4a' ::: %F"
and the following conditions: *.mp4; *.flv,  video files.
That will extract to m4a container the acc audio from mp4 and flv selected files.
Or, also using `avconv`, but without the need to install `parallel`,   make an executable script, like

#! /bin/sh -e
for i in *.mp4; do avconv -i "${i}" -map 0:1 -c:a copy "${i%.mp4}.m4a"; done

Make it executable and save it.
In Thunar custom actions add a new entry with the command  

bash /path/to/the/script %F

and the following conditions: *.mp4, video files.

This needs separate custom actions for each file type (because it is limited to mp4 to m4a: make changes accordingly for flv to m4a, webm to ogg, avi to mp3 etc) but has the advantage that the output keeps the exact input name (file.mp4 becomes file.m4a), while with the first command does not (file.mp4 becomes file.mp4.m4a).

Change mac adress with Macchanger

sudo apt-get install macchanger macchanger-gtk

Start with the command


Sunday, December 21, 2014

Edit icon sets

You might want to change or keep just a part of an icon set.

The folder icon is in 'places' folder (multiple scales).

The file manager back-forward icon is in 'actions'.

Saturday, December 20, 2014

Install latest QMMP Player in Ubuntu with File Browser

sudo add-apt-repository ppa:forkotov02/ppa&&sudo apt-get update&&sudo apt-get install qmmp&&sudo apt-get install qmmp-plugin-pack

Then go  to Settings/Plugins/

Thursday, December 18, 2014

Fix Unity problem with Plank dock (and other docks)

  • Find plank.desktop file ~/.config/autostart and add this code,X-GNOME-Autostart-Delay=20
Steps to solve easily (tested in Ubuntu 14.04)
  1. Run gedit without root
  2. Click open file menu and press Ctrl+H
  3. Open file ~/.config/autostart/plank.desktop
  4. Add this
  5. Save and close
  6. Reboot your unity/gnome
Delay time more than 20 works fine.
  • Select Plank startup application from startup application and change command option to:
    sh -c "sleep 30; exec plank -o"
    source here and here
  • Create a script called startdock, with the text
    #! /bin/sh -e
    sleep 20
    exit 0
    Make it executable, and in the startup items add a new command with path to this script.

Install MPV Player in Ubuntu

sudo add-apt-repository ppa:mc3man/trusty-media&&sudo apt-get update&&sudo apt-get install mpv