Hacking LMDE
Posted: Tue Jun 28, 2011 5:37 am
Here's some hacks I had to apply before LMDE became usable. Most found around here, but let's gather them in one post.
First thing to do after installing is:
Prepare for lots of very annoying questions and wasting an hour at least. Is there a faster way?
Wait, something's wrong with the clock. If you use another OS like Windows or Ubuntu, setting hardware clock to UTC is not a good idea, so:
This will disable UTC time and enable synchronizing with ntp servers. Set the time from panel. Reboot... WAIT, not yet!
Reboot is pretty broken now, it just reloads the kernel, skipping GRUB, so...
...should fix the problem. Now we can
Now we can fix the broken Synaptic with:
This will enable quick search in it.
Now's the part for ATI Radeon users:
The FGLRX driver:
After reboot, time to set up ATI and Compiz options.
The most important ATI option is "Tear Free Desktop".
There are plenty of Compiz options to configure, but almost every config will work ok.
I've found I have to use fusion-icon (make it load on startup) to use compiz as window manager. "compiz --replace" method gives us Compiz just once.
If you like Emerald, here's the way for it:
Now get some themes and test it. Mine works as charm. Not a single crash since 2 weeks. BTW, enable blur to all decorations and enable blur effect in Compiz. Use gaussian blur with at least radius 8. This looks awesome.
Now the font problem. Yes - there IS a font problem. You can see it in Mozilla and other web browsers, also in Komodo and other Mozilla based application. Subpixel rendering behaves wrong, producing colored artifacts around fonts. This looks really ugly. But there's a cool workaround for it:
Now set full hinting in font setup. Restart browsers and other applications. See? I told you.
The system is almost perfects, but it can get even better. Don't you like this loud beep on start? Or maybe those super nice beeps in terminal? Let's disable pc-speaker!
Now's better.
Speaking of sound. Have you noticed any glitches in flash? Maybe distorted sound in Skype or Mplayer?
For the sound distortion - the magic recipe is:
Usable on x64 systems. (I don't know where to find it on non x64 machines, please google it).
Would you like to wake up your pc from sleep with keyboard or mouse? It's easy:
Yes, looks awful, but it works immediately. This hack is mine
And finally, if you want to make your LMDE really yours customized Linux, you can change the GRUB screen. Here's how:
Install Grub Customizer:
...and apply another hack of mine...
...to enable it work as expected. Without it you would not see the changes. Remember to reapply this hack every time Grub Customizer would refuse to work. This will happen after /etc/grub.d/ files will be updated (grub or some of its components update).
That's all folks. I think all those hacks should be included in updated LMDE ISO. If you know how to do it better, with more automatics - please share your thoughts.
If it was a way to include it in updated ISO - even a complete beginner could install LMDE, which is IMHO way better than Ubuntu
PS: If you're not happy with Mint menu and Alt+F2 - don't bother to install Gnome Do. It's broken (conflicts with Compiz). Synapse is the answer. Works exactly the same as Gnome Do and it's not broken
First thing to do after installing is:
Code: Select all
sudo apt-get update && sudo apt-get dist-upgrade
Wait, something's wrong with the clock. If you use another OS like Windows or Ubuntu, setting hardware clock to UTC is not a good idea, so:
Code: Select all
sed -r 's/^UTC=yes/UTC=no/ig' /etc/default/rcS | sudo tee /etc/default/rcS
sudo apt-get install ntp
Reboot is pretty broken now, it just reloads the kernel, skipping GRUB, so...
Code: Select all
sudo apt-get remove kexec-tools
Code: Select all
sudo reboot
Code: Select all
sudo apt-get install apt-xapian-index
sudo apt-get install apt aptitude synaptic --reinstall
Now's the part for ATI Radeon users:
The FGLRX driver:
Code: Select all
sudo apt-get remove --purge fglrx*
sudo apt-get update && sudo apt-get install fglrx-driver fglrx-control
sudo apt-get install libgl1-mesa-dri-experimental compiz-fusion-* fusion-icon
sudo /usr/bin/aticonfig --initial
sudo reboot
The most important ATI option is "Tear Free Desktop".
There are plenty of Compiz options to configure, but almost every config will work ok.
I've found I have to use fusion-icon (make it load on startup) to use compiz as window manager. "compiz --replace" method gives us Compiz just once.
If you like Emerald, here's the way for it:
Code: Select all
sudo apt-get install build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamage-dev libxinerama-dev libstartup-notification0-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev libmetacity-dev librsvg2-dev libdbus-1-dev libdbus-glib-1-dev libgnome-desktop-dev libgnome-window-settings-dev gitweb curl autoconf automake automake1.9 libtool intltool libxslt1-dev xsltproc libwnck-dev python-dev python-pyrex libprotobuf-dev protobuf-compiler python-sexy wget
wget http://releases.compiz.org/0.8.8/emerald-0.8.8.tar.gz
tar xvzf emerald-0.8.8.tar.gz
cd emerald-0.8.8
./configure --prefix=/usr LIBS=-ldl
make
sudo make install
Now the font problem. Yes - there IS a font problem. You can see it in Mozilla and other web browsers, also in Komodo and other Mozilla based application. Subpixel rendering behaves wrong, producing colored artifacts around fonts. This looks really ugly. But there's a cool workaround for it:
Code: Select all
sudo rm /etc/fonts/conf.d/10-hinting-slight.conf
sudo rm /etc/fonts/conf.d/10-no-sub-pixel.conf
sudo ln -s /etc/fonts/conf.available/10-hinting-medium.conf /etc/fonts/conf.d/.
sudo ln -s /etc/fonts/conf.available/10-sub-pixel-rgb.conf /etc/fonts/conf.d/.
sudo dpkg-reconfigure fontconfig
The system is almost perfects, but it can get even better. Don't you like this loud beep on start? Or maybe those super nice beeps in terminal? Let's disable pc-speaker!
Code: Select all
echo "blacklist pcspkr" | sudo tee -a /etc/modprobe.d/blacklist.conf
sudo rmmod pcspkr
Speaking of sound. Have you noticed any glitches in flash? Maybe distorted sound in Skype or Mplayer?
For the sound distortion - the magic recipe is:
Code: Select all
echo /usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so | sudo tee /etc/ld.so.preload
Would you like to wake up your pc from sleep with keyboard or mouse? It's easy:
Code: Select all
((echo '#!/bin/sh' && sed -rn 's/^.*(USB[0-9E]+|EUSB).*$/echo \1 > \/proc\/acpi\/wakeup/pg' /proc/acpi/wakeup) | sudo tee /etc/pm/sleep.d/05_usb && sudo chmod +x /etc/pm/sleep.d/05_usb)
And finally, if you want to make your LMDE really yours customized Linux, you can change the GRUB screen. Here's how:
Install Grub Customizer:
Code: Select all
sudo apt-get install bzr cmake libgtkmm-2.4-dev gettext
bzr branch lp:grub-customizer
cd grub-customizer/
cmake . && make
sudo apt-get install menu hwinfo
sudo make install
Code: Select all
sudo mkdir /etc/grub.d/.disabled
sudo mv /etc/grub.d/06_* /etc/grub.d/.disabled/
sed -r -e 's/\$\{2\}/\$\{GRUB_COLOR_NORMAL\}/g' -e 's/\$\{3\}/\$\{GRUB_COLOR_HIGHLIGHT\}/g' /etc/grub.d/05_debian_theme | sudo tee /etc/grub.d/05_debian_theme > /dev/null
That's all folks. I think all those hacks should be included in updated LMDE ISO. If you know how to do it better, with more automatics - please share your thoughts.
If it was a way to include it in updated ISO - even a complete beginner could install LMDE, which is IMHO way better than Ubuntu
PS: If you're not happy with Mint menu and Alt+F2 - don't bother to install Gnome Do. It's broken (conflicts with Compiz). Synapse is the answer. Works exactly the same as Gnome Do and it's not broken