Ubuntu Lucid 10.04 – insane cpu usage in Flash Player

Some friends told me that in many Laptop with Intel 82845G/GL video chipset and Ubuntu 10.04 Lucid there are a lots of problems in Flash Player.

In many case, often when you use Youtube video, the CPU usage raise up to 100% and the Xorg crash totally. You must restart Ubuntu to have a normal usable system.

I tried to help a friend a few days ago and the only good solution was to update the Linux Kernel at the 2.6.34 version.

The problem is not ‘completely solved but appears less frequently.

You can try to take the new kernel deb files using this official Ubuntu repository and update your standard 2.6.32-22.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/

There are also a 2.6.35 Kernel but I have not tried yet.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.35-rc1-lucid/

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Ubuntu Lucid 10.04 – nVidia MCP55 High Definition Audio Problem

After upgrade from Ubuntu 9.10 to 10.04 my audio stop to work!

I have tried many solution but nothing seem to work.

This is my sound card.

00:0f.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)
	Subsystem: nVidia Corporation Device c55e
	Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 23
	Memory at cfff0000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

To solve to problem I have done this simple steps:

sudo apt-get remove --purge alsa-base
 
sudo apt-get remove --purge pulseaudio
 
sudo apt-get clean && sudo apt-get autoremove
 
sudo apt-get install alsa-base
 
sudo apt-get install pulseaudio
 
sudo apt-get install gdm ubuntu-desktop

In this way all was returned to work properly.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

How to force the execution of a program in a specific core

In some case I need to force the execution of a software in a specific core.

To do this I use a Linux program named “taskset”

It’s really simple to use and really useful.

taskset -c 0 program_name

-c 0 it means to execute the program to the first core, -c 1 it’s the second core.. and so on

For example to force execution of VLC to che second core I can use this command

taskset -c 1 vlc
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Linux SSH Tunnel – HowTo

This is a simple howto use a SSH Tunnel under Linux

This an example of the correct syntax

ssh -l username_ssh ip_firewall -L local_port:remote_pc:remote_port

For example: if you want to connect from your linux client to a remote pc via VNC through a linux firewall
you can use this command

firewall ip is: 72.35.34.2
firewall username is : vncext
remote pc ip is: 192.168.0.23
vnc port is: 5900
local port is: 5900

ssh -l vncext 72.35.34.2 -L 5900:192.168.0.23:5900

after this command you must insert the vncext password for 72.35.34.2

and now you can connect to remote vnc simply use this command

xvnc4viewer 127.0.0.1
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Google Analytics for Android

For all people that need to view Google Analytics on your Android Phone I suggest to take a look to this application.

Mobile GA for Android

I have tested many similar applications but Mobile GA for Android it’s really fast, simple and is free!.

It can be downloaded directly from the Android Marketplace.
Simply visit the Android Marketplace and install it.

Also it’s realy cool!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Recovering Ubuntu After Installing Windows

For recovering Ubuntu (or Debian) after installing Windows there are many way.

For me the simple way it’s:

1 – boot from Ubuntu Live CD (if possible the same version as your installed version on the PC)

2 – open terminal

3 – execute this command

sudo grub-install --root-directory=/dev/sdaX /dev/sda

this command reinstall the grub loader for the /dev/sdaX root partition (X is for 1 / 2 / 3 etc. you must change this value in according of your partition table, may be different for a custom installation);
also sda may be sdb or sdc etc. you must check you /etc/fstab or execute mount to see what is your root file system

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Ubuntu: create automatic background switcher

If you want to create your own automatic background switcher in Ubuntu there is a simple solution.
Make a sub directory in /usr/share/backgrounds/ ex your_dir and put some Jpeg that will be used as background.
Create a XML file same as the following example:

background.xml

 
<background>
  <starttime>
    <year>2010</year>
    <month>01</month>
    <day>04</day>
    <hour>00</hour>
    <minute>00</minute>
    <second>00</second>
  </starttime>
<!-- This animation will start at midnight. -->
  <static>
    <duration>300.0</duration>
    <file>/usr/share/backgrounds/your_dir/001.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/your_dir/001.jpg</from>
    <to>/usr/share/backgrounds/your_dir/002.jpg</to>
  </transition>
  <static>
    <duration>300.0</duration>
    <file>/usr/share/backgrounds/your_dir/002.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/your_dir/002.jpg</from>
    <to>/usr/share/backgrounds/your_dir/003.jpg</to>
  </transition>
  <static>
    <duration>300.0</duration>
    <file>/usr/share/backgrounds/your_dir/003.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/your_dir/003.jpg</from>
    <to>/usr/share/backgrounds/your_dir/001.jpg</to>
  </transition>
</background>

there are 2 possible TAG

transition -> ceate a fade transition effects from image 1 to image 2
static -> display the static background image for a time difined in duration tag

To enable the new Background switcher go in the Gnome Desktop Background preference and add the new XML file same as a background selecting “all files” and not simple image.

:-)

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

PHP easy redirect HTTP calls in HTTPS

In some case will be useful to redirect web traffic from HTTP page in HTTPS page, for example login form.

In this example I write a login.php script that calls the same page in https server.

I used the $_SERVER['SERVER_PORT'] directive because in some case $_SERVER['SERVER_PORT_SECURE'] or $_SERVER['HTTPS'] don’t work.

login.php

<?
 
$sport = $_SERVER['SERVER_PORT'];
 
if ($sport=="80") {
        header ("location: https://www.example.com/login.php");
}
 
?>

80 it’s the standard port for non secure HTTP
443 it’s the standard port for secure HTTPS

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Change the bash prompt color

To change the bash prompt color
add this code in your .bashrc

this is blue and cyan

PS1='\[\033[0;34m\]\u\[\033[0m\]\[\033[1;34m\]@\[\033[0;36m\]\h\[\033[0m\]\[\033[1;36m\]\w\[\033[0m\]\$ '

this is yellow and red

PS1='\[\033[0;31m\]\u\[\033[0m\]\[\033[1;31m\]@\[\033[0;33m\]\h\[\033[0m\]\[\033[1;33m\]\w\[\033[0m\]\$ '

:-)

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

Howto test if a process is active

This is a simple script for check if a process it’s active

#!/bin/bash
        TEST=`/bin/pidof process_to_test`
    	if [ $TEST ]
    	then
		echo "Process is active PID: $TEST"
	else
		echo "Process it's not active"
	fi
exit
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit
  • Slashdot
  • Tumblr
  • Twitter

  • Categories

    Android (1)
    Bash (2)
    Debian (2)
    Linux (10)
    MySQL (1)
    PHP (1)
    Script (3)
    Ubuntu (5)
    Uncategorized (1)
    XML (1)

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Ads

  • Pay me a beer!

  • Stats


    0
    Unique
    Visitors
    Powered By Google Analytics
  • Copyright © 1996-2010 Syscalls | com. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress