Linux.com

Community Blogs



Use gdm login with Chinese Language in .xprofile

The GDM locale is different, so don't use like zh_CN.utf8 or zh_CN.UTF-8. Just use zh_CN. That's true, enjoy it with your liked language.

 .xprofile

# mark's note!
# This locale is not real,just for GDM
# So do not use like zh_CN.utf8 or zh_CN.UTF-8
export GDM_LANG=zh_CN
export LANG=zh_CN

# Input for CJK
export XIM=ibus
export XMODIFIERS="@im=ibus"
export XIM_PROGRAM=ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=

 

A Willingness to Learn

The arguement against Linux that bothers me the most is the one that states that inexperienced users just can't handle the change away from Windows or some such.  In my opinion, the only thing holding these users back from learning Linux is an unwillingness to learn.  If they're willing to learn, then the transition is no problem at all.  If they're not, well, they'd be happier sticking with Windows anyway.

To illustrate, I'll talk about a couple of my own experiences.  The first of these was when my wife bought a Macbook Pro (I know, still not Linux...) to replace her Windows laptop.  My mom was interested in getting a laptop, so we sold her my wife's old one.  When we gave it to her, she was rightly concerned as to whether it had all the proper antivirus, antispyware, and firewall software on it.  After assuring her that it did, I told her that for what she uses a computer for, I could install Linux on it and she wouldn't need the antivirus and antispyware, and that she'd still be able to do what she needed to.  She was apprehensive to learn a different way of using the computer, so she declined and told me that XP was fine.  It's not that she's afraid of technology--as a high school librarian, her library was one of the first in the area to switch to computerized records back in the day--but she was comfortable with what she had.

In contrast, my wife's cousin came over a few months back, and was intrigued at the strange-looking (Gentoo running Gnome) desktop on my computer.  I told her what it was, and proceeded to show her stuff like Compiz, multiple workspaces, installation of programs from the repo, and the like: stuff that Windows couldn't offer.  She really liked what she saw, and was particularly impressed with Conky, so I asked her if she'd like me to install Linux on her computer.  She didn't like the sound of it, but I gave her a couple of live CDs for her to try out.  I figured that she wouldn't want to make the switch, but hey, I could take the loss of a few CDs.

The next time my wife's cousin came over to babysit, she asked me if I could "install that program" on her computer after all.  She complained that Vista was too slow on her computer, and was frustrated with its byzantine UAC and configuration tools and such.  After confirming that "that program" she referred to was Linux, I happily went about installing Ubuntu 9.04 on her computer.  (Yeah, I know, but Gentoo would have taken too long to install, and probably wouldn't have been an ideal distro to learn the basics with.)  Unlike my mom, she was interested in learning, watching me go through Jaunty's installer and asking questions about what I was doing.  She was impressed that Ubuntu installed so quickly, and was eager to get into using it when the install finished.

After she did the post-install setup and played around with Ubuntu for a while, I offered to customize her install to make the adjustment from Windows easier.  As much as I respect the free-as-in-speech aspect of Linux, I find it difficult to run an OS of the likes that the FSF would approve of.  I imagine that my wife's cousin, being a typically-connected teenager, would find it difficult as well given that she listens to mp3s, visits YouTube, watches DVDs, and the like.  Moreover, since I left Vista on her computer in case she wanted or needed to boot back into Vista, I thought I'd set it up so the NTFS partition was automounted, and then symlink her "Music" and "Video" folders to their respective locations on said NTFS drive so that she'd have access to her existing collections.  So, I fired up the terminal and went to work.  She was still interested in knowing what I was doing and why I was doing it, and surprisingly, she was fascinated with the command line and wished to learn how to use it.  She described it as something like "It's so cool, like you're talking to the computer!", which I suppose is pretty accurate.  So much for the old myth that new users don't want to use the command line, too.

After I finished installing the freedom-hating codecs and setting up /etc/fstab and installing a few miscellaneous programs (including Conky!), I set her free to explore her new OS.  She quickly took off, and by the time I looked at her screen again, she'd customized the theme from orange to green, set her own background, and done a few other things to make Ubuntu her own...none of which I'd showed her; she'd figured them out herself.  My wife's cousin hasn't come to visit since then, but I'm curious to see what she's gotten up to with Linux since then.  

I'd say that both my mom and my wife's cousin have comparable levels of computer knowledge, and they use their computers to do much the same thing.  The difference between them, though, is the desire to learn.  With such a willingness, my wife's cousin had no trouble adjusting to Ubuntu.  Granted, I installed it and set it up for her, but if I had been installing Vista out of the box on her machine, I'd have had to do similar setup as well.

So is every inexperienced user ready to switch to Linux?  No, but it's not because Linux is arcane and difficult to use, it's that the user has to be willing to try something new.
 

Getting Flash (Adobe) to stop crashing Firefox in Fedora 11

Before anyone hit's me over the head with "File a Bug Report" I'll save you the time you didn't take in checking to see if there was a bug and, there is. #505365 to be exact. The work around is known, it's a matter of waiting until Fedora decides on how to fix it.

Meantime, Firefox still crashes.  So what to do.  Well in dealing with the bug and in dealing with some stack traces I did, we came to the same idea.  There are a number of libs in Firefox, that are referenced by Firefox, the same names are referenced by flash.  The problem comes when Firefox runs it says "Do I have this lib if so use mine." and Flash says "Use the lib referenced by ldconfig"  OOOOOPS!

Yep, you now have conflicting libs, and the end result is a total panic by Firefox, resulting in a crash.  The solution?  Remove the conflicting libs from the Firefox directory (where Firefox expects them to be) and poof. All is well in surfing land.  If Firefox can't find the libs locally it happily uses the system libs without missing a beat.

The procedure is as follows. ($ is used to represent a command prompt)

$ cd /usr/lib/firefox

$ sudo mkdir lib-hold

$ mv  libfreebl3.chk libnss3.so libnssutil3.so libsmime3.so libssl3.so libfreebl3.so libnssckbi.so libplc4.so libsoftokn3.chk libnspr4.so libnssdbm3.so libplds4.so libsoftokn3.so lib-hold/

Now just install Flash as you normally would and viola, you now have a working flash installation that doesn't crash Firefox.

 

 

Walls

OK, so you have recommended a GNU/Linux flavour to someone who is interested, and you go and help her in installing her new system. Linux understands all the hardware, everything turns out to be a success (except for the to-be-spanked webcam), and here is a new desktop computer filled with free software. And than your fellow wants to watch some online video or listen to an MP3 stream - quite usual things to do. And the new system tells you, that it is intended to download some interesting things called "codecs" which are needed in order to watch a video or listen to an audio stream. And the new Linux-based desktop system tells the user that this may or may not be illegal in any particular country - Continue or Cancel? No more information is given.

And most users click Continue... And many users start to violate immediately their country's patent laws. Is this a crime?

If this is a crime - an illegal thing to do -, than the user is responsible for committing it. This must be a very small crime, but it is illegal. Some patent holders will not get their patent fees. And it is not about software patents - these are somewhat more complex technological patents, established for a long-long time. You can debate on it, but it is out there in the legal code, and is violated day by day. This is a small crime by an individual, and probably never ever will anybody punish an individual for this. But this has a bigger effect when you consider a larger scale of deployments. Ten million small individual crimes may add up to a large patent fee not paid, and that is a loss from the due payments of the economy. Audio and video codec developers... Many many company.

Most GNU/Linux distributions encourage this small crime - it is really easy, one click to commit it, and there is quite few information about it being committed. There are codec packs with paid patents for Linux systems, but the basic setup will not tell about it - instead, it shows just that small dialog. May be illegal. You can not know. We don't know either. Continue or Cancel?

There are large companies outside of Linux's scope, which do the same, and encourages a user to commit a crime for profit. For example, Microsoft sells their OEM software without the patent fees paid - such paying should be made by "the deployer" from entities like MPEG LA. But MPEG LA does not talk to end users, and the mentioned OEM software is available from the stores worldwide, so many end users are deployers at the same time. Those end users are forced to commit that small crime, using an illegal codec supplied by Microsoft. But this is not a problem regarding the individuals that use Linux on desktops. This is not a problem for Linux.

The problem for desktop Linux adoption is in networking. I mean networking with the companies that are the patent holders of such multimedia codecs. For example, the MPEG2 codec has patents from many companies worldwide. About 30 or 40. Large and small companies. Those companies may not have an inspiration to cooperate on driver development and supporting Linux in other ways as long as desktop Linux users tend to use their patented technologies illegally. And MPEG2 is just one codec of the many. Those companies may think: Linux users don't pay us what is due, so why should we support Linux? Instead, we should hide mandatory information and slow their adoption that way. Have you met such company walls already?

This, what I described, is a simple economical phenomena. Companies don't support entities which don't support companies.

We should find the ways to turn down the walls.

 

Installing Firefox 3.5 RC 2 in Ubuntu/Linux

If you are using Ubuntu or any other modern Linux distribution, you are probably running Mozilla Firefox 3.something. While those versions are stable, they are getting a little outdated; why not upgrade? Shall We?

Getting Firefox

Before we can install our new version of Firefox, we need to get a copy. I always like to download the latest from the Mozilla FTP Server.

To save us a little bit of time I’ve taken the liberty to find the link to the latest version as of right now.

Here’s the link to download it: ftp://ftp.mozilla.org/pub/firefox/releases/3.5rc2/linux-i686/en-US/firefox-3.5rc2.tar.bz2

Just download that, and we’ll be ready to go.

Installing Firefox

We’ll be installing Firefox in Ubuntu 9.04; if you happen to be running a different distro, don’t worry to much, these steps are pretty general.

  1. Save the file to your desktop
  2. Open a terminal
  3. cd Desktop
  4. tar xfvj firefox-3.5rc2.tar.bz2
  5. sudo mv firefox /usr/lib/
  6. cd /usr/lib/
  7. ln -s /usr/lib/firefox/firefox /usr/bin/firefox

There ya’ go! You can now run firefox from any terminal with the command firefox

Making The Menu Item(Optional)

This process installs Firefox, but it may leave an empty place in your menu. If you want to add it again, you can use alacarte by running the command alacarte. It’s a pretty straight-forward process.

Conclusion

If all went well you’ll be enjoying Firefox. I hope this tutorial was helpful to you, and feel free to comment/share it with people.

~ Mike

References

Here are a few links that were helpful in putting this tutorial together

License

This article is published under the GNU Free Documentation License.

 

Find Wonderful Ubuntu Applications at The Daily Ubuntu

Sorry for the brevity of this post; it's just meant to let you know about the blog I've been working on. You can get a huge range of Ubuntu applications at The Daily Ubuntu. Generally, I focus on end-user applications, but I welcome a whole bunch of recommendations. Check it out, and tell me what you think. Now, I really wish this thing would publish.
 

On FUD Toward Free Software Projects

Today's rant was provoked by yet another overheard discussion in Identica about Mono and Moonlight.

People are repeating FUD about Mono and switching from the GNOME desktop, which uses Mono in a few places, to KDE, which doesn't use Mono at all. I don't know who started it, and I don't care. It needs to stop.

For the uninitiated, Mono is an implementation of Microsoft's .Net framework, licensed under GPLv2, LGPLv2, and MIT licenses. It is meant to comply with the ECMA standard. Moonlight is similarly an implementation (a clone, really) of Microsoft's Silverlight framework, licensed under LGPLv2 and built atop Mono. FUD stands for Fear, Uncertainty, Doubt, and refers to unsubstantiated rumors used to scare people away from a competitor.

Microsoft is the scourge of the Free Software world for a number of resons, most of them quite valid. They have a number of patents on their .Net implementation, as well as patents on technologies build on top of .Net, including ASP.Net and Windows Forms. Silverlight is often referred to as Microsoft's "Flash killer" (referring to Adobe's propriatery Flash technology) and is quite propriatery as well. When Microsoft gets involved in free software, the community is skeptical and almost always rightly so. 

The fear is that Microsoft will use its patent portfolio to threaten the Mono and Moonlight projects. The uncertainty comes from Microsoft's patent pact with Novel. Microsoft and Novel formed a mutual nonagression agreement with regard to either party's patent collection, giving users of each immunity from patent lawsuits from the other. Novell owns Suse Linux and is the driving force behind the openSuse distribution. Other Linux distributions, as well as BSD, OS X and (open)Solaris are not under this pact and may be vulnerable to patent lawsuits. If one distribution is safe, one wonders whether the rest are safe. Many Free Software users doubt the safety of Mono and its derivatives, and are avoiding Mono like the Plague.

This is stupid.

As I mentioned at the beginning, the source code is released under a number of prominent free software licenses. The Mono C# compiler source code is available under both GPLv2 and the MIT X11 licenses, and the C# tools are also GPLv2. The runtime libraries are LGPLv2. The class libraries are released under the MIT license.
(Mono (software) License)

What really burns me is the people switching to KDE because the GNOME project is using Mono code in some applications. I wouldn't be surprised if these are the same people who switched from KDE to GNOME over the QPL licensing back around Qt 2 (a long time ago). QPL was a free software license, but incompatible with GPL according to the FSF. In 2000, Trolltech released Qt/Unix under both QPL and GPL. Years later, there was still a strong myth that KDE wasn't really free software. FUD doesn't go away quickly, and if people don't do the research it won't go away at all.

I've been a KDE user for years, and used GNOME before that. Both have their merits, and KDE fits me better. A lot of people have told me to switch back because "KDE isn't really free" and I kept telling them "I looked up the licenses, it IS free." I want to feel good about the reversal of roles, but I can't. It's wrong.

There are many reasons to switch to KDE. It's a major Free Software project with a long history. It's very configurable an flexible. It has a complete set of applications written with the same libraries. It's intuitive to use. It looks as flashy or as bland as you want. It has a cooler logo than GNOME. These are all good reasons to switch.

FUD is not a good reason to switch. FUD is not a good reason to do anything. And I would prefer it if you didn't bring your FUD into my community.

 

Sources:

Mono (software)

Qt (toolkit) History

KDE Origins

 

WGet and Downloading an entire remote directory

Sometimes you need to retrieve a remote url (directory) with everything inside it, when you miss a live presentation or a forum you often find material published on the web in a certain site; you'd like to get the entire presentation (usually several html pages and links) or read it online.

When no "download all" button is available or when you don't have spare time to read it immediately you wish to grab all the directory content and read it offline later, I usually download material for my personal digital library, I always think: "maybe I don't need that tip now but in the future it will help.."

Everybody knows wget and how to use it, it's one of my favorite tools expecially when I need to download an ISO or a single file, using wget with recurse on an entire site is not a big problem but when you need to download only a specified directory it could cause headaches when dealing with different options

Here's what I do when I need to download a specific directory located on a remote site (an html presentation for example)

wget -r --level=0 -E --ignore-length -x -k -p -erobots=off -np -N http://www.remote.com/remote/presentation/dir

Here are the options:

-r : Recursive retrieving (important)
--level=0: Specify recursion maximum depth level (0 for no limit), very important
-E: append ".html" extension to every document declared as "application/html"
useful when you deal with dirs (that are not dirs but index.html files)
--ignore-lenght: Ignore "Content-length" http headers, sometimes useful when dealing with bugged CGI programs
-x: Force dirs, create an hierarchy of directories even if one would not been created otherwise
-k: here's one of the most useful options, it converts remote links to local for best viewing
-p: download ll the files that are necessary for proper display of the page
(not so reliable when dealing with JS code but useful)
-erobots=off: turn off http robots.txt usage
-np: no parent, do not ascend to parent dir when retrieving recursively,
one of the most useful function I've seen

Please keep in mind this is focused on downloading only a specific dir and for html presentations or materials you can even view offline, when dealing with flash or other kind of contents it could be a mess, for my basic needs I've just created a script and I pass the url to it

Here's what I do, suggestions or improvements are welcomed

Andrea Ben Benini

 

Linux gaining mainstream support to reach critical mass.

Guys, surely most of you know and realize Linux is a great OS. The problem is no one uses it and no commercial apps work with it. (generalizing here sure a few things work)

What can we do to help Linux reach higher levels?

My proposals are

1. Focus on polish and ease of use.

a. to install an app there should be a universal way. Users dont care about how they want it done. When a user clicks on install they want an install to happen.

b. More commercial apps. Focus on games. Surely there is a sharp group out there that could get with some of these companies to work to help port some apps to Linux. In this economy people want cheaper products and Microsoft isnt cheap. With more linux netbooks and phones etc coming out it is gaining some recognition. If you could show a business how they could make money with Linux apps I think they would be more apt to accept it than ever before.

c. come up with a unified linux. I know I know this is a sin but come on guys, surely we could have a standard vendors or customers could choose that defaulted to a certain look and functionality. Most people dont need 10000 apps or 12 apps that do the same thing. And besides you could setup this standard to only apply if selected?

 d. Be heard. We need more communication on the benefits of linux. Hands on demos at the stores, blogs, some type of marketing from the big Linux companies, etc.

e. better hardware support. This has come a long ways. I still here "its Company XYZ's drivers that suck", well that may be, but surely something can be done about this.

 

I know this probably isnt 100% the way to do it and I will probably be flamed but I really would like to see Linux have its day.

 

Things I like about KDE4.

       There's been quite a bit of hubub about the KDE project ever since the 4.0 release last year. Critics have slammed the 4.0 series repeatedly, citing the mentality of "Well, it's not good enough to be a full release.". Between the poor publicity, the crashes in Plasma, and the still-developing early features, KDE was definitely not having a good time. Developer blogs were plastered with hateful comments, and one of my favorite devs Aaron Seigo had to temporarily shut down his blog.

       However, for all the bad rap that the 4.0 series received, KDE has grown wonderfully. With the upcoming releases of KDE 4.3, Plasma has become a rock-solid desktop environment. Sites such as KDE-Look.org have dozens of Plasmoids and Plasma themes ready for desktop user consumption. Major headway is being done on theming, as new community artists continue to contribute new variations of the existing theme engines. (This user in particular is using the "Introducing KDE4" Bespin configuration theme)

       With all said and done, I would like to bullet-point a few things that I really love about KDE. After tinkering around with the system and setting up a build environment (mainly for building Plasmoid binaries), I have this to say:

 -Plasma gets the job done nowadays.  It's not the crashy, spiteful desktop of the 4.0 days. Also, many of the themes and plasmoids that have come out are just incredible. As of writing this, I'm using the Daisy plasmoid for Window management with an Xbar on a panel up top. All with a Glassified theme. Looks spiffy!

 -Cmake, the build system for KDE applications, is a fantastc piece of work. I've always had trouble with the build-essentials packages when compiling Gnome apps. I have to hand it to Gnome packaging teams, that stuff can be a real pain in the rear if you don't know the dependencies! At the very least, Cmake is great about letting me know about a missing dependency, or an error in the CMakelists.txt, or etc. It's becoming a real joy just to find the most obscure experimental apps on KDE-Apps.org, and build them to see what they do. 

-Kwin is nice and snappy. I've loved the simple effects that ship with it, but it's a real lifesaver for when something goes awry when  I build experimental Plasmoids that crash Plasma. You can just flick to a running terminal. Better yet, you can just run Yakuake and make things even easier. 

 -The KDEArtwork package gets better with every subsequent release. Oxygen becomes more and more beautiful and polished, and the user-submitted wallpapers that make it into the release package are top-notch. While I usually end up just switching to the wallpapers I've always used, the KDE wallpapers anymore look better than a lot of professional pictures done for those Other operating systems.

-The Developers are so in touch with the community. One of my favorite things is moseying over to Planet KDE and reading the latest experiments the devs are up to. There's always a fascinating screenshot or mockup to explain a concept. 

-KRunner is a superb app for quickly launching anything you need to. It really reminds me of QuickSilver, which was one of my favorite OSX addons ever.

 -The Folder View/Desktop view merged paradigm blows me away. I like having my Desktop function like an actual desktop, but I love using a folder view to check files in my documents. With the simplicity of dragging and dropping, Plasma has really gotten intuitive.

-Phonon's graphical configuration frontend is much more comprehensible to me than Pulse Audio Device Chooser's numerous dialogs. Out of the box, it just works with my music player, web browser, games, etc.

-As a final note, I really appreciate that the Rekonq Project has finally been officially integrated in the KDE Project. For those of you who don't know, Rekonq is built off of Trolltech's Qt Webkit example browser. It sports a clean interface, and the webkit engine is not only ridiculously fast, it renders things properly! I've always had problems with Konqueror, even with the Webkit Kpart. Hopefully, this will open up more options for KDE-compatible browsers.

 

Tweak your GTK app fonts to look as good as KDE apps

I don't know how many times I've had to install 100's (ok it seemed that way) of gnome apps just to tweak the font's in GTK apps  so that they looked decent.  The KDE apps have always looked good.  But the GTK ones lacked, well, everything.  

Then I ran across this little article on how to do it.  All I had to do was run this command in a term window.

#> sudo ln -s /etc/fonts/conf.avail/10-autohint.conf /etc/fonts/conf.d/

 Then I restarted the X server, and the fonts on GTK apps (Like Firefox) began to pop like their KDE brethren. HTH

 

 
Page 8 of 11

Upcoming Linux Foundation Courses

  1. LFD211 Introduction to Linux for Developers
    06 Oct » 07 Oct - Virtual
    Details
  2. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  3. LFS416 Linux Security
    06 Oct » 09 Oct - Washington
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board