Friday, March 13, 2015

Ubuntu 14.04 LTS USB not working (autosuspending)

To correct this, execute the following commands on terminal:

sudo su
for foo in /sys/bus/usb/devices/*/power/level;
do echo on > $foo;
done 
 
Extracted from http://askubuntu.com/questions/80638/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse

Wednesday, March 11, 2015

Solve Ubuntu 14.04 LTS network suspending problem

To solve this problem, create a script file as bellow:

sudo gedit etc/pm/sleep.d/script.sh


With the following content:
#!/bin/sh

case "${1}" in
        resume|thaw)
        nmcli nm sleep false
                ;;
esac


Now make it executable:
sudo chmod +777 etc/pm/sleep.d/script.sh

 
It's done!

Tutorial extracted from http://askubuntu.com/questions/452826/wireless-networking-not-working-after-resume-in-ubuntu-14-04

How to create a Wifi network with Ubuntu 14.04

First of all, install the app-hotspot (before start it, read this entire LucasTipss tutorial):
http://www.edivaldobrito.com.br/como-criar-hotspot-wi-fi-portatil-para-celulares-android-windows-no-ubuntu/

Now, there's a bug with ubuntu 14.04 LTS. To fix it, follow the bellow steps. The solution is a downgrade of the system. (extracted from http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html)

Fot 64-bit:
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd
For 32-bit:
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

Wednesday, January 28, 2015

SSH Commands

Upload a folder via ssh:
scp -r /var/www/html/fence-tutorial/* atglance@lxplus.cern.ch:~/www/stage-lucas/fence-tutorial

Download a folder
scp -r lvieirag@sub:/srv/lucas/ . 

Friday, December 19, 2014

How to connect Ubuntu 12.04 LTS to Android Device using MTP

Observations:
  • Modern android versions doesn't support "USB Mass Storage" connection, only MTP
  • Old Ubuntu versions (mine was 12.04 LTS) doesn't have the proper dependencies installed by default. Heard 13.04 does.

Tutorial that worked for me:

http://www.humans-enabled.com/2011/12/how-to-fix-samsung-galaxy-nexus-mtp.html

Monday, November 17, 2014

How to use fancyBox

Tips:
  • use this tutorial: http://fancybox.net/howto
  • if it's an image
    • if the URL of the fancyBoxed doesn't end with it's extention, e.g. .png, .jpg
      • you need to specify the image type on your js: 
        • $(document).ready(function() {
                  $(".fancybox").fancybox({type : "image"});
                  });

Monday, November 10, 2014

How to install and run QtiPlot on Linux

Download Demo/Evaluation version on this website:
http://www.qtiplot.com/download.html

For running, just execute the qtiplot executable file under the root directory
./qtiplot-0.9.8.7/qtiplot

I had the following problem. Due to x86 x64 compatibility, the library libGLU.so.1 x86 version was not installed.
./qtiplot-0.9.8.7/qtiplot: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

To solve:
sudo apt-get install libglu1-mesa:i386 - or try to get libglu-1XXX (other version)