Absolutely Tech

[Solved] “is not co-installable with” errors on Ubuntu

I installed 32bit wine on 64bit Kubuntu but for some reason it didn’t install properly so I tried reinstalling wine 64 bit and got the following error:

dpkg: error processing /var/cache/apt/archives/wine1.2_1.2.3-0ubuntu1~ppa1_amd64.deb (–unpack):
wine1.2: 1.2.3-0ubuntu1~ppa1 (Multi-Arch: no) is not co-installable with wine1.2:i386 1.2.3-0ubuntu1~ppa1 (Multi-Arch: no) which is currently installed

You can’t simply remove 32bit wine using apt-get remove wine1.2. To fix the issue suffix the package name with ‘:i386′.

Therefore, I solved the problem by:

sudo dpkg -r wine1.2:i386

[How-To] Disable CPU cores in Linux

Although there’s no reason to do this, but some of you might have problem with apps not running well in multi-core environment or maybe looking to save some power (although disabling cores on sandy-bridge CPUs won’t save much power), I’ve written this simple tutorial to disable CPU cores in Linux.

I have i7 2630QM process which has 4 physical cores and 4 logical cores. I’ll show you how to make it act like a dual core machine instead.

Method 1:
This method is dynamic and doesn’t require a reboot. You can just open a terminal and try this out:

  • sudo sh -c "echo 0 > /sys/devices/system/cpu7/online"
    sudo sh -c "echo 0 > /sys/devices/system/cpu6/online"

    Repeat the above steps for cpu2 to cpu7 and it’ll leave you with cpu0 and cpu1 active which is essentially what we’re trying to achieve.

Method 2:
This method will make the linux boot with 2 cores which might make kernel more optimized for dual core environment than the method above.

  • Add maxcpus=2 to GRUB command line by doing the following:
    gksu gedit /etc/default/grub

    Find:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    and change it to

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash maxcpus=2"
  • Then run:
    sudo update-grub

    When you reboot, linux will run on 2 cores.

[Solved] Unadjustable brightness on laptops having i915 kernel module

I recently purchased a new laptop HP DV6121tx and installed linux on it. Apart from the muxless switchable graphics and openGL (HP will release a BIOS update to fix it soon), and brightness control, everything worked. I couldn’t change the brightness using the Fn Hotkeys. They displayed the brightness applet on pressing but nothing happened.

After scavenging, what seemed like the whole WWW, I finally found a modified kernel by Kamal Mostafa which fixed the issue. You can see the bug reports and patch here.

The issue seemed to be with i915 kernel module and how it handled brightness on certain laptops which had different ACPI implementation.
Only install this kernel if you are using i915 kernel module. You can check if its active by executing:

lsmod | grep i915

If it gives you output, it means you’re using the i915 kernel module and you can proceed further. If it doesn’t give any output, you should leave this page.

Fix the brightness issue by installing kernel debs provided in Kamal’s PPA.

sudo add-apt-repository ppa:kamalmostafa/linux-kamal-mjgbacklight
sudo apt-get update
sudo apt-get dist-upgrade

This will install the modified kernel. Alternatively, you could do (not recommended):

sudo add-apt-repository ppa:kamalmostafa/linux-kamal-mjgbacklight
sudo apt-get update
sudo apt-get install linux-headers-2.6.38-10 linux-headers-2.6.38-10-generic linux-image-2.6.38-10-generic linux-libc-dev

Reboot into the modified kernel to confirm the brightness keys work. Cheers!

[Solved] Disqus causing admin panel issues in wordpress

Disqus comment system was causing javascript errors, which in chrome console looked something like this:

Uncaught Syntax error, unrecognized expression: [href=edit-comments.php?page=disqus]

It caused unmovable widgets, screen-options didn’t open and other related javascript issues in admin panel.

After some researching it turns out, there’s a simple fix.

In /wp-content/plugins/disqus-comment-system/disqus.php, find:

href=edit-comments.php?page=disqus

and replace it with:

href=”edit-comments.php?page=disqus”

Cheers

[SOLVED] VLC does not support the audio or video format “h.264″ on Ubuntu

I got the following error in VLC today while trying to play some media file:

VLC does not support the audio or video format “h.264″. Unfortunately there is no way for you to fix this.”

All other media files game same error with different codec names. I couldn’t play anything in VLC. To fix the problem I installed package called libva1.

sudo apt-get install libva1

Cheers!

[SOLVED] “undefined symbol: menu_proxy_module_load” error in GNOME applications

In all GTK apps I used to get the following warnings when run from terminal:

`menu_proxy_module_load': /usr/lib/virtualbox/VirtualBox: undefined symbol: menu_proxy_module_load
 
(<unknown>:23888): Gtk-WARNING **: Failed to load type module: (null)

This error was received while running Virtualbox. Though, it seems just a warning and doesn’t really change anything in the application, it does make the terminal messy. I figured I could fix the problem by simply installing appmenu-gtk.

So, run the following command to fix the issue:

sudo apt-get install appmenu-gtk

Cheers!

[HowTo] Save all flash video files being played in Chrome/Chromium to Home directory

After watching a video on youtube in chrome, I felt like saving it. I couldn’t find the flv in ~/.cache or in /tmp. So I dug around and found this link: http://superuser.com/questions/235535/in-google-chrome-on-linux-where-is-the-flv-if-not-in-tmp.

The solution by omab worked for me. So I wrote this one line command which would save all the currently playing files in Chrome and Chromium in home directory.

A=`ps auwx | grep "flash" | grep "chrom" | awk '{print $2}'`; ls -la /proc/$A/fd | grep Flash | awk '{print $8}' | xargs -I _ mplayer /proc/$A/fd/_  -dumpstream -dumpfile ~/_.flv

Leave your thoughts in the comments!

Cheers!

[HowTo] Stop phpmyadmin from asking username, password in localhost

Yesterday, I showed you how you can keep local installation of phpmyadmin from logging you out every few minutes. I took one more step and edited configuration to not ask me username, password at all. Now phpmyadmin never asks me for mysql username and password.

Keep in mind if you follow this tutorial anyone would be able to access your database using phpmyadmin unless you deny access via apache configuration. Don’t do this on production servers.

Steps to follow:

  • Run: gksudo gedit /etc/phpmyadmin/config.inc.php
  • Find:
    $cfg['Servers'][$i]['auth_type'] = 'cookie';

    And change it to:

    $cfg['Servers'][$i]['auth_type'] = 'config';
  • Just below this line, add:
    $cfg['Servers'][$i]['user'] = '';
    $cfg['Servers'][$i]['password'] = '';

    Replace and with mysql username and password.

  • Save the file.
  • Changes will be applied immediately, no need to restart apache.

Now, you’ll never have to enter username and password in phpmyadmin.

Cheers!

[HowTo] Extend phpmyadmin session expiration time

Recently, I got frustrated being logged out every few minutes (24 minutes, to be precise) from phpmyadmin on my localhost. I make some db changes, write some code and when I get back to phpmyadmin, I would see my session had expired. To fix this, I changed the configuration so that my session would expire only after 24 hours of inactivity.

Steps to follow:

  • Copy the following code at the end of /etc/phpmyadmin/config.inc.php:
    $cfg['LoginCookieValidity'] = 60*60*24;
    ini_set('session.gc_maxlifetime', $cfg['LoginCookieValidity']);

This will let your session expire only after 60*60*24 seconds, that is one day.

Cheers!

[HowTo] Install Firefox 4 on Ubuntu using PPA

Firefox 4 which was released yesterday has been downloaded over 6 million times in just 24 hours. It features faster application startup, faster javascript engine, full HTML5 and CSS3 compliance etc.

 

==============================================================
What’s New in Firefox 4:

Fastest Firefox Ever

  • Performance: Firefox is up to six times faster than the previous release. With improved start-up and page load times, speedy Web app performance and hardware accelerated graphics, Firefox is optimized for rich, interactive websites.

Streamlined Interface

  • App Tabs: give a permanent home to frequently visited sites like Web mail, Twitter, Pandora, Flickr.
  • Switch to Tab: easily find and switch to any open tab from your Awesome Bar without opening duplicate tabs.
  • Panorama: drag and drop tabs into manageable groups to save time while navigating many open tabs.

Private and Secure Synchronization

  • Firefox Sync: access your Awesome Bar history, bookmarks, open tabs, passwords and form data across multiple computers and mobile devices.

Most Customizable

Private and Secure

  • Do Not Track: Firefox is leading the Web towards a universal standard Do Not Track feature that allows users to opt-out of tracking used for behavioral advertising.
  • Firefox puts privacy first, fixing flaws in some Web standards to prevent others from accessing your browser history.
  • HTTP Strict Transport Security (HSTS): automatically establishes secure connections to stop “man in the middle” attacks and keep sensitive data safe from interception during the log-in process.
  • Content Security Policy (CSP): prevent cross-scripting attacks by allowing sites to explicitly tell the browser which content is legitimate.

Cutting Edge Tools for Web Developers:

  • The JavaScript engine incorporates the new JägerMonkey JIT compiler, along with enhancements to the existing TraceMonkey JIT and SpiderMonkey’s interpreter for faster page-load speed and better performance of Web apps and games.
  • HTML5 support in Firefox includes hardware accelerated, high-definition video (WebM), 3D graphics, offline data storage, professional typography, touchscreen interfaces and the Mozilla Audio API to help create visual experiences for sound and more.
  • Firefox 4 also improves existing tools like CSS, Canvas and SVG to enable developers to make exciting Web pages.
  • Firefox provides uninterrupted browsing when there is a crash in the Adobe Flash, Apple QuickTime or Microsoft Silverlight plugins. If one of these plugins crashes or freezes, it won’t affect the rest of Firefox. Simply reload the page to restart the plugin.

 

Read the full blog entry from mozilla.

Install it on Ubuntu using PPA:

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get install firefox

Cheers!