Pages

Wednesday, 26 August 2015

Radio Tray elementary os fix

To Install type this in the terminal:
sudo apt-get install radiotray

Then go to:
gedit /usr/lib/python2.7/dist-packages/radiotray/SysTray.py

Now find this line: gtk.gdk.threads_init()

Comment it with a pound sign in front of it:
# gtk.gdk.threads_init()

Save it and open it from the apps drawer.

Wednesday, 15 October 2014

Wifi and LAN at the same time - force using wifi to access internet

In order to play music from my NAS connected to router I must be connected to the same network. But I want to use wifi to browse internet on faster connection from different network. By default with wifi connected and lan cable simultaneously my elementary os was using lan network for all trafic.

Below command switched it to wifi:

sudo ip route replace default via 192.168.1.1 dev wlan0 proto static

IP 192.168.1.1 is the gateway from wifi network.

Saturday, 4 October 2014

Undelete files on Linux

I accidentally deleted pictures from SD Card from my tablet. Any android undelete applications failed to identify what I was looking for. I decided to try undelete on my elementary os and the choice was to use PhotoRec. That program recovers lost files by checking data blocks one by one against a signature database of different file types.


  • Supported file formats: video (avi, mov, mp3, mp4, mpg), image (jpg, gif, png), audio (mp3, ogg), document (doc(x), ppt(x), xls(x), html), archive (gz, zip) etc.
  • Supported file systems: EXT2, EXT3, EXT4, HFS+, FAT, NTFS, exFAT
Took most recent version:


For 32-bit Linux:

wget http://www.cgsecurity.org/testdisk-7.0-WIP.linux26.tar.bz2
tar xvfvj testdisk-7.0-WIP.linux26.tar.bz2

For 64-bit Linux:

wget http://www.cgsecurity.org/testdisk-7.0-WIP.linux26-x86_64.tar.bz2
tar xvfvj testdisk-7.0-WIP.linux26-x86_64.tar.bz2

The PhotoRec executable (photorec_static) is found in the extracted directory.

cd testdisk-7.0-WIP/
sudo ./photorec_static 

Next I selected default options. Next challenge was to find pictures that I was looking for among over 50 000 recovered files in multiple subfolders. Most of them were cached browser images and any android stuff. My pictures were large, more than 4 MB. I used find command to copy qualified files to another folder:

find . -type f -size +4M -name "*.jpg" -exec cp {} /home/lukasz/Downloads/testdisk-7.0-WIP/Recovered/Large \;

Finally all my files were in Large folder.





Monday, 29 September 2014

Elementary OS messed up resolution on logon screen

After connecting secondary monitor to my laptop the login screen looks like it lost display settings and got resolution changed. I was having trouble finding solution, following is what worked for me:


1. In terminal run xrandr -q to check monitor details.

Laptop display: LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 164mm

External monitor: VGA1 connected 1280x1024+1366+33 (normal left inverted right x axis y axis) 376mm x 301mm

2. Create script txt file eg. loginScreenFix.sh with following content:

#!/bin/sh
xrandr --output LVDS1 --primary --mode 1366x768

3. Make it executable with: chmod a+rx loginScreenFix.sh

Can run it to test if worked but resolution should be changed to see difference

4. Copy this to shared folder:

sudo cp loginScreenFix.sh /usr/share/

5. To run it on logon screen I updated lightdm config:

sudo gedit /etc/lightdm/lightdm.conf

Add my fix script path at the end:

display-fix-script=/usr/share/loginScreenFix.sh

6. Reboot to check if it worked.


Sunday, 2 March 2014

Open WRT separate 2nd WAN + Load balancing

This post explained what I really need: http://www.dd-wrt.com/wiki/index.php/Switched_Ports#Second_WAN_port

Second WAN Port:
nvram set vlan0ports="1 2 3 5*" 
nvram set vlan1ports="0 4 5" 
nvram commit 
reboot
 
Then apply multi WAN 
 
http://wiki.openwrt.org/doc/howto/mwan3 

Screen recording

Use that http://www.omgubuntu.co.uk/2013/12/simple-screen-recorder-linux

Install Simple Screen Recorder in Ubuntu 12.04 & Up

Want it? The app is free and can be installed on Ubuntu 12.04 and up by adding its dedicated PPA to your Software Sources.

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder
sudo apt-get update && sudo apt-get install simplescreenrecorder



Thursday, 20 February 2014

How I enabled middle click on touchpad [Not reliable]

Installed synaptiks in software centre. Not sure why it worked when I lauched it from terminal.