Archive

Archive for the ‘Ubuntu Geek’ Category

How to Change our MAC Address on Ubuntu ?

December 21, 2010 Leave a comment

Today I’ve received new Desktop computer for my office. It was nice until I realized I have to contact network admin. He was out already…  So simple solution was to do manual change of MAC address and use that one from previous desktop.  Here are steps

#sudo  vi /etc/network/interfaces

than when you are using dhcp a I do just change text in following manner:

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:00:00:00:00:00

then close vi and run this command

#sudo /etc/init.d/networking restart

And you are connected back !

Categories: Ubuntu Geek

How to find Text inside files in subdirectories

December 10, 2010 2 comments

I have to note it somewhere because my brain is always trying to exclude it.
# find . -name  ”*.java ” | xargs grep  geecon

Categories: Ubuntu Geek

Stripes Framework (IntelliJ IDEA 9.04) : Calculator Example as the new project

November 24, 2010 Leave a comment

Project is described on the Stripes main site  as the Beginner guide.  I’m using IntelliJ as my IDE for such applications. Here are steps how to avoid to common mistakes in web.xml setup.

What I have:

  1. IntelliJ IDEA 9.04
  2. Apache Tomcat 6.0.29
  3. Stripes 1.5.4

Create new project from scratch ( example “StripesExample” ).  You obtain project directory structure.  I’ll go from the top of this structure and add or change appropriate files inside. Before we start just do import of all Stripes and other necessary libraries for this example (commons-logging.jar, cos.jar, jstl.jar, log4j-1.2.15.jar, mail.jar,standard.jar, stripes.jar). Don’t forget  libraries are located in /WEB-INF/lib directory.

1. create new package inside “src” directory  (example: “examples.stripes“)
2. in this directory create new “CalculatorActionBean.java” and copy the source code. Don’t forget to change package name !
3. time to configure *.properties files (commons-logging.properties, log4j.properties, StripesResources.properties) . You can follow the manual. These files are located in “/WEB-INF/classes” directory
4. web.xml file configuration. It seems to be key to run the example properly.  If you have followed me  only do change in web.xml :

….
<filter>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>examples.stripes</param-value>
</init-param>
</filter>
……

Now should be everything ready to deploy on Tomcat server directly from IDE…

Categories: JAVA, Ubuntu Geek

Google AppEngine and PlayFramework v1.1 the first experience

November 22, 2010 Leave a comment

This Blog post  is the brief  report how to easily deploy example GAE application “lists-with-gae“. I have spend couple of hours today playing with this cool new framework.   I decided to test Google AppEngine  deployment  of mine project as the last point today. This report will be focused only on the ”lists-with-gae” project.  This project is located in default gae plugin installation.  Check the GAE-version you want to install to you Play project.  I should point out I’m running under Ubuntu 10.04 !

# play install gae-1.1
# play install siena-1.3

Than you need to define your GAE plugin in the project in conf/application.conf

# Additional modules
# ~~~~~
# A module is another play! application. Add a line for each module you want
# to add to your application. Module paths are either absolutes or relative to
# the application root.
module.gae=${play.path}/modules/gae-1.1
module.siena=${play.path}/modules/siena-1.3


before you return back to your project directory you have to edit your .bashrc file.  Define variable GAE_SDK:

export GAE_PATH=~/eclipse_helios/plugins/com.google.appengine.eclipse.sdkbundle.1.3.8_1.3.8.v201010161055/appengine-java-sdk-1.3.8/bin

than you have to change permission to the appcfg.sh file

#chmod +x  ~/eclipse_helios/plugins/com.google.appengine.eclipse.sdkbundle.1.3.8_1.3.8.v201010161055/appengine-java-sdk-1.3.8/bin/appcfg.sh

Note: It works perfectly. I have also tested to define unziped GAE directory directly but I received deployment errors! I recommend you to use Eclipse Plugin (Based on forum discussion)!

Now it’s time to run following command in the project ”lists-with-gae” directory:
#play gae:deploy

I don’t know why you still receive in log this warning but …

21:12:08,197 WARN  ~ Google App Engine module
21:12:08,197 WARN  ~ ~~~~~~~~~~~~~~~~~~~~~~~
21:12:08,197 WARN  ~ No Google App Engine environment found. Setting up a development environement

… don’t worry,  everything gonna be deployed to your GAE project.   Edit war/WEB-INF/appengine-web.xml  and define your project before you run command above

<appengine-web-app xmlns=”http://appengine.google.com/ns/1.0″>
<application>YOURTEST_PROJECT</application>
<version>2</version>
</appengine-web-app>

And now check it out …. it works :)

Categories: JAVA, Ubuntu Geek

Ubuntu Upgrade: from 9.10 to 10.04 – Intel Graphic card issue

August 9, 2010 Leave a comment

During the upgrade procedure was removed xserver-xorg-video-intel . Upgraded system wasn’t able to start. Instead of login screen was displayed black screen … ( not blue screen of death, well known from Windows ;)

Just follow these steps to fix it:  Restart the system -> from Grub choose safe mode -> simple graphic mode -> then login into the system -> open synaptic package manager -> install xserver-xorg-video-intel

Then everything should work correctly again …

Categories: Ubuntu Geek

Missing Volume Button after upgrade to Ubuntu 10.04

August 9, 2010 Leave a comment

If you’ve just upgraded to 10.04 “Lucid Lynx” from ver. 9.10 and you found out the volume icon/button is missing in the system tray. Here is the way how to fix that issue.

System->Preferences->Startup Application Preferences – Add

gnome-volume-control-applet

Or

Just open the terminal and run up #gnome-volume-control-applet

Categories: Ubuntu Geek

Ubuntu 9.10 – two external LCD (laptop)

July 17, 2010 2 comments

I have Intel X3100 graphic card on my laptop and External 24 inches LCD connected in. Well to use both LCD under Ubuntu (9.10, in my case) you need to open command line and type several commands. Have a look bellow:

<your name>@<laptop>:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 2000, maximum 8192 x 8192
VGA1 connected 1920×1200+0+0 (normal left inverted right x axis y axis) 546mm x 352mm
1920×1200      60.0*+
1280×1024      75.0
1152×864       75.0
1024×768       75.1     60.0
832×624        74.6
800×600        75.0     60.3
640×480        75.0     60.0
720×400        70.1
LVDS1 connected 1280×800+0+1200 (normal left inverted right x axis y axis) 286mm x 179mm
1280×800       59.9*+
1024×768       60.0
800×600        60.3     56.2
640×480        59.9

After this step is everything quite intuitive. Just manage your LCDs as you want. xrandr tool allows you to use following:

xrandr –output LVDS1 –off;
xrandr –output VGA1 –off;
xrandr –output VGA1 –auto –primary;
xrandr –output LVDS1 –auto –right-of VGA1;

Categories: Ubuntu Geek

Ubuntu 9.10 and Android: how to install *.apk directly to your mobile

May 30, 2010 1 comment

Today morning I had strong feeling to blog around the Android, again :) . Well I haven’t  found  a lot of information about how to develop directly on Ubuntu 9.10. Here are couple of steps how to deploy your  *.apk directly to your Android devices.

Official information from Google

If you’re developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.

  1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.For Gusty/Hardy, edit the file to read:  ( I’ve used this ONE)
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"For Dapper, edit the file to read:
    SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
  2. Now execute:
    chmod a+r /etc/udev/rules.d/51-android.rules

Issue has risen up when you try command #adb devices to confirm you correctness. You received such stressed message which you have to face .

#adb devices
List of devices attached
????????????    no permissions

Solution is pretty simple you need to restart the server with ROOT permissions -> follow these commands.

#adb kill-server
#sudo  <destination> adb start-server
#adb devices

You should received valid identification of the mobile by using command #adb devices again, such us
List of devices attached
HT9C4P808877   device

Now, you can run up Phone USB debugging mode and extend you manifest file in following manner
AndroidManifest.xml file, add android:debuggable="true" to the <application> element

Your Eclipse IDE is ready for option Debug As -> … Devices Chooser <your devices> -> OK
I hope it helps, Enjoy!

Flash fullscreen problem – issue

My case: Ubuntu 9.10, Graphic card Intel X3100, Flash 10

To fix full-screen issue during using Compiz Manager -> Go to the System – Preferences – CompizConfig Setting Manager – General Options  – Unredirect Fullscreen Windows (ENABLE  IT)

Categories: Ubuntu Geek

SimMechanics in Matlab for Linux (Ubuntu 9.10) :: problem

April 24, 2010 Leave a comment

I’m running on Ubuntu 9.10 and my Maltlab versions are 2008b and 2009b.  Following commands are fixing OpenGL issue/problem ( libGL.so )

cd /usr/lib
sudo ln -s libGL.so.1 libGL.so
sudo ln -s libGLU.so.1 libGLU.so

Categories: Matlab, Ubuntu Geek
Follow

Get every new post delivered to your Inbox.