Saturday, November 30, 2013

xscreensaver troubles in linux wth mplayer, VLC, mplayer2

I have been noticing screen blanking issues with xscreensaver for some time since the gnome, dbus and mplayer and xscreensaver decided to move  against each other with their decisions on screensaver function and ultimately all I ended was with a system which kept blanking all the time with xscreensaver. I have tried using Fedora 19,20,21 rawhide Arch Linux, Gentoo, Debian wheezy, CentOS with nux repos enabled and all the distros were hit with this issue.

For Mplayer, Mplayer2:

If you happen to look at the xscreensaver FAQs it says to use heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"   in your ~/.mplayer/config and it doesn't work all the time with all the distros. What I have found is the xscreensaver binary is located in a different place from where the mplayer is looking and it ultimately fails to find the xscreensaver. So in your distro find out where the binary is located and point it to right location as I have it here for gentoo unstable as follows.

heartbeat-cmd="/usr/bin/xscreensaver-command -deactivate > /dev/null"


 For VLC:


I have been hunting for a solution for VLC to disable blanking for a long time and I couldn't get a clean way to use vlc without running scripts like lightsOn.sh. or any other wrapper scripts to be running in the background while you are watching videos on VLC until I found a post in Fedora forums which suggests to
create a file called /etc/X11/xorg.conf.d/00-system-dpms.conf and have the contents of the file as follows and after saving the file as root restart X to amend the changes.

 
 Section "ServerFlags"
   Option "BlankTime" "0"
   Option "StandbyTime" "0"
   Option "SuspendTime" "0"
EndSection
 
 
 

My Gentoo Installation

Preface:

I started using Linux since late 2010 and I was sick of Windows 7 and I thought it would be fun to try Linux for a while and see how it goes. My previous encounters with Linux was when I med school when I tried Fedora core 2. But I didn't have internet back then and I had to replace it with Windows as I couldn't use the system without the multimedia codecs. I always wanted to understand Linux is general. Downloaded the free manuals since I started using Ubuntu and after using it for a month I moved to Fedora and within a year's time I was using FreeBSD on my system. It took me couple of days to get myself started on X server. But I was very much amused by  Matt's page  on FreeBSD. I was very patient to understand how FreeBSD works and all I learnt at the end of trying it for months together is FreeBSD is bit dated technology compared to Linux and hardware drivers follow FreeBSD very slowly and some times they don't quite perform up to the potential since the drivers are poor. I moved back and forth to Arch Linux , Fedora and Debian. Arch Linux is bit over-rated for being simple. Its as bloated as Fedora or Ubuntu.
Debian is really something else and I dont know what magic they do, honestly their package manager has been always been stunning and reliable.  

Why did I try Gentoo:

I saw matt cutts Ted talks video about trying something for 30 days. I always used to look Distrowatch.com for news and new packages in various distros. I have previously gone through the gentoo handbook and I was amazed at the number of steps involved in installation. During my college days I used to do Windows Re-stallation for my Friends computers and it  was too complicated for my friends to do an windows installation. Since I have tried FreeBSD already I had a pretty good idea how to get around my ways in Linux Terminal. I thought I would start with Sabayon mate which was bit beginner friendly according to Distrowatch.com and I used the Fedora familiar anaconda and it was such a breeze to install it. The installation was  solid. I don't have any qualms against Sabayon. But I always want to try the Parent Distro rather than the offspring as I wanted to enjoy the real sense of how the Distro is designed or intended to be used.

The first step:

I downloaded the Gentoo-minimal latest .iso file and downloaded the stage 3 tar ball with it. I used dd tool to write it to my Sandisk 8 GB USB drive. I  have a Lenovo Y580 with core i7 and a small 16GB SSD which I use it to install Linux.  So I  used Sabayon LiveCD instead of gentoo ISO.

Sabayon LiveCD for a cheated install:

I honestly recommend any noob trying to install Gentoo should be using any LiveCD so that they have a working computer and easily install Gentoo in the same computer at the same time. Having a working internet is a must to refer to the official handbook all the time. One has to literally follow the handbook and it has very good examples of scenarios which could help you imbibe the process and intentions of Gentoo.

The install:
 I always assumed that the hardest part of any install is getting X-server work. But when it comes to Gentoo I was bit surprised to know that I was forced to learn my hardware than ever before and I had to configure it properly in kernel. Proper configuration means  you need to know if you have to make your desired kernel variable as an built-in option or modules. If you try copy kernel .config from other distros and compile with the .config in Gentoo it probably won't work since each Distro is designed in a different way around the kernel. I did try the sabayon .config on Gentoo and I ended with a kernel which didn't boot. So either make an effort to learn or use the alternate easiest option genkernel. For some people I guess even using the genkernel might be daunting.

The kernel building:
The building of kernel is a part of installation when compared to any other distro out there.
I used to build custom kernel in Arch Linux which would build all the modules for about 70 mins if I don't use the option of localmodconfig, modprobed_db.

The genkernel took 7 mins to build the kernel on my latest i7 hardware . It was pleasant surprise since I messed with the .config with lack of knowledge. For all the people who said it would take 2-3 days to build Gentoo, I have to say that its all down to hardware. Newer hardware builds kernel without an hitch with make -j9 option on in less than 10 mins. I felt the hardest part was kernel .config and apart from that if you know how to read it can't be any easier.

I would recommend noobs to use genkernel tool for kernel installation. It automates the kernel config to a great deal and avoids the pain of choosing the wrong options in kernel .config. I tried installing kernel manually with the make menuconfig option, but with my Linux knowledge base I couldn't get to a working kernel at any point. Kernel .config needs some serious learning. The options are huge and a single mistake will probably lead to an unbootable kernel.

The post install and X-server:

My system took a total 160 mins  to install gnome-light and xorg-server alone. 
 It downloaded of around 500MB distfile sources.  There were lot of interventions required to reach this point, but its Gentoo we are talking about. Its definitely not a cake walk with just the handbook.

The Grand Gentoo Design: 

Why is Gentoo designed this way? 
 The docs page doesn't do justice to define what makes gentoo for what it is. If anyone has used Gentoo would realize that all the configuration options in Gentoo portage can be done in any other Linux distro except that you would have to do it with more difficulty. 

Emerge is the one of the most advanced source based package manager out there. The configuration options initially looks bit difficult to manage but later you will come to terms with it. There is no linux distro package manager has as many options during an package install as gentoo. The out of tree packages can be managed with layman.I am still yet to find out linux package that is not available in Gentoo repo + layman yet.

 In order to understand Gentoo one has to use Gentoo for a while why its designed that way. I am sure it adds a new dimension to your linux knowledge.



Wednesday, November 28, 2012

Install Infinality freetype and font settings for Debian

Install Infinality freetype and font settings for Debian


This is a guide how to install Infinality font settings for Debian testing and unstable.
The steps given here are provided by the package maintainer Xiao-Long Chen at github.
Make sure you have the development packages as needed.
1. Clone the git repo
git clone https://github.com/chenxiaolong/Debian-Packages.git
cd Debian-Packages/
2. Install the build dependencies. Run the following
command and install the packages it lists using apt-get/synaptic/etc.
cd freetype-infinality/
dpkg-checkbuilddeps
cd ../fontconfig-infinality/
dpkg-checkbuilddeps
3. Build the packages:
cd ../freetype-infinality/
./build.sh
cd ../fontconfig-infinality/
./build.sh
4. Install the deb files:
cd ..
sudo dpkg -i freetype-infinality/*.deb fontconfig-infinality/*.deb
You’ll need to reboot after installing the deb files. Enjoy the better
looking fonts!
I have built binaries packages for amd64 for jessie and wheezy you can grab the links at my post in Debian forums.






Wednesday, July 25, 2012

Infinality setup guide: Fedora

Infinality setup guide

Setup Infinality Font smoothing and supixel hinting

The default fedora font settings are not that great and most of the people really do not find it as attractive as Ubuntu or Linux Mint. But Infinality brings a big change in the Font settings area for Fedora. Once you install the Infinality repo and their binaries you are good to use various font setting options provided by them.  The default settings are more than sufficient for most of the people out there.

1. Install the Infinality YUM repository


[code] sudo rpm -ivh http://www.infinality.net/fedora/linux/infinality-repo-1.0-1.noarch.rpm [/code]

2. Install the font settings and Freetype binary


[code]sudo yum install fontconfig-infinality freetype-infinality[/code]

restart the X window to make the changes into effect.