Sunday, November 6, 2011

Gentoo splashscreen howto (with/without KMS)

To see a splash screen as you open Gentoo, you need something called the 'frame buffer'...this is basically a driver which has the ability to display video from the text-only console. This's usually generic and not accelerated, i.e. does not take up the unique features of the graphic chip, although we do have a bit of acceleration or device dependent framebuffers.

Framebuffers are involved in making of the console (or Ttys), since Fbs also have a resolution and you can even set the resolution, consoles too have a resolution which can be set by passing kernel parameters. The parameters dependents on the FB driver.

Different framebuffer -- Vesa, Userspace-vesa (generic Fbs), radeonfb, radeondrmfb, inteldrmfb etc....

So first you need to compile your kernel with support of some FBs.
If you're using KMS, you don't need to mark any framebuffer, KMS provides it's own framebuffer. Once the DRM modules load, a FB is provided. If you have compiled the kernel with other Fbs, it'll replace the FB with it's own. This KMS FB is hardware specific and fast. You cant use both KMS FB and other FBs -- only 1 will work.

The mandatory sections to be selected in kernel are -

CONFIG_FB (in Device drivers>graphs support). In that, select -

CONFIG_FIRMWARE_EDID (Support for frame buffer devices>Enable firmware EDID)

you can select which frame buffer support you will compile in -

*** Frame buffer hardware drivers ***

(not required if you're a KMS user)

If you wanna use vesafb, mark it.

In “Console display driver support” which is in Graphs support -

Support for the Framebuffer Console Decorations (CONFIG_FB_CON_DECOR) -- this option wont be available until you apply the fbcondecor patch or install gentoo-sources. Get it from -


Apart from these, select

VGA text console (CONFIG_VGA_CONSOLE)

CONFIG_VGA_CONSOLE (Framebuffer Console support)

Map the console to the primary display 
(CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY)

Disable “Enable Tile Blitting Support” (CONFIG_FB_TILEBLITTING)

Which is in Support for frame buffer devices.

Compile and install the kernel.

Now emerge splashutils with fbcondecor, png and truetype USE flags enabled.

Splashutils is a cross distro method to implement splash screen, but it requires an init script but only if you want userspace splash, thus this needs to be made for every fundamental distro.

Splashutils requires some kind of framebuffer to be present to work -- any will work, it has the ability to start from the initrd.

Splashutils themes are set in 2 options, one verbose where you will get some sorta decoration with the output messages (a decorated console), and the other silent...windows and Ubuntu style.

Splashutils can start from 2 modes -- one initrd, where it start right from the beginning and the other from userspace, i.e. it start after init has started. Thus an initrd is completely optional but you don't get early bootsplash.

This packages give you 2 main applications -

splash_geninitramfs and splash_manager

There are various themes available in portage -

media-gfx/splash-themes-gentoo, media-gfx/splash-themes-livecd and media-gfx/bootsplash-themes

All themes will be placed in /etc/splash...with their names same as the folders in this directory. Each theme supports different resolutions, most common being 1024x768.

You have to append the following lines in the kernel parameters to configure the FB you intend to use and also define which mode will the splash screen work on, silent or verbose. Apart from this, you also have to define what theme to use (optional for userspace splashscreen).

video= splash=,theme: console=tty1

Out of this, only splash= option is necessary even if you're using the splashscreen that starts after init. Otherwise if the splash start from init, everything is necessary.

Depending on what FB drivers you use, you will have to modify the video= option, I.e apart from specifying the video driver, you have to specific options for the FB driver. From here you can set the resolution of the FB console too.

With vesafb, you have to specify the resolution with various options. These are the defaults and safe -

video=vesafb:mtrr:3,ywrap vga=

The options for vga are (numbers of 3 digits) -

320
×
200
640
×
400
640
×
480
800
×
500
800
×
600
896
×
672
1,024
×
640
1,024
×
768
1,152
×
720
1,280
×
1,024
1,400
×
1,050
1,440
×
900
1,600
×
1,200
1,900
×
1,200
16 colors




770


772

774




256 colors

768
769
879
771
815
874
773
869
775
835
864
796
893
15-bit (5:5:5)
781
801
784
880
787
816
875
790
870
793

865
797

16-bit (5:6:5)
782
802
785
881
788
817
876
791
871
794
837
866
798

24-bit (8:8:8)
783
803
786
882
789
818
877
792
872
795
838
867
799

32-bit (8:8:8)1

804
809
883
814
819
878
824
873
829

868
834

As copied over from wiki.
 
If the number is wrong, the kernel will notify.

e.g. -

video=vesafb:mtrr:3,ywrap vga=795 splash=silent,theme:Cynapses console=tty1

With KMS FB, you have to specify only the resolution with option refresh rate as such -


Where -24 is the refresh rate.

or simply video=1280x1024

The console= option should be set to tty1 (when using initrd based splash) otherwise you will not be able to see the splash.

To preview a theme -

splash_manager --theme=one of the themes in /etc/splash --cmd=set --tty=.

Notice, for the theme to work, the console should be at the right resolution.

This program (splash_manager) revolves around a command -- the command is the task that need to be done, either display, set, demo etc.... themes. To specify the command, do it with the --cmd= option.

The command 'list' displays all the splashes available with resolutions. 'set' displays the decoration of the console and 'demo' will give a demo of the boot screen.

After you have decided what theme you'll use, you have to generate the initial ram image; if you're using initrd based splash, this's not required.

splash_geninitramfs --res --generate .

The --verbose option is useful for debugging.

Each theme supports different resolutions. The resolutions are in the directory /etc/splash/. You can also check it out using the --cmd=list command of splash_manager (as stated before).

If you want to copy the theme to an existing image -

splash_geninitramfs --res 1600x1800 --copy

If you already have a theme in the initial ram image archive, you might just like to append the new theme -

splash_geninitramfs --res 1600x1800 --append

Now you can see the reason behind the theme: kernel parameter, this specifies what splash to use during boot of the multiple available in the kernel.

Also notice, for initrd based splash to work, all the correct kernel modules which're required to make the framebuffer should be built into the kernel or should be there in the initramfs. Also the resolution should be perfect from start.

Userspace splash -

For userspace splash you have to start the service fbcondecor, for automatic startups, add it to the boot or sysinit runlevel. You don't need to do this for init based splash... neither you have to configure the service configurations.

The configuration of this service is done from the conf.d directory and the fbcondecor file. Read the comments in it to configure. The splash style (verbose or silent) is read from the kernel's parameters.

Apart from this, you have to see the file /etc/conf.d/splash for further configuration and the theme you wanna load. It's configuration is mandatory.

Wednesday, November 2, 2011

Huawei EC1260 (12d1:140b) (reliance, tata, MTS etc...) on Linux.

This modem works out of the box. Just ensure to have the usb_modeswitch package installed. lspci output - 


Bus 002 Device 003: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card



First you need to install usb-modeswitch, then plug in the modem (or replug the modem), then run (as root) -


wvdialconf



You'll now have a file name /etc/wvdial.conf, edit this as root, enter your username, password (usually anything will work), then the number to be dialed (usually *99# or #777). Uncomment these lines also. In an MTS connection, password is #777, username is internet@internet.mtsindia.in and you gotta dial #777. Here's the wvdial.conf for MTS - 



[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Username = internet@internet.mtsindia.in
Init1 = ATZ
Password = mts
Modem = /dev/ttyUSB0
Baud = 57600



Next run wvdial command, and things should work fine.


As tricks -- in wvdial.conf, increase the BAUD rate to 57600, higher value also works. In case you're using gnome-ppp as the front end, set the modem type to USB modem otherwise you might see lower speeds; I don't know why this happens, although it shouldn't.

Saturday, October 29, 2011

sysctl parameter reset

Every wondered why does you custom kernel parameters in /etc/sysctl.conf doesn't get set on startup even after you add sysctl -p on boot scripts?


The reason might be kdm. It happens that when a user logs in using KDM, it resets the kernel parameters to default, making the init scripts's parameter settings to non existent.


I've reported a bug on this, as an alternative you can set the kernel parameters after you've logged in by setting a timer in the start up script - 


sleep 40; sysctl -p


A better idea will be automatic login; for security, you might configure kdm to lock screen after log in (this can be found in system settings > login screen).

Thursday, October 27, 2011

Linux and CD/DVD burning.

Well, I'm disappointed. Agreed that CD/DVDs or any kind of optical media is a dying game, but it's also critical for professional/home media production.


We do have a lot of multimedia tools which work well, but what we don't have is a good CD/DVD burner, when it co
mes to graphical burners, things boil down to - 
K3b -- the most preferred and the only one.
xfburn -- the second choice, if k3b doesn't work.
Brasero -- Most unreliable and most buggy.
xcdroast -- seriously, I never got this to work
Nero


The backends of all the apps except Nero boils down to - 


cdrkit/cdrtools
libburn/cdrskin


Everything else is deprecated.


I have someone who has the work of converting very old cassette and LPs to ACDs (i.e. he has to burn the recorded tracks to CDs).


A few months ago Nero stopped working after an upgrade, ironically it could not add audio files (wav) to make ACD, everything else worked fine. 
So it was rejected and the fallback was k3b, which a few months later (again after an upgrade) hit a bug where adding audio tracks randomly causes segmentation fault, this is a still a Debian bug.
Next fallback was xfburn -- but it didn't add any gap between tracks of the burnt disk.


Finally Brasero -- the most unreliable (don't ask why) came to the rescue, it did not segfault and was capable to adding gaps between tracks but I think this'll also end up in bugs some day or the other.


Not to mention, I had spend days to figure out the issue with CD/DVD burning on Linux a year ago and fixing strange problem with various hardware, specially pioneer drives and external devices (popular now). Things complicate more with fabulous cdrkit bugs and the dramatic cdrkit-cdrtools clash -- a licence issue, something which no one except Debian devs care about. The ultimate solution that I see is libburn and it's client cdrskin -- they never gave any problem on any hardware.


But cdrskin waits for k3b to add support, till this we only have xfburn. :(

Sunday, October 23, 2011

LP120 on Linux

Audio technica LP120's USB interface is basically a USB audio controller integrated inside the player and it's compatible with Linux, you need to do nothing specific in a Linux distro to configure the card, drivers are build into Linux.


Just configure it through pulseaudio GUI to make it work.

Tuesday, September 27, 2011

Humanity is a complete failure.


So we have 'tons' of computing power under our keyboards (or behind your screen or under you, depending on what sorta computer you're using :-P), lots of telescopes, super thin displays and nuclear technology at hand, so common people might think of the human race as 'advanced'; but the major question is, to whom are we comparing ourselves to? Our neighboring species, cats and dogs or relatives in the jungle (chimpanzees and gorillas)?

Without any extraterrestrial reference we cant classify ourselves in advancement in technology; the current issue with us is that there is no good competition on earth for us (for some debatable reasons), so how do we rate the success of humanity?

The rating can be done on basis of what have we done till date to earth, how have we managed ourselves, how have we managed our population on earth and how have we managed the eco systems (not by merely the apparent advancements that we see everyday), and rating from these factors, I come to one conclusions – humanity is a complete failure, we were born on earth (point is we live in earth as of the current time) and we'll probably die here someday unless something 'magical' happens. So let's see how -

What we think is the best is not the best.
We think that feeding the poor is good, democracy is good, not slaughtering animals is good, Buying Microsoft products is nothing bad, and living under a leader is good... just to list a few examples; but is it actually good?... if you think so why do you think it's the best possible way around? I've explained all this in the headings that come under.
Most humans are governed mostly by emotions (I'm talking about major decisions here) and less by mind which's not productive as a leader, as a decision makers, if you go by the heart it'll just be like random decisions taken on basis of a single person's opinion.

In general life you can see, people or organizations who make a successful living will decide things using their mind more than heart (at least when it comes to work) so in general it can be said, using mind more than heart is more productive... and that is what most humans don't do (including me, partially).

Take an example of Mr. Bill Gates... this guy has successfully sold crap to the people and is now forcing them to use it.. and most people don't have a problem at all. By simply pioneering an eye candy this guy convinced people to drop the reliable OS/2 in favor of an unreliable shiny piecea crap (Windoze)... so was this decision his opinion or logical thinking? It was his logical thinking, this guy realized that people are utterly fools.. all they see is eye candy and what not recedes beneath, as a result he made such an OS to ensure that programs made for it will only run in it, and proprietary file formats made by Microsoft products are only officially supported by MS products which only run on Windows... which is again a MS product, he knows that people don't understand or care about anything else other than eye candy and irrelevant conveniences, as a result the code quality is horrible and Mr. Bill doesn't care about spending enough to improve the same, why should he care about it, do the people care about it...? will it increase their sales...? No it will not. So no use spending money on code quality, instead let people buy rubbish proprietary crap like 'antivirus' 'firewalls' (which's again a way to rob people), upgrade their hardware every year to compensate for the horrible code quality developed over they years and buy bugfixes every year (Windows Vista to Windows 7); and people STILL don't realize they are not only doing bad to themselves by using Windows, but to the whole human race, it's a Monique under Bill Gates. Mr. Bill knows that even if he does good to the people they will not realize... they are too foolish to realize, they are not governed by the mind.

So, in the above example I've generated a contrast between a single individual who appears to be governed more by mind and the 89% of the remaining computer users (who use Windows) who are governed by heart... people think there's no harm using windows, just cause they 'feel' that way but Mr. Bill knows this fact (and doesn't 'feel' it) that if he increases the code quality, it'll only do harm to the company, and the people wont even realize increasing the code quality is good for them. This is just a rough example, there much more to the picture, and not complete Mr. Bill's fault. By this we get the fact that what people 'feel' as a good thing might not be good to them at all.

We can see a real life example off this, people will support these following opinions of mine (under the heading) -
Fame and beliefs
Financial distribution among types of people
How are we technologically backward, using absolute reference

Population and our kindness -
This point is a subset of the above.

Most of us love to feed the poor, we feel 'mercy' on them. We feel the fact that while we are enjoying, partying, eating lavish food, they are starving... and on the verge of death cause of the same. As a result we donate, celebs raise money and donate 'for the poor'.

But people haven't realize that feeding the poor is not the solution to the source of the problem – no one even has an opinion on this, all they do is feel the mercy and donate and what the authorities do is is buy food off it and distribute it among the poor... that's about it. No effort in solving the source of the problem; ok so, these social science people claim that the solution of the problem is to make the rich poor (in an ironical sense, we all know what it means); however this decision is again governed by human feelings and emotions – people are too damn governed by emotions to state or conclude the fact that most poor people are poor cause of their own fault and the solution is more than just feeding them endlessly.

For anyone sensible, breeding is a thing to do when -
  1. You have enough money
  2. You have enough time
  3. You're responsible and mature enough.
This is what the poor people don't realize, and we feel mercy on that lady who got fucked twice on the streets, having 2 kids and not a single home (roaming on the streets of certain countries of Africa and south east Asia)... she doesn't deserved to be fed! She deserves to be imprisoned to ensure that she doesn't get fucked again and make a thousand kids which the pity-pity people will feed again to ensure she makes a thousand more! What I say here, is let her beg and starve and make her realize her fault rather than feeding the feeling of breeding. Of course, if she was raped, or has a kid for some other forced reasons, it's not her fault.

Breeding should not be a human right... it's a liability there's no such solid rule made as a result the human population is way is excess for even the most noble intellectual individual to manage, leave alone the elected democratic leaders who got chosen by the same herd feeding the poor... what else do you expect some divine 'democratic leader' to come up and explain the fact that what we humans 'feel' as right is necessarily not?

And what are the response of the socilists? Lots of names and theories made by more over emotional people blaming the rich and often themselves for what has been done to the poor. They give no facts (and if they do, I'll modify my post and place the new opinion).

And this doesn't have to do much with corruption. If the people of a country are not getting enough finances to raise kids, they should not, they should revolt against the government, kill the corruption and when they are having a stable state, then they should start a family. Now don't tell me it's their plan to first increase the population and when they all multiply, they protest together to make a larger impact.

As a result, as of the current time, and given the stone age technology we have (how efficient is the average IC or jet engine for example?) the human population is way in excess... where it should have been a millions, and considering the advancement in technology, it should have been at most a single billion but it's in the order of billions.

There's not a place where humans don't reside, everyone's complaining about increasing food and land prices but as I expect from the stupid commoners and they haven't realize yet and will never realize the source of all the problem is population... which we can control using economics (one of the few successful things we have made). Now you might say without enough humans around, how will the technology grow? Finally with increasing human population, the number of intelligent or talented people will increase. If we look at this point of view, by the current population, today technology needed to be 10000 times more advanced than what's it's now... we're growing as if we reside on the whole solar system and our technology is no where close to doing that for 50 centuries from now. However I don't blame this technological backwardness to be the cause of excessive; I tend to think we only reap a fraction of the total potential of humanity as a result we're seeing these days.

To reap the potential of humanity, the system should be good (currently, it's bad, I've explained that later), businesses should think about the people apart from money (cause only businesses implement ideas) and lastly mindless breeding should be banned cause if the right person is born in the wrong place (a poor society) he'll only be a weight on earth.

Of course people who were made poor cause of some other reason like a disaster, or very bad malpractices by politicians (that is had kids before hand) are out of this list.

Fame and beliefs -
The human population is full of ideas, we have people who have fabulous thoughts, opinions and ideas; an ideal social system of a country or organization should be designed to take up each of these ideas, analyze them and put them in action.
But that apparently doesn't happen. If plane Jane comes up with an idea X and sets up an opinion among people about it, it'll probably be ignored, but if a celebrity comes up with the identical idea... or actually an idea which's not better than Jane's, it'll be thought about and considered instantaneously.

I call this human stupidity. People should realize that people who are famous or rich are not gods and don't spit out the best possible ideas and opinions, so no need to quote them or rub on it as if they where spells from god. Unless someone expertises in a field and talking about it the same, there's no need to think that the things that he/she speaks about IS the best or great opinion.

Let's take an example.. whatever the things I say here will be ignored and never be read, although it's something we should all consider. Had I been a superstar, they would have taken all this seriously and many of them would have really put them in practice rather than criticizing (a thing which's never going to happen)... when it comes to famous people, the listeners don't even have guts to criticize.

Democracy/Leadership theory -
We live in a society which's usually modeled as a herd with a single leader which the herd should follow at least for some period of time, this appears to be 'naturally' the best way (again a feeling), but it is really not. This is partially a Monique with an exception by which an apparently 'intelligent' person (from the herd) has the rights to slip aways from the herd to make himself a leader with a bunch of people with similar opinion and then he'll start gathering a crowd and make a thing similar to a 'country', something which's a manifestation of how stupid human beings are and what a failure humanity is.

Continuing with this leadership theory, question is, why is this 'partially a Monique system'? Whatever the leader things as right he will command and do, apparently if the action has some major flaw in it which the common people are not intellectual enough to understand and only a small portion revolts, it will be actually ignored and the useful opinion will go waisted unless some big celeb revolts (see Fame and beliefs subtopic) which's just a matter of probability. If the people have the rights to choose their leaders we call it democracy which adds up to the series of failure. Consider the common foolish people which are mostly incapable of becoming the leader themselves vote a person 'according to their opinion'.. which's clearly trash since they they don't have any intelligence at all. How are people with low intelligence suppose to choose which person will be the best as leader... the leaders can simply conveniences them to believe they are here to help them by seconding their stupid opinion and making hypothetical false promises of reducing tax and doubling the economy which the stupid commoners appear to believe (finally why are they commoners?... why ain't they leaders convincing the commoners? That's cause they are stupid... they don't have enough intelligence to see what's right and wrong.). This is similar to what Bill Gates did. People want that leader to put under action their opinion and THER opinion is trash which'll finally do bad to the whole of earth.

In democracy the leaders might favor people on bases of supporting their religion a major advantage where people of one religion form the larger majority (like Nepal). So the opinion of the common religious fools will overshadow the opinion of the 0.5% sensible, no doubt the leader chosen will either be -
  1. Too foolish
  2. Too selfish.
Let's take an example... people will vote for the person who claims to do favors to them. So we take a crowd of judges, cops and prisoners and ask them to vote about 'Should the current prisoners be free?'. Since prisoners are the much greater majority, the result of the voting will be a 'yes'.

In the real world, most people are selfish, when they vote, they only care about their advantage and not what problems will this advantage cause to others.
Furthermore to vote for the right candidate you don't need to see what they are doing now, or what they claim to do, you gotta see the background, the history of the individual and decide on if he's really capable of doing the job. And 90% of the population doesn't care about this, they don't even have enough intellect to understand his aspects, leave alone the fact of lower intelligence of the masses, no one even has time to do this, as a result most of the votes are either random or just stupid opinion.

This is what we call democracy and the leadership theory "Let the majority stupid rule" and "You do what I say, even if it's stupid" respectively.
Cause of this we have the concept of countries which I define as a group of people with certain leaders and defined territory where they live... a ridiculously stupid and unproductive concept. A reason for existence of a country is the fact that humans are competitive, they are designed to fight competition off, since there is no real competition to humans, we fight among ourselves. So if an extraterrestrial species decides to capture earth, and the whole world considers this as a real and major issue, there's no scope of doubt that the whole human population will unite and the concept of the countries will be lost unless the threat is gone. Finally this is the definition of country I give -
"Groups of people separated by areas and leaders thinking only about their own good and possible harming other groups for their own benefit."

Wild life conservation -
Considering Population and our kindness section, we can have either 2 things given a state of technology – Adequate wildlife or excess of human population. 90% of people receding on earth want both however.

Yeah it is possible but that's considering we are 50,000 times more advanced than what we are now. Unlike each animal or tree born on earth each human born will consume 50 billion times more resources and cause infinitely more harm to the wild life looking at the current state of technology we are in.

So if you're a wildlife conservationist and handing out hand bills to save the tiger, plant more trees or support our conservation efforts, it's better to drop them off altogether and start convince people to stop making babies and support more R&D, and when the technology has grown advanced enough, THEN make babies. Doing this will aid all your conservation efforts.

Furthermore, it's originally not human to save, or conserve any other species. We survived on earth cause we had cut down trees, killed animals for food and won over them when it came to competition for all – land, food and luxuries. We are so successful that we are actually keeping them as pets... just for fun, and we even have mercy on them, we have mercy on the difficulties they are facing cause of the insane amount of human population or actually cause of our success. So this 'mercy' part comes cause we are too damn successful and not cause these things are build into us... originally we're only meant to be compassionate about other humans... to aid our complex social structures, nothing else; care for other animals is just a side affect.

Limits of our management skills -
It can be considered that at the current state of time, the human population is so damn in excess that any average individual or even groups of average individuals will not be able to manage it; we need someone extra ordinary. It's out off the bounds for an average team of human being to manage such a large population. Thanks to democracy, the handful of good and super intelligent human beings will never be elected following the thinking of the average.

Even if the suffice do get selected for the purpose, it will still be very difficulties for them to manage the majority fools of the human population. These common people don't understand anything, and even if they feel the slightest inconvenience they make a mob and revolt... none of them have understanding about whats going on inside, what are the challenges faced by the leaders etc... leave alone advising solutions.

Less intelligence -
Ok, so I've been talking a lot about common people are fools, but are they really fools?
If the average population was actually intelligent, the average would have been capable enough to vote or realize that the leadership system is crap for this large amount of population and our small planet earth wouldn't have been divided into 100s of countries. If human population was intelligent enough an average set of individuals would have been good enough to manage the human population, but apparently that's not possible.

Another proof of lower human intelligence is the fact that people cant predict the future given certain facts... like global warming (which's probably a myth), people have been told the temperature thing, it's consequences and even the severity but are they talking care of it?... yeah 1% population does. They don't realize the fact that if they don't stop driving 4 seater cars alone or quit IC engines and adopt it's electric variants, to save earth, but they neither care, nor realize the severity of this. What's more important is the 'manufacturing cost' of the vehicle... that is financial things take presidency over the future of earth no one can realize the real danger.

I say IC engines should be banned at least on roads within a period of 5 years, if that sounds too hard, new IC vehicle should be banned for sale at least. I haven't even mentioned flight which's the most inefficient model of transport around (with 10% efficiency I guess? Remember Newton's third law and KE, momentum relation?). Even with an electric motor there's nothing you can do much to improve the efficiency of a flight.

Most human being are governed by an apprehension that nothing can harm the human population major – we're the most successful of all creatures, there're no rivals absolutely. What a common human's mind cant see is that the rival is not in form a creature, but are fight for resources, various geological and cosmic interferences that will wipe us someday – which'll be another day when we'll be thinking the human population is safe and nothing can harm it.

Invisible enemies will never be realized except by a few scientists who'll be suppressed by the stupid government (which's elected by the stupid people following democracy) to maintain the 'economy' of the nation, or whatsoever reason. The human population is itself the biggest enemy of the species and we've failed to realize that.
Humans become fans of mostly entertainers, or the most insignificant people on earth; as a result they are rich, whereas scientists, by the most important personals neither have the money nor the right. This has been explained below.

Financial distribution among types of people -
Let's see who get's paid most (1 to 3) -
  1. Businessmen
  2. Entertainers
  3. Working class people
    1. Scientists.
There's no scope of doubt that the entertainers are the most insignificant people on the planet, and yet they are one of the most paid. People recognize them as 'gods' as so they are taken as brand ambassadors and become millionaires soon.

On the other hand, the scientists appear to be insignificant... for all the good they do to the world, and for which humanity has risen to such heights are ignored and given a salary (although it is high, but it's comparatively very low).

It appears impossible to solve this issue, since people simply can't become fans of scientists (they are so uncool), but the government can help. They can make a rule by which a minimum of 50% of the revenues generated by a company using the R&D of a scientist or a team has to be paid to them. This will although directly affect the businessmen and indirectly the entertainers, but at least the most significant people will get paid what they did for. Additional the utility patent term should be extended to 30 years.

The patent laws states that the term of 20 years is to ensure that the inventor keeps on working rather than just invent one thing and relax for a life time. This is indeed true, the solution to this will be extension of 5 years on all previous patents if and only if a new patent has been filed.

Our method of discussion is still crappy –
Discussion is one of the few things which make humans very different – the huge vocabulary, the brain and patience to sit and listen to each other for hours on end; but unfortunately I find the trivial debating method nothing but a waist of time for major and controversial decisions.

If you carefully listen to a serious debate; effectively only 4 things happen most of the time -
  1. People repeats their statements again and again cause the other party fails to understand or listen; as a result he asks or prompts the answer again and again.
  2. A lot of solid points are completely forgotten.
  3. They cut each others sentences, as a result the 2 never understand each other.
  4. Some people forget a few points since you need to respond fast to people – it becomes a type of game on who responds faster.
And the 3 problems to these are -
  1. There's lack of depth in the discussion; as we go deeper we keep forgetting other factors in the discussion making the situation complex.
  2. What people said is also forgotten unless things are recorded; and even if they are, it's very difficult to track the discussion cause it's usually not structured.
  3. Oral discussion can't be structured.
  4. You physically have to go and dedicate your complete time discussing; and if the discussion gets postponed many times (cause the people are asking for time); the discussion gets delayed by an extreme amount.

As of the current time, none of the above problems have been addressed and that's cause we're still using trivial techniques to commence our debates – just talking.

Conclusion -
We're nothing but a bunch of monkeys, finally they are our ancestors.

Solution to all this -
Be follower of logic.

And our objective should be -
  1. Everyone on earth should be happy.
  2. Wildlife should be conserved.
  3. Future should be good (safety from the invisible enemies).
  4. Humanity should expand (not on earth).
By following logic we ought to do things which apparently people don't like and the people who don't like it will be welcomed in the discussion and ultimately convinced that this was the right decision.

The backbone of what should be done and what should not should be decided in discussions... this's where things should start, thus we should have a solid discussion platform to form laws. This will be as such -

All discussion will be in textual form and in online forums, this way we solve 3, 4, 6 and 8 with a new problem – discussion is slow, but it's better (and faster) than postponing.

Why this's faster is cause discussion can commence day and night, when someone wants time to gather statistics or just need a break, he can simply leave for any amount of time and come back when he wants to and catch up with the discussion since it's completely archived and easy to track, thus giving him extreme flexibility and not ruining his whole day – people can even do this part time as a result lots of important (and might be intelligent) people who'd otherwise not have participated start participating. Also, for the same reason, this'll give people time to think (4)
As of point 3, since this's a written discussion, they can't interrupt. Everyone can write completely and till his/her complete satisfaction.

Anyone from the public can start a thread in this forum to change or make a law.
The various things that this person wants to state (as to why the law should exist, the current problems etc...) will be broken down into small points which will be discussed independently. These individual points will be responded to by people to spark a discussion.
e.g. I want discussion on abolishment of software patents, I'll place the following points (just for e.g.) -
Topic – Software patents should be more limited.
  1. ….
  2. Patents have a history of supporting only large companies which try to eat up small companies or individuals making software
  3. Using patents large companies try to abolish or put pressure on non-profit organizations or people making opensourced software, thus failing the point of patents (good of the people).
  4. ….
To discuss, someone may respond -
  1. ….
  2. Patents have a history of supporting only large companies which try to eat up small companies or individuals making software
  3. Using patents large companies try to abolish or put pressure on non-profit organizations or people making opensourced software, thus failing the point of patents (good of the people).
  4. ….
Just in case there's another aspect arising from a point (numbered 2), a new point can be made off it (numbered 5). If this new point is such that the previous point (from which it arises from) depends on it, point 2 may be suspended unless point 5 is resolved and there's a definitive conclusion on it.

This will form the very basic concept of how discussions should be proceeded and will clearly remove issues 1, 2, 7 and 5 of the classical discussion methods.
As I stated, everyone from the public can participate in this discussion, but they have to first pass a test by which they will state what they want to discuss about. If it has been found that his point has not been discussed before he'll be allowed in the discussion permanently (i.e. next time he wont be needing a permission unless he posts something already previously discussed).

If this restriction is not applied there'll be a flood of posts.
Other small time problems exists which have solutions to e.g. no personal attacks etc...
Best of all there'll be no political party system which's a complete failure since all that political parties do is favor each other and disfavor others in a hypocrite way.

This system will be used to make decisions also; swift, time sensitive decisions will be made by a single authority and after discussion it might be changed.

I tend to think, if we follow this system the world will change. The commoners will see why they are wrong and no one will be unsatisfied since they can always discuss. No rallies or mobs or monopolies. People will be under control. There'll be no elections, the immediate leader (for swift decisions) will be chosen on bases of how accurately he made decisions in the past.

Sunday, September 25, 2011

KDE builtin man page viewer.

Just in case you don't have khelpcenter installed (cause you've installed a minimal KDE build) there's a another way to view a man page in HTML.

In dolphin/konqueror do - 
man:
e.g. - 

man:nano.

In Dolphin this'll make a temporary HTML file and open in the default browser, in Konqueror, it'll open that temporary HTML file in itself.

Friday, July 22, 2011

Parallel re-fetcher (using wget).

This script is a parallel re-fetcher (i.e. it can restart downloads removing the old files and updating them with a new ones). the comment says it all.





#! /bin/bash
rm -Rf /tmp/fetching_links
# Takes in a file, and a number which defines how many links to be fetched in parallel. This'll also utilize the wget feature to reuse an existing TCP connection.
# e.g. ./fetch_parallel <path to list> <no. of threads (n)>
# The file taken in will be spitted into n parts and each part will be stored in /tmp/fetching_links (with text file named 0, 1, 2, 3 etc... depending on value of n).
# Each file will be fed to wget for fetching.
# third argument is optional. Third, if present will will refetch the downloads after n seconds (as specified by the third argument) and overwrite the existing files. If the argument is 'c', it'll refetch without waiting.
# Files will be stored in ./downloads
# variable to store all links
links="$(cat "$1")"
# Generate list of links (depending on no. of parallel fetches).
# variable each will contain the no. of lines to exist in each instance of wget.
declare -i each
each=$(($(echo "$links" | wc --lines)/$2))
# Helper index variable $num
declare -i num
num=1
#assign link list for each wget instance to process and split the file list in arrays of $links.
while [[ $(($num - 1)) != $2 ]]
do
    links[$num]=$(echo "$links" | head -${each})
    #trim list of files to allow second run.
    #remaining lines (not divisible with each) will be in links[0]
    links="$(echo "$links" | tail -n +$(($each+1)))"
    num=num+1
done
#num will be used later as the no. of valid indexes in links. Thus reduce it's value to the right one.
num=num-1
mkdir /tmp/fetching_links
# index variable i will be used to echo lines in array links to /tmp/fetching_links, each will be read separately by wget.
declare -i i
i=0
# if links[0] = "" or \n, it means there were no left overs after the split of the link list. I need to make a mark of this.
    if [[ ${links[0]} == "" || ${links[0]} == "
" ]]
    then
# Set variable f as "empty" if links[0] was "". For future use.
        f="empty"
    fi
# num variable contains the no. of indexes available. For future use, it's copied over to another variable max.
declare -i max
max=$num
while [[ $num != -1 ]]
do
# File names will be same as the index variable in variable links
    echo "${links[$num]}" > /tmp/fetching_links/$num
    num=num-1
    if [[ $f == "empty" ]]
    then
        if [[ $num == 0 ]]
        then
            break
        fi
    fi
    done
# function which needs to be called again and again for repetitive fetching.
unset links
# Value of max will again be used, thus storing in num again.
declare -i num
num=$max
call_wget(){
# Resetting value of max in case of a recall.
    max=$num
# calling of wget starts here. Using previous variable max and 'f'
    while [[ $max  != -1 ]]
    do
        wget -N --tries=3 --timeout=5 -U "Mozilla/5.0 (X11; U; Gentoo Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.16" -i /tmp/fetching_links/$max &> /dev/null &
        #debug
        max=max-1
# file[0] will be missing if f==empty
        if [[ $f == "empty" ]]
        then
            if [[ $max == 0 ]]
            then
                break
            fi
        fi
    done
}
t=$3
# If $3="", wget will just run once.
if [[ $t > 0 || $t == "c" ]]
then
    while [[ "1" != "2" ]] # An infinite loop
    do
        call_wget
        echo "Fresh call"
    # See if any wget's running in bg using jobs.
        status="running"
        while [[ "$status" == "running" ]]
        do
            jobs | grep Running &> /dev/null
            if [[ $? == 0 ]]
            then
                status="running"
                sleep 2
                echo "running"
            else
                status=""
            fi
        done
        # The sleep timer, or no wait, depending on value of $3.
        if [[ $3 != "c" ]]
        then
            echo "waiting $3 seconds"
            sleep $t
        fi
    done
else
    call_wget
    status="running"
        while [[ "$status" == "running" ]]
        do
            jobs | grep Running &> /dev/null
            if [[ $? == 0 ]]
            then
                status="running"
                sleep 2
                echo "running in background"
            else
                status=""
                echo "All done."
            fi
        done
fi
rm -Rf /tmp/fetching_links

Wednesday, July 13, 2011

Making openoffice/libreoffice save faster.

With large documents, openoffice/libreoffice slows down miserably saving documents; most of the problem is HDD I/O.

That can be solved in most Non-Microsoft systems by saving to ram instead of the HDD.

To start off, make a folder named X... this'll be the place where you'll copy over the document you'll be editing (COPY, NOT CUT).

mount a tmpfs filesystem (portion of RAM) to this folder (as root) -

mount -t tmpfs none 'full path of X enclosed in single quotes'

Then copy over the document to folder X, notice if you turn off the PC, you'll loose the document, thus it's critical to make backups (i'll tell you an automated method).

Notice, when saving changes to the document, it'll be faster... there's a another hack to make things yet faster, but before that let's make the automated backup. Run the following (not as root) in a terminal -

while [[ $i != '78' ]]; do sleep 60; cp 'full path to document in folder X in single quotes' 'full path to original document in single quotes'; done

This'll make backups withing a single minute of the document.
As of further making things faster, first make a dir Y in /tmp -
mkdir /tmp/Y

Then mount a tmpfs file system on it (as root) -

mount -t tmpfs none /tmp/Y

Goto openoffice, in tools > options > openoffice/libreoffice > paths

In here set the temp directory to /tmp/Y.

You're done, saves should be a lot faster now (restart all instances of openoffice). However notice, under VERY large documents and limited amount of ram (usually less than 1 GB with KDE), this may fill up your RAM very quickly.

Tuesday, July 12, 2011

Micromax 352G on Linux.

This's just another regular modem with a storage device as the default mod. First you need to install usb-modeswitch, then plug in the modem (or replug the modem), then run (as root) -

wvdialconf

If it says modem not found, it means the USB device has not switched it's state, thus, do so as follows -

usb_modeswitch -v 1c9e -p f000


Then again try wvdialconf, it's ought to work.


You'll now have a file name /etc/wvdial.conf, edit this as root, enter your username, password (usually anything will work), then the number to be dialed (usually *99#). Uncomment these lines also.


Next run wvdial command, and things should work fine. Notice the color coding on the modem also to see if it even catches the network.

Wednesday, June 1, 2011

Dog's intelligence.

I've a Golden retriever who's 12 years old (i.e. towards the end of his life time, although he looks pretty healthy). This's my first dog, following his increasing age, I've learn that his intelligence grew with time... to a surprising level.


I mean, people (and some scientists) say dogs don't understand words but the tone at which one speaks... I find it to be wrong. No matter what the expression the dog can understand - 


1) I'm gonna take um for a walk.
2) Who's gonna take um for a walk (e.g. me, my friend or my dad). Well get this -- If someone is talking over the phone discusses that person x is gonna take um for a walk, he goes to that person expecting him a walk.
3) Apart form realizing when we're gonna administer him medicines, he'll grasp us talking and realize it's time for medicines, then soon he'll be under the bed or the table.
4) What sort of food he's gonna get (from curd to milk to soup to bones to choostics -- yup you got that right).


A lot more I can't remember, I also thinks he understands grammar, not only a few words. A few things extra - 


Over time he has learnt the packet in which his favorite choostics lie so he knows what I'm opening. He also recognizes it's sound... and various sounds including the vehicles.
He knows who's watching um... even with side eyes... i.e. he recognizes not only the eye, but the pupil of the eye. Actually he can even understand expressions.


All in all, I think what we understand about him (except his health), he understands the same about us.

Saturday, March 5, 2011

How to get websites opening faster.

Yes, browsers have DNS caching, but it might not be configurable (it might get cleared after like... 60 seconds which's way too less) or it might cache websites/ip who's DNS has changed or it might store limited no. of sites etc...

/etc/hosts is a file where you can specify to your OS network which names to resolve to which IP in the following format -

    

e.g -

204.187.15.12   forums.gentoo.org
208.80.152.2    en.wikipedia.org
209.85.231.104  www.google.com
209.85.231.104  www.google.co.in

This will give you good latency losses.

Friday, February 25, 2011

Reverse tunneling


If the server is behind a router you can still connect to the remote server through a thing called 'reverse tunneling'. For this you have to execute a few commands from the remote system (remote system is the server). Since the router will not allow incoming packet from the local system (local system is the one which is the client) unless you made a 'tunnel' from the remote one.
Now comes the concept of port forwarding. Here, a certain port on the server is 'forwarded' to the local system, the local system can uses this port on itself (I.e localhost) as if this port is on the the remote system. Suppose port x is forwarded, then I can -
I.e I'm using x port as if it's on the remote computer, but actually I'm using localhost for it.
This port x will actually be mapped to the port on which sshd listens on the remote system.
Before you choose the port x, ensure it's not used by anyone, else port forwarding will fail.
The -R option allows you to make a reverse tunnel from the remote system, thus do the following to make the tunnel -
ssh -R ::: @
on the remote system.
example -
ssh -R 1009:localhost (or the computer itself):22 de@decomp.com
And in the client -
ssh -p 1009 remote_user@localhost
In effect this's like -
ssh -p 22 remote_user@the.remote.computer
It's useful to add the -N option also, this will avoid the server from to execute a command on the host.
Another option is -T. This will disable the pseudo terminal, that is it will make no relations to the terminal of the host system, and so it will not even be able to execute commands.
If you also specify the -n option, it'll ignore all inputs from stdin.

Chrooting user in SSH (OpenSSH_5.8p1-hpn13v10)

OpenSSH has this feature (on the server side) of chrooting users to a specific directory after they log in, that way you can ensure the users dont have access to your data. Useful when reverse tunneling.

First, you need to make a directory in which you can chroot using chroot... i.e you need the bear miminal, usually mount binding /bin and /lib64 (x64) or /lib (on x86) readonly will do so (I'm not sure about x86). Assuming /home/chroot is this directory -

mount --bind /bin /home/chroot/bin

Same for /lib(64)


Try chrooting into /home/chroot, it should work. Since you're using the libraries and executables in /home/chroot/* will be used for the by, even by SSH.


Next you need to create/modify a user which ssh will chroot to; notice that the files in /home/chroot needs to be used for this, not those in /. While creating/modifying the user, you need to take a note that the paths will be relative to /home/chroot NOT the usual way. i.e. if you're specifying bash as the default shell for the user, it will not be /home/chroot/bin/bash, but /bin/bash, thus when ssh chroots the user, it will use /home/chroot/bin/bash and not /bin/bash. Sounds confusing.

Now let's make a home directory for the user (optional, i.e you can specify / as the home directory)

mkdir /home/chroot/ch_root

Make or modify a user (I'll modify here) -

usermod -s /bin/bash --home /ch_root ch_root

Notice -- in the server /ch_root does not exist, but in /home/chroot, it does; this is what I meant to say -- paths are relative to /home/chroot and not /.

Now add the following directive to /etc/ssh/sshd_config -

ChrootDirectory /home/chroot

Restart ssh, ssh using ch_root, and the user will be logged in to a chrooted jail in /home/chroot.

Tuesday, December 14, 2010

X Error of failed request: BadLength (poly request too large or internal Xlib length error) on Nvidia.

Ever got this -

X Error of failed request:  BadLength (poly request too large or internal Xlib length error)

while a running a game or openGL application on NVIDIA.

Problem is solved by installing libgl1-nvidia-glx-ia32, which provides 32 bit openGL libraries for 32 bit applications like America's army.

Sunday, December 12, 2010

Photoshop CS5 on wine.

When a notorious Microsoft bribed companys launch application only for Windows or a few other OSs, what do you do? Download the pirated ones. Well, they didn't launch it for the right OS officially, so why should you buy officially?

e.g -- Adobe. So here I tell you how to run photoshop CS5 on Wine, and only the portable pirated version works, so we dont have to pay to a Microsoft bribed company.

You can download the portable version using the torrent which have plenty of seeds (do seed to make Adobe suffer).

WINE might ask you to install the 'gecko' package, if it prompts, do install.

Then just run the setup directly with wine... everything should work. Use the latest version of WINE (1.3.8 does work).

In case the application doesn't run install the gecko package using winetricks, a shell script -

./winetricks gecko

Download from http://www.kegel.com/wine/winetrick

Thursday, December 2, 2010

PlayonLinux

This is an essential WINE wrapper which apart from using the WINE which's installed in the system can also maintain a static builds of various other wine WINE versions.

To do so, navigate to Tools > Manage wine versions.

The application will download whatever version you'll say in ~/.playonlinux/WineVersions/, speaking of which ~/.playonlinux is the home directory of the application, all wine prefixes made will be stored in this directory in the sub directory wineprefix... you can remove these directories to clean the prefix.

Apart from the repository which you can see on clicking the 'install' button you can run third party *.exe in the same dialog by going to 'install a .pol package or an unsupported application', then you'll be greeted by 2 options, select the manual install one, and do whatever the wizard says.

With POL, you can use the latest WINE and manage all wine prefix without using long commands.

You can even use the wine versions in ~/.playonlinux/WineVersions directly (you can see the wine executable in the usr/bin directory), no harm in that. Create an alias for ease.

Thursday, October 21, 2010

Why Microsoft contributes to Apache foundation.

I think the only reason is that MS copies Apache Webserver sources to IIS and adds a few hidden API calls of Windows, gaining an advantage.

So next time you but your favorite copy of Windows server and IIS, remember it's Microsoft's Apache webserver you've been fooled to buy form MS.

Wednesday, October 13, 2010

Why Ubuntu sucks.


Ok, despite the popularity that Ubuntu has got I'm posting a rant on it; that's cause it really deserves it. Earlier when I used to use Ubuntu 8.04... no issues, but things have been degrading since then and at the current state and as a system admin, I can confirm that Ubuntu or it's variants are no longer in production quality.
This happened possibly cause of the Windows migrants (or normal users) who just preferred the GUI and next next finish crap but they are actually a part of the community... they are willing to help, unfortunately their help and their opinion causes more problems and myths than solutions. As a result we had more such people adding up in the community and now the state is that almost everything about Ubuntu is complete trash.
Why I decided to write this today is cause one of my clients said “Linux sucks” thanks to Ubuntu (yeah I know it's Ubuntu's fault not upstream).
Why Ubuntu sucks -
  1. Community – As said before, majority (70% to 80%) of people in Ubuntu community are still under the impression that Ubuntu is a Windows alternative; just judging from the GUI and doing everything from the GUI; they dont even know the difference between Linux and Ubuntu. They have less knowledge, ok, but real issues starts by the fact that these people have attitude and overestimate their knowledge and comment without understanding the main questions.
    Overall, to sum up, this is what the Ubuntu community wanna say -
    “It doesn't matter how many packages are preinstalled, it doesn't matter how the packages have been compiled, and it doesn't matter how you've configured the kernel or the system, all that matter is if the OS is Ubuntu or not and if it is, it is the best!”.
    Now the community will ask "It works perfectly here", and the obvious answer that any non Ubuntu user will give is that all this has been tried on verity of hardware which is true... not even verity, in the same system problems increase over time and I get too many calls.
    The community represents the common public, and the common public IS stupid, they don't need to talk to the devs directly!... they need to talk to them though admins or some expert users to ensure that they don't bombard the handful of Senior devs that are still left in Ubuntu. And those admins shouldn't be Ubuntu admins.
  2. Since such people form the larger majority, we just get answers to simple stupid questions like what's the root directory, how you add a new user, how you install software... all repetitive or simple questions. If you have any real questions which points to a real bug/challenge... the community is doomed. 70% of the community does not have the capability to answer this. The remaining 30% are bombarded by repetitive questions so they don't even see the good questions. Let's take some sample old unanswered questions from the 10-11th page of a randomly chosen forum -
    http://ubuntuforums.org/showthread.php?t=1581605
    http://ubuntuforums.org/showthread.php?t=1581584
    http://ubuntuforums.org/showthread.php?t=1563031
    http://ubuntuforums.org/showthread.php?t=1581574
    http://ubuntuforums.org/showthread.php?t=1563002&highlight=CUPS”
  3. Package quality – Ok, the above is not that much of a real issue, but this is the main issue with Ubuntu. In my case, with every Ubuntu install comes new bugs.
    Take the current issue for examples, DVDstyler does not make the final project... some sorta 'error' occurs, possibly causes of unsatisfied dependency.
    Ok, so I tried the same with Sabayon with the free spaced hosted by an NFS server running on Ubuntu... and guess what happened? Ubuntu NFS encountered 'errors'... cannot r/w files.

    NFS is always giving issues... verity of issues from mounting the served location, to file transfer which at times stops cause of some sorta error which's different every time. Ofcourse the problem gets solved after an Ubuntu 'reboot'. In the end I preferred system rescue CD to get the job done which is unfortunately based on Gentoo – the distro which most Ubuntu users hate with an excuse – 'its not worth it' where as the reality is it's not their cup of tea... how can stupid windows users start using fabulous distros like Gentoo, further more how can they see the advantage?

    CUPS hangs too much, the web config page never opens.

    I opened a bug to compile mplayer so as to play HD videos, hell yeah they fixed it, but now the HD audio wont come (wma).

    That CD/wine bug is there for around 6 months, and no one has a way to fix it.

    Now the scanner stopped working.

    Overall we have verity of uncountable bugs, it appears the devs maintaining Ubuntu packages not proper devs or contributers... they are Windows devs trying to do some Linux package management; or college IT freshers. Otherwise who else will be interested in Ubuntu anyway... it's just another shining distro!
  4. Horrible dependency of preinstalled package – apt-get remove ubuntu-desktop;apt-get autoclean; nothing more gets removed.
    If you wanna remove a preinstalled package in Ubuntu, probably you have to check the dependencies manually to get the job done. I do it for around 10 packages.
  5. Buggy dependency resolution of apt – This is not a major issue, but at times, apt-get autoclean just wont work as expected, and you gotta remove a bunch of orphan packages manually.
  6. FS corruption – Since the Ubuntu's 'super speed' bootup/shutdown started, at times the FS does get an unclean unmount; it shows up in the next boot.
  7. Hardware incompatibility – Various small issues with hardware does occur. For example in a few acer laptops, we have issues with the brightness, touchpad keys, alps touchpad etc...
  8. Ubuntu seems extra slow – All other distros are faster in comparison. You can see the benchmarks.
There're many more (right now and in the making) that I probably forgot about. The current state is such that I'm forced to leave Ubuntu... and I'm glad I'm going to. If you're a system admin or a dev and using Ubuntu, I advice you quit now and start using better thing... maybe Debian itself; yeah Ubuntu community is big, but you gotta see what sorta people it's made off. To the rest of Ubuntu users – I suggest you remain with it and not pollute other distros.

An update -- after more than a year of posting this, I again booted some very old Ubuntu live CDs (7.x and 8.x) to test if they were able to run an ELF executable.
But guess what happened? Bash: ... cannot run executable.
And everything was ok, there was no reason for it not to run. The same worked fine on 2008 Gentoo live CD.
This reminded me that Ubuntu was, is and will always be crap from the beginning of time, not only after 8.04.

Saturday, October 2, 2010

DVD video protected disks.

Recently I got up with a challenge to copy a protected DVD video disk... which is actually illegal, but I just did it for educational purposes.

So what is this protection? It happens that some of the data on the DVD is encrypted, the key to this encryption is supposed to be written to the lead-in area of the DVD.

What a DVD player does is read this key for purpose of decryption of the data (video) under question... so the hardware should support decryption if you want to play such a thing.


Luckily most modern DVD writers (everything else below it is obsolete) do support this, thus you can flawlessly copy such a DVD, defeating it's purpose.

Thoughtfully speaking, almost all sorts of DRM is complete crap (almost, cause few are actually effective, that I've discussed later). If any medium makes a sound and produces a video, it can be, in the modern world, captured with no losses... if it plays in a DVD player (it will) you can record the lossless data though S/PDIF DVI or HDMI... if you're applying DRM to a media which has to be played on a verity of hardware manufactured by various corporations, the technology is probably crap, i.e if you want it to be effective there should a few listed hardware devices which should be able to play it, I bet the Chinese will be the first to break such sort of DRM. This actually did happen in North Asia a few months after CSS DRM was launched... they recorded it live, making the copy protection useless.

Such sorta things cause nothing but problems to the end user... as a result they too download pirated.

So let these propritory DRM people learn a few things by NOT buying anything DRM protected. Yeah, protection of copyrighted material is good, but what's the use if it poses no effects at all?... I mean, if you're having copies of the same thing floating as torrents on the Internet what's the use of it?

So in Europe we have a ban on P2P communication, that is effective, but it's clearly in excess... I mean you're trying to deprive people off fundamental rights simply to make Britney Spears and Steven Spielberg richer?.. yeah, why not forbid people to 'record' the movie and music 'in their minds' to ensure they wont be able to reproduce it anywhere else?.. why not just forbid phone calls to ensure the copy protected lyrics are leaked out off your lips?

Hell yeah, that'll make Britney and Spielberg a lot richer...

If you want to have this thing done effectively, you need to target the sites hosting the copy protected material (not 'peers', but the trackers and the sites providing the torrents).