Absolutely Tech

CSS4, What’s coming


About CSS specification

The CSS team recently published first commercial working draft of CSS4. The CSS spec changed just after the release of CSS3. As we know CSS3 is making its way slowly and suddenly W3C launched first official draft of CSS4. So, CSS3 and CSS4 may go hand in hand. Demand for new module makes CSS4 to start their release early. Selector module is an example of it.

New things about CSS4

Pseudo-elements

The first thing we can notice in CSS4 is Pseudo-elements are absent. Don’t worry though, pseudo elements will be there in the future releases of CSS4. New spec might come into different module, or they can merge it into previous modules itself.

UI state pseudo-classes

This class allows you to implement style elements depending on their state and checked items like radio elements, checkbox elements and half a dozen more.

Read the rest of this entry »

[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!

Ubuntu 11.04

The next version of Ubuntu is coming soon

Follow me

Sponsors