Thursday, December 13, 2012

Insync loves Linux

https://www.insynchq.com/linux

Official repositories

APT

Add Insync as a source
  1. First, add our public GPG key to allow apt to authenticate the Insync repository:
    $ wget -O - https://d2t3ff60b2tol4.cloudfront.net/services@insynchq.com.gpg.key \
      | sudo apt-key add -
  2. Edit /etc/apt/sources.list and add deb http://apt.insynchq.com/[DISTRIBUTION] [CODENAME] non-free
    Replace [DISTRIBUTION] with your Linux distro: ubuntu, debian, mint
    Replace [CODENAME] with your Linux distro codename: for example Ubuntu 12.04 is precise
  3. Update the apt repository:
    $ sudo apt-get update
Generic installer (use this if you're not using GNOME Shell, Cinnamon, or KDE 4) $ sudo apt-get install insync-beta-ubuntu
GNOME Shell $ sudo apt-get install insync-beta-gnome
Cinnamon $ sudo apt-get install insync-beta-cinnamon
KDE 4 $ sudo apt-get install insync-beta-kde
The APT repository officially supports Debian, Mint, and Ubuntu only.
For other Debian-based distributions, try using the one for Debian Squeeze.

Yum

  1. First, import the public GPG key used to sign the RPMs. $ sudo rpm --import https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
  2. Create a new file insync.repo in /etc/yum.repos.d/ with the following content.
    [insync]
    name=insync repo
    baseurl=http://yum.insynchq.com/fedora/
    gpgcheck=1
    gpgkey=https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
    enabled=1
    repo_gpgcheck=1
    metadata_expire=60m
GNOME Shell $ sudo yum groupinstall insync-beta-gnome
Cinnamon $ sudo yum groupinstall insync-beta-cinnamon
KDE 4 $ sudo yum install insync-beta-kde

Direct download

For GNOME Shell and Cinnamon, Insync is split into two packages.
Install gnome-cinnamon-common and then choose the JavaScript applet that matches your desktop.
Generic installer
64-bit deb, 32-bit deb
GNOME Shell and Cinnamon common
64-bit deb, 32-bit deb
64-bit rpm, 32-bit rpm
KDE 4
64-bit deb, 32-bit deb
64-bit rpm, 32-bit rpm
openSUSE and GNOME Shell
64-bit, 32-bit, GNOME Shell applet
Cinnamon JavaScript applet
deb, rpm
GNOME Shell JavaScript applet
deb, rpm
KDE 4 optional plasmoids (Installing Plasmoids)
insync.plasmoid, gdrive_webview.plasmoid
Others
AUR package for Arch Linux (with thanks to xzy3186)

HOW TO: Access Google Drive for Ubuntu ?

http://www.dailytut.com/linux/google-drive-ubuntu.html

Google Drive the cloud storage by Google released today and it is available only for PC, Mac and Android smartphones. iPhone and iPad versions are yet to be released but there is no information about Google Drive for Linux. We still can access Google Drive in Ubuntu by following few steps in Nautilus. We will use Google Docs Fs PPA project by Luca Invernizzi, which is actually meant for Google Docs to connect to our Google Drive free cloud storage space. This method originally posted at OMGUbuntu and gives a temporary method to access Google Drive in Ubuntu OS until, Google releases the official Linux version.
When you use Google Drive unofficially in your Linux system, this really contains so many limitations. You can just access your GDrive storage and store files, but the auto sync feature will not work like few other features of it. We will be updating this article once the full working method released for Linux machines. The following steps are followed in Ubuntu 11.10.

Google Drive for Ubuntu

Step 1: Download all the packages that you can find here by Luca Invernizzi and proceed to second step.
Step 2: Add the following package
  • sudo add-apt-repository ppa:invernizzi/google-docs-fs
  • sudo apt-get update && sudo apt-get install google-docs-fs
Step 3: Once the installation completed, logout and login again to your Ubuntu Desktop.
Step 4: Now open “Nautilus” and Create a New Folder in your “Home” folder as “Drive”.
Step 5: Access “Terminal” and type the following command
  • gmount Drive username@gmail.com
(replace the username with your google account detail to access your Google Drive)
Step 6: You must see a prompt for Password, and give your google account password to complete the steps and you must be seeing the Google Drive with your Free Cloud Storage now mounted as a Virtual Drive.
google drive linux
As it is mentioned, this is a temporary solution to access and store your docs, pictures and files on Google Drive. We must wait for the official release of Google Drive for Linux by Google. The disappointing part is, google has mentioned nowhere about the status of Google Drive for Linux in their webpage.
Thanks for reading and please do share this post with your friends in Facebook, Twitter and Google+.

Thursday, December 6, 2012

Ubuntu utility


How to switch to Console mode from GUI mode in GNOME


If you want to switch to Console mode from GUI mode in GNOME follow this simple steps

To switch to Console mode

Press ‘Ctrl + Alt + F1′ (F2 -- F6)

To switch between consoles in Console mode

Press ‘Alt + F1′ (F2 -- F6)

To switch back to GNOME GUI mode

Press ‘Alt + F7′

Tuesday, November 27, 2012

Change default keyboard on Linux

sudo vi cat /etc/default/keyboard

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="" 

Save and reboot

Monday, November 19, 2012

How to install Java 7 on Ubuntu 12.04 LTS

1. Add the “WEBUPD8″ PPA.
danesh@python:~$sudo add-apt-repository ppa:webupd8team/java
2. Update your repositories.
danesh@python:~$sudo apt-get update
3. Install JAVA 7 JDK.
danesh@python:~$sudo apt-get install oracle-java7-installer
To uninstall,
sudo apt-get remove oracle-java7-installer

Tuesday, September 25, 2012

Embedded Programming with the GNU Toolchain (Using ARM)

Collect from some pages:
- http://www.bravegnu.org/gnu-eprog/arm-lab.html
- http://www.linuxforu.com/2011/06/qemu-for-embedded-systems-development-part-1/

1. Setting up the ARM Lab 

This section shows how to setup a simple ARM development and testing environment in your PC, using Qemu and the GNU toolchain. Qemu is a machine emulator capable of emulating various machines including ARM based machines. You can write ARM assembly programs, compile them using the GNU toolchain and execute and test them in Qemu.

Qemu ARM

Qemu will be used to emulate a PXA255 based connex board from Gumstix. You should have at least version 0.9.1 of Qemu to work with this tutorial. The PXA255 has an ARM core with a ARMv5TE compliant instruction set. The PXA255 also has several on-chip peripherals. Some peripherals will be introduced in the course of the tutorial.

Installing Qemu in Ubuntu

Download source from http://download.savannah.gnu.org/releases/qemu/. I use the lastest version now is qemu-0.14.1.tar.gz. Untar and compile for ARM:
# tar -xzvf qemu-0.14.1.tar.gz
# ./configure --target-list=arm-softmmu
# make # sudo make install

Note: Remember to install SDL lib before make the qemu. If not it will show message "VNC server started at 127.0.0.1:5869" and nothing to show.
sudo apt-get install libsdl1.2-dev
 Installing GNU Toolchain for ARM
Download the GNU toolchain for ARM, available from from http://www.codesourcery.com/gnu_toolchains/arm
Extract the source and set the environment:
# export CROSS_COMPILE=arm-none-linux-gnueabi-
# export ARCH=arm
# export PATH:=$PATH:~/arm/lite/2010q1-202/bin

2. Build Linux kernel for ARM and run on Qemu


Download the linux source from http://www.kernel.org/pub/linux/kernel/v2.6/. Example linux-2.6.37.tar.bz2

Extract the source and compile
# tar xjf linux-2.6.37.tar.bz2
# make versatile_defconfig
# make uImage
Image Name:   Linux-2.6.37
Created:      Tue Sep 25 22:25:29 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1577924 Bytes = 1540.94 kB = 1.50 MB
Load Address: 00008000
Entry Point:  00008000
  Image arch/arm/boot/uImage is ready

Then check the file:

#file arch/arm/boot/uImage

arch/arm/boot/uImage: u-boot legacy uImage, Linux-2.6.37, Linux/ARM, OS Kernel Image (Not compressed), 1577924 bytes, Tue Sep 25 22:25:29 2012, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0x9EE022C0, Data CRC: 0x9CD7BA5A
 Run on qemu:
# qemu-system-arm -M versatilepb -m 128M -kernel linux-2.6.37/arch/arm/boot/uImage


A dummy filesystem for your testing:

Write a simple hello.c

#include
int main(){
    while(1){
        printf("Hello Open World\n");
        getchar();
    }
}
Compile:
# arm-none-linux-gnueabi-gcc hello.c -static -o hello
# echo hello | cpio -o --format=newc > rootfs
1269 blocks
# file rootfs
rootfs: ASCII cpio archive (SVR4 with no CRC)

You now have a dummy filesystem ready for testing with this command:
 
# qemu-system-arm -M versatilepb -m 128M -kernel linux-2.6.37/arch/arm/boot/zImage  -initrd rootfs -append "root=/dev/ram rdinit=/hello" -serial stdio




Thursday, April 7, 2011

autojump

https://github.com/joelthelion/autojump/wiki

Autojump: a cd command that learns
Flattr this


For a quick introduction to Autojump, see this video.

One of the most used shell commands is “cd”. A quick survey among my friends revealed that between 10 and 20% of all commands they type are actually cd commands! Unfortunately, jumping from one part of your system to another with cd requires you to enter almost the full path, which isn’t very practical and requires a lot of keystrokes.

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. The jumpstat command shows you the current contents of the database. You need to work a little bit before the database becomes usable. Once your database is reasonably complete, you can “jump” to a commonly "cd"ed directory by typing:
j dirspec

where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose name matches the pattern given in dirspec. Note that autojump isn’t meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.

Autojump supports tab-completion. Try it! Autojump should be compatible with Bash 4 and zsh. Please report any problems!

Pierre Gueth contributed a very nice applet for freedesktop desktops (Gnome/KDE/…). It is called “jumpapplet”, try it!
Thanks to Simon Marache-Francisco’s outstanding work, autojump now works perfectly with zsh.

EXAMPLES

j mp3

could jump to “/home/gwb/my mp3 collection”, if that is the directory in which you keep your mp3s.

jumpstat

will print out something in the lines of:

54.5: /home/shared/musique
60.0: /home/joel/workspace/coolstuff/glandu
83.0: /home/joel/workspace/abs_user/autojump
96.9: /home/joel/workspace/autojump
141.8: /home/joel/workspace/vv
161.7: /home/joel
Total key weight: 1077


The “key weight” reflects the amount of time you spend in a directory.

DOWNLOAD

Use the github dowloads to get the latest release, or use git to get the bleeding edge version (should usually work)

INSTALLATION

For automatic installation, make sure that install.sh is executable. If not (or if not sure), run

chmod +x install.sh

Once it is executable, run

./install.sh

It will tell you any necessary steps from there.

Manual installation of autojump is very simple: copy autojump to /usr/bin, autojump.sh to /etc/profile.d, and autojump.1 to /usr/share/man/man1. Make sure you source /etc/profile in your .bashrc:

source /etc/profile

AUTHORS

Joel Schaerer (joel.schaerer (at) laposte.net) <— don’t hesitate to send feedback!
Autojump applet written by Pierre Gueth
Zsh support: Simon Marache-Francisco
Install script written by Daniel Jackoway and others.

LICENSE

autojump is distributed under the terms of the GPL, version 3.

DONATIONS

If you like autojump, you can (but there is really no pressure to do so!) make a small donation using the “flattr this” button on top of this page. You can also make a small bitcoin donation to the following address: 16RQWifjN68T3BP5wvpZSev9CbUMkMBcEJ . If you do, don’t hesitate to drop me a word by email; otherwise, I have no way to say thanks!

PACKAGING

For Arch Linux it is available from the [community] repository. Until Feb, 2011 there was a bug in Arch's packaging of bash, this has now been resolved. Make sure your bash package is at least bash-4.1.009-4.

Autojump is now officially a part of Debian Sid, thanks to Tanguy Ortolo’s work.

Thibault North contributed packages for Fedora. They should now be included in the distro. You can also install autojump on Redhat/CentOS using the EL5 / EL6 repos.

Olivier Mehani wrote an ebuild for gentoo. Thanks! It should now be integrated to portage, so you should be able to emerge it directly.

Autojump is officially supported in the rolling-release branch of Frugalware. Thanks to Fabien Bourgeois for making the package!

Binh Nguyen kindly provides a build script for Slackware

I would be very interested by packages for other distros. If you think you can help me with the packaging, please contact me! Note that apart from bash(zsh) and python, autojump doesn’t have any dependencies.


Note (tommy):

Simple way steps:
- Decompress autojump package.
- export PATH=$PATH:/autojump
- source autojump.bash

Version python 2.6.x