February 27, 2014
February 26, 2014
January 12, 2014
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
#try to list contents of your linux partition and finding grub folder
#use this partition
#set mod
#boot
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
....waited for 5 minutes to get into my ubuntu
it doesn't solved the issue
I booted one more time and made
package "uswsusp" was removed
after that I got no more resume libgcrypt messages
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 hibernateit doesn't solved the issue I booted one more time and made
sudo apt-get autoremovepackage "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:
Uninstall:
In case you get a permission denied on the
Source: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-lmde
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_*.debSource: 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):
- Install libbluetooth-dev
.
- 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.
- Type
makeand press Enter to compile the source. - 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,inputadd the lineDisablePlugins = input(no#).
• Add a#to the beginning ofClass = 0x000100; under it, writeClass=0x000540(no#).
• Save the file and quit the text editor. - If you want to be able to run
hidclientlike a normal command:
• Runsudo cp hidclient /usr/local/bin.
• Check if/usr/local/binis in your path withecho $PATH.
• If it's not, add it with any of these methods.
If you skip this step, you can runhidclientby making sure you're in the directory where you compiled it, and running./hidclientinstead ofhidclient.
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:
- Run
sudo hidclient -lfor a numbered list of devices. - Run
sudo hidclient -eN -x, replacingNwith 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, when
hidclient 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
- hidclient program and project page, by Anselm Martin Hoffmeister
- This Server Fault answer by Capt.Nemo, which pointed me in the right direction.
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-recordmydesktopOn 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
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
change permissions:
and run it in desired folder:
or
find . -name "*.jpg" -exec jpegoptim --strip-all --all-progressive --max=90 {} \;
Source: http://jmperezperez.com/jpegoptim-optimize-jpg-page-speed/
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
Now locate php.ini files and check them for uncommented "extension=apc.so" line
check files for uncommented "extension=apc.so"
Here you found it
Edit the file
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/
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
[SOLVED]Preselect refinement label in Google Custom Search Engine
var searchOps = {'defaultToRefinement': '[YOUR_REFINEMENT_LABEL]'};
var searcher = new google.search.CustomSearchControl('[Custom Search ID]', searchOps);
Source: http://productforums.google.com/d/msg/customsearch/X2NBjMqyxPM/vsTXmxowJNQJ
Documentation: https://developers.google.com/custom-search/docs/js/cselement-reference?hl=en
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:
- Speed up your browsing experience.
- Improve your security.
- Get the results you expect with absolutely no redirection.
January 7, 2013
December 16, 2012
[Solved] Linux: make screenshot of the virtual screen
Make screenshot on display 1 with the imagemagick
DISPLAY=:1 import -window root screen.png
Source: Xvfb and Firefox headless screenshot generator « Ivan Villareal.
December 7, 2012
[SOLVED] Running headless on Linux
First, install a VNC server:sudo apt-get install vnc4server
Next, start and configure the server:vncserver
At this point, it should ask you to create a password for VNC. Do so, then continue.
Start a VNC screen on screen 99:vncserver :99
If that goes through alright, then kill the screens created. (For me, when I ran vncserver for the first time, it created a screen at :1, so we'll kill both of the screens created)vncserver -kill :99vncserver -kill :1
Done. Now, it "just works."
Source: http://forums.adobe.com/thread/740482
December 3, 2012
[SOLVED] Linux: resize all images via console
Just install ImageMagick if you dont have it yet
Resize all JPG files in to desired size
Source: http://www.baptiste-wicht.com/2010/09/tip-batch-resize-images-on-ubuntu-linux/
sudo apt-get install imagemagickResize all JPG files in to desired size
mogrify -resize 640x480 *.jpgSource: http://www.baptiste-wicht.com/2010/09/tip-batch-resize-images-on-ubuntu-linux/
Subscribe to:
Posts (Atom)






