Thursday, September 27, 2012

Developing an Android application with Eclipse.... Step 1 - Install the develop environment

After the never ended post of some months ago... here....
now we re-try to write a more complete article on starting to develop an app for Android using Eclipse, on a Debian distribution.

Well, we are on a Debian 6.0.4 squeeze, and we ensure to have a sun java installed and ready to use, please refer here.

After we provide to download and install eclipse, from eclipse downloads page, the "Eclipse IDE for Java EE Developers" version is good.
At the moment we have downloaded the "Juno (4.2) Packages".

From developer.android.com site download the right sdk for your operative system.
In this case we have a linux system, so we have downloaded(from http://developer.android.com/sdk/index.html) the archive file with our sdk:
http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz

Provides to explode the two archive files.

Now we go under Android Sdk Installation folder, go into tools and opening a terminal,
launch the command:
./android sdk 
 
A window will prompted to you for show what the available packages to download. 
We suggest to flag Tools, Android API(currently the latest is the 4.1)and Extras.
At the end of the installation close the window.
Start Eclipse application, and go to.....:
Help > Install New Software
and add one between the following lines
http://dl-ssl.google.com/android/eclipse/
https://dl-ssl.google.com/android/eclipse/
 
Flag the checkbox with "Development Tools"....
 
..and install them(...the tools.....).
 
At the end of Development tools installation you need to restart eclispe.

When eclipse restart it will ask to you where is android sdk installation path
or to proceed to a new installation,
well you now can browse and point to our Android sdk installation.
Fine!!! You have completed the development environment installation.
In the next step we see how to starts to write an android application!!!
Bye...


 





Monday, March 26, 2012

Debain 6.0.4: quick samba installation and configuration

Here is a quick description to how to install samba server and configure it in order to share folder on the network.

Giving 
apt-cache search samba
results:
[...]
libsmbclient-dev - development files for libsmbclient
libsmbclient - shared library for communication with SMB/CIFS servers
libwbclient0 - Samba winbind client library
samba-common-bin - common files used by both the Samba server and client
samba-common - common files used by both the Samba server and client
samba-dbg - Samba debugging symbols
samba-doc-pdf - Samba documentation in PDF format
samba-doc - Samba documentation
samba-tools - Samba testing utilities
samba - SMB/CIFS file, print, and login server for Unix
smbclient - command-line SMB/CIFS clients for Unix
swat - Samba Web Administration Tool
winbind - Samba nameservice integration server
smb2www - SMB/CIFS network client with a web interface
[...]
So run
apt-get install samba smbfs smbclient
to install these three packets....
during installation, it performs default configuration
after....
So next commands.....
adduser guest --home=/home/public --shell=/bin/false --disabled-password
to create a guest user to use only as samba default user....
chmod -R 0700 /home/public
chown -R guest.guest /home/public
These commands configure the sharing in way of every user can create a content(file or folder)
into the shared folder.
No one may edit the content created by something others.... 
If you want some of differently, change the permission mask.....
Now edit /etc/samba/smb.conf
adding after the row 
obey pam restrictions = yes
insert these others rows: 
guest account = guest
invalid users = root

and in the ****Authorization**** section,  these two rows.....: 
; security = user
security = share

In the sharing section add:

# SHARED DIR
[shared]
   comment = shared
   read only = no
   path = /home/public
   guest ok = yes
   guest only = yes
   create mask = 0600
   directory mask = 0700

 
Fine...... restart samba:

 /etc/init.d/samba restart

and all is done.....

 Bye....

Freepopsd under Debian

Freepops is a free tool that can help you for differently things....
One of the most important is to configure your external web mail(of several providers) to your Mail Client(outlook, thunderbird, ecc.)
In debian you can found it into the repository.....
So let's go to install it.....
apt-get install freepops
Now a quick way to start to use it.....

Remember to download the last versions of the plugins you use....
In my case I need to set-up only a ymail.com account
so I download(from http://www.freepops.org/en/) only the last version
of my yahoo.lua and put it into /usr/share/freepops/lua/ directory

Now I create under /sbin those two files.......
The file  start_freepopsd.sh contains:
#!/bin/bash
freepopsd &



The file  stop_freepopsd.sh contains:
#!/bin/bash
freepopsd -k &


And now link the freepopsd start and stop commands and rc.directories....
I choose rc5 for start.....
ln -s /sbin/start_freepopsd.sh S23_freepopsd_start
and rc6 for stopping....
ln -s /sbin/stop_freepopsd.sh K23_freepopsd_stop

Let's done....

Bye....

Monday, March 19, 2012

Debian: install sun java

Default installation of debian surely give you not the sun java available...
If you give
java -version
something like this is the results....:
 java version "1.5.0"
gij (GNU libgcj) version 4.4.5
[........]

So now we move to install sun java package, and set the java command to the new package installed.....
Please ensure you have into /etc/apt/sources.list file non-free rows for your distribution.
If no(in my case I use squeeze) add the follows:

deb http://ftp.it.debian.org/debian/ squeeze non-free
deb-src http://ftp.it.debian.org/debian/ squeeze non-free

Next
apt-get update
apt-cache search sun-java6
and this result will prompt to you....:
.....
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples
sun-java6-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)
sun-java6-plugin - The Java(TM) Plug-in, Java SE 6
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files
....

So give the follow:
apt-get install sun-java6-jdk
if you are a developer, and you need the jdk....
Or the jre if you want only the runtime enviroment...
apt-get install sun-java6-jre

At the end of installation give this last command
update-java-alternatives -s java-6-sun
to set to java command the right(and new) path....
 
Run 
java -version 
to look this...:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
[...]

Bye....
 






Tuesday, March 13, 2012

Debian: install flash plugin(the "non free flash plugin")

Please verify if the following command has no results:
apt-cache search flashplugin
if has no results
add edit, as root, /etc/apt/sources.list file
and add a row as follow.
Take the row with the current version of your debian
(in my case "squeeze")(not squeeze-updates....or others......)
and "main" as branch version.......

In my case I take the 2 following rows 
deb http://ftp.it.debian.org/debian/ squeeze contrib
deb-src http://ftp.it.debian.org/debian/ squeeze contrib


After this I give
apt-get update
to reload all available packages
and again
apt-cache search flashplugin
to search.... I have this results....:
flashplugin-nonfree-extrasound - Adobe Flash Player platform support library for Esound and OSS
flashplugin-nonfree - Adobe Flash Player - browser plugin


So I give
apt-get install flashplugin-nonfree
restart firefox browser
and all is done....

Bye.....

Monday, February 27, 2012

Debian: smart ndiswrapper install and configure how-to

Now we look to install and configure ndiswrapper for our debian...

apt-cache search ndiswrapper
if no results... add a good repository location into your sources.list
In my case I add this line into /etc/apt/sources.list
deb http://www.edmondweblog.com/repo/binary/ stable main
after I run: apt-get update
and now when I search for ndiswrapper I found it.....

So I need to install three things:
- ndiswrapper-utils-1.9
- wireless-tools
- linux-headers-2.6.32-5-686 (this only for my case.... you have to install the appropriate for your version...)

And you obtain it giving those commands...:
apt-get install wireless-tools
aptitude install ndiswrapper-utils-1.9
(this last command will download and install for you the correct version, for your operative system version, of  linux-headers[....])

Then I run 
echo ndiswrapper >> /etc/modules
to add ndiswrapper module to system startup modules list loading


now I give ndiswrapper -l 
to list ndiswrapper modules charged....
for now list is empty.... Only when I correctly configured the module I found something as result of this command....

ndiswrapper -i Desktop/WLAN/NETw3.inf
to install the driver 
then if I give  
ndiswrapper -l 
and my result is something like this:
netr28 : driver installed
I sounds like the driver is installed but the device is not present....(probably you have not the right driver...)
Give this to unistall:
ndiswrapper -e netr28
...where netr28 is the name of the driver(different for you.....)

If the result is something like this:
netr28 : driver installed
device (1814:0781) present (alternate driver: rt2860sta)

You have correctly done the driver installation....
Now configure it with:
modprobe ndiswrapper

Give iwlist command to verify if all is done.....

PROBLEM:
in my case the command
modprobe ndiswrapper
give tis result:
FATAL: Module ndiswrapper not found.
It means that probably you have to recompile the ndiswrapper package....
The package you have is not correctly for you linux-headers......
So:
apt-get install ndiswrapper-source
this command install for you also module-assistant package....
then run:
m-a a-i ndiswrapper
at the end of process the correct version of ndiswrapper is ready for you....

ANOTHER PROBLEM:
In my case I need to force to not load, at boot, the pre-ndiswrapper wifi module.... loaded as default....
So I need to edit blacklist.conf giving.... 
vim /etc/modprobe.d/blacklist.conf
I add this row at the and of the file:
blacklist rt2860sta
Where rt2860sta were the wifi module loaded.... I found it by giving

lsmod

Restart the system and all is done!!!! 

Ps.: for troubleshootings I found this page

Bye.....

Thursday, February 16, 2012

Debian: create bootable usb drive with an operative system iso image file

Unetbootin is a great tool to "install" a operative system starting from an iso image file.
As root install it:

apt-get install unetbootin

now type unetbootin command to start the tool.
Simply select the iso image file, select the drive and go!!!


Bye...