November 24, 2013

[SOLVED]HMA VPN via OpenVPN on Ubuntu with Network Manager


  • Install network-manager-openvpn-gnome
  • Download the vpn-config.zip ( http://hidemyass.com/vpn-config/vpn-config.zip )
  • Download the linux installer ( https://vpn.hidemyass.com/linux.zip )
  • Create vpn folder (e.g. ~/vpn)
  • Extract both zip files there
  • Open network-manager (System->Preferences->Network Connections)
  • Go to VPN tab
  • Import the *.ovpn entry for the location you wish to connect
  • Edit the entry and change the "Type" to Password with Certificates (TLS)
  • The gateway and cert/keys should already be populated from the import
  • Add your vpn username and password
  • Apply
  • Use the network icon in the panel to navigate to your VPN entry and connect






Source: http://wiki.hidemyass.com/Tutorials:HMA_VPN_via_OpenVPN_on_Ubuntu_with_Network_Manager

November 10, 2013

[SOLVED]Enable Hibernation in Ubuntu 13.10

sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Copy and paste below lines into the file and save it.

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

Source: http://ubuntuhandbook.org/index.php/2013/10/enable-hibernation-ubuntu-13-10/

October 20, 2013

[SOLVED]grub rescue

After unfortunate partition deletion/recovery I landed in "grub rescue" prompt

This helped me to get into ubuntu and repair the

#list your partitions
ls


#try to list contents of your linux partition and finding grub folder
ls (hd0,msdos3)/boot/grub


#use this partition
set prefix=(hd0,msdos3)/boot/grub


#set mod
insmod normal


#boot
normal

[SOLVED]resume: libgcrypt version: 1.5.*

After some partition problems I got the message on boot
resume: libgcrypt version: 1.5.*

....waited for 5 minutes to get into my ubuntu
sudo apt-get remove hibernate

it doesn't solved the issue

I booted one more time and made
sudo apt-get autoremove

package "uswsusp" was removed

after that I got no more resume libgcrypt messages

[SOLVED]resume: libgcrypt version: 1.5.*

After some partition problems I got the message on boot
resume: libgcrypt version: 1.5.*
....waited for 5 minutes to get into my ubuntu
sudo apt-get remove hibernate
it doesn't solved the issue I booted one more time and made
sudo apt-get autoremove
package "uswsusp" was removed after that I got no more resume libgcrypt messages

[SOLVED]grub rescue

After unfortunate partition deletion/recovery I landed in "grub rescue" prompt This helped me to get into ubuntu and repair the #list your partitions
ls
#try to list contents of your linux partition and finding grub folder
ls (hd0,msdos3)/boot/grub
#use this partition
set prefix=(hd0,msdos3)/boot/grub
#set mod
insmod normal
#boot
normal

August 27, 2013

[SOLVED] Install NodeJS on Debian

For Debian Wheezy, your best bet is to compile node by yourself:
sudo apt-get install python g++ make checkinstall
mkdir ~/src && cd $_
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
./configure
checkinstall #(remove the "v" in front of the version number in the dialog)
sudo dpkg -i node_*

Uninstall:
sudo dpkg -r node

In case you get a permission denied on the node executable, an alternative path might be:
umask 0022
./configure
make
checkinstall -D --umask 0022 --reset-uids --install=no
dpkg -i node_*.deb

 

Source: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-lmde

July 23, 2013

[SOLVED]How do I make Ubuntu appear as a bluetooth keyboard?

a compact version (essentially the same procedure – this worked better for me):



  1. Install libbluetooth-dev Install libbluetooth-dev.

  2. Download hidclient source code for Ubuntu. (Check the official page to make sure that's not out of date.) Put it in a folder by itself and extract its contents.

  3. Type make and press Enter to compile the source.

  4. Back up and edit your Bluetooth configuration:
    • sudo cp /etc/bluetooth/main.conf /etc/bluetooth/main.conf.old
    • gksu gedit /etc/bluetooth/main.conf
    • Under #DisablePlugins = network,input add the line DisablePlugins = input (no #).
    • Add a # to the beginning of Class = 0x000100; under it, write Class=0x000540 (no #).
    • Save the file and quit the text editor.

  5. If you want to be able to run hidclient like a normal command:
    • Run sudo cp hidclient /usr/local/bin.
    • Check if /usr/local/bin is in your path with echo $PATH.
    • If it's not, add it with any of these methods.
    If you skip this step, you can run hidclient by making sure you're in the directory where you compiled it, and running ./hidclient instead of hidclient.


Running hidclient


Run hidclient --help (or see the bottom of the web page) to see how to use it.

Except when run with the --help flag, hidclient must be run as root. So use sudo hidclient(followed by whatever options you're specifying, as explained in the help).

Basically, there's two steps:

  1. Run sudo hidclient -l for a numbered list of devices.

  2. Run sudo hidclient -eN -x, replacing N with the number of the device you want to "forward" over Bluetooth. In your case, this will be the keyboard.


You're all set. Tell your mobile device (iPad) to use a Bluetooth keyboard.

Terminating hidclient


The last thing you need to be able to do is to stop using the keyboard for Bluetooth input. See, whenhidclient is running, the device you select is no longer giving input to your Ubuntu system. If it were anything but the keyboard (say, the mouse), you could quit hidclient by pressing Ctrl+C in the Terminal.

But you cannot do that, because keyboard input won't go to the Terminal or any other Ubuntu program. The keyboard is acting as a Bluetooth device!

So, when "forwarding" the keyboard, quit hidclient by closing the Terminal window (or tab) in which it's running, with the mouse (or trackpad).

  • Of course, if your Ubuntu machine has multiple keyboards, you could "forward" one as a Bluetooth device and continue to use the other on your computer.


References/Acknowledgements



Source: http://askubuntu.com/a/233848/65087

 

April 14, 2013

[SOLVED] Convert ogv to gif

First install this:

sudo apt-get install imagemagick mplayer gtk-recordmydesktop

On a terminal:

mplayer -ao null <video file name> -vo jpeg:outdir=output

Use ImageMagick to convert the screenshots into an animated gifs.

convert output/* output.gif

you can optimize the screenshots this way:

convert output.gif -fuzz 10% -layers Optimize optimised.gif

 

Source: http://askubuntu.com/a/107735/65087

April 10, 2013

[SOLVED] Recursive image optimisation for web

use jpegoptim for jpeg files and optipng for pngs.

save this code to the file e.g., optimize.sh
#!/bin/bash
optimize() {
  jpegoptim *.jpg --strip-all --all-progressive --max=90
  for i in *
  do
    if test -d $i
    then
      cd $i
      echo $i
      optimize
      cd ..
    fi
  done
  echo
}
optimize

change permissions:
chmod +x optimize.sh

and run it in desired folder:
./optimize.sh


or

find . -name "*.jpg" -exec jpegoptim --strip-all --all-progressive --max=90 {} \;


Source: http://jmperezperez.com/jpegoptim-optimize-jpg-page-speed/

March 23, 2013

[SOLVED] Fixed PHP Warning: Module 'apc' already loaded in Unknown on line 0

You are getting this message "[SOLVED] Fixed PHP Warning:  Module 'apc' already loaded in Unknown on line 0"

every time you execute the php in your console.

It means that you have already activated the apc.so extension.

You must check the second module activation.

Here you can find the apc.ini config file
$ locate apc.ini 
/etc/php5/conf.d/20-apc.ini
/etc/php5/mods-available/apc.ini

Now locate php.ini files and check them for uncommented "extension=apc.so" line
$ locate php.ini
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini

check files for uncommented "extension=apc.so"
$ cat /etc/php5/apache2/php.ini | grep apc.so
;extension=apc.so

Here you found it
$ cat /etc/php5/cli/php.ini | grep apc.so
extension=apc.so

 

Edit the file
 sudo vim /etc/php5/cli/php.ini

and add ";" before "extension=apc.so"

save it and you are done

 

Source: http://blog.ciuly.com/my-server/php-warning-module-apc-already-loaded-in-unknown-on-line-0/

 

 

 

March 11, 2013

January 10, 2013

[SOLVED] Ubuntu: Configure Google Public DNS IPs

open resolv.conf

$ sudo vi /etc/resolv.conf

just add

nameserver 8.8.8.8
nameserver 8.8.4.4

Why should you try Google Public DNS?

By using Google Public DNS you can:

Source: https://developers.google.com/speed/public-dns/