Archive for August 2003
KDE 3 vs Gnome 2
Posted by: JDS
My take on KDE3 vs Gnome2.
I have been a long(ish) time user of Gnome on Redhat. Redhat 6, 7, 8, and now 9. I was thrilled with Gnome2...mostly. The more and more I used Gnome2, though, the more it felt beta, unfinished, unpolished, etc. I recently switched to KDE3, to see if that would solve some of my issues/problems.
And it did!
I use Linux -- at work and at home. I have my wife using Linux, (somewhat against her will, to tell the truth). On her computer, I had installed RHL9 with the default desktop confguration, which is Gnome2. Unfortunately, some very basic things that aren't too problematic for a comupter geek were causing problems for her. KDE3 has solved those issues.
Issue 1
GUI file copy to floppy disk failed using Nautilus (Gnome2). A not-too-common bug (I've searched all over the internet and bugzilla for a resolution but found none).Solved with KDE3.
Issue 2
Gnome2 much less configurable than Gnome1.
Solved with KDE3. KDE even does better than just being super-configurable. It has a configuration wizard to automatically configure your GUI experience to be similar to Another OS(TM) -- be it Mac, Windows, or Unix. And from there you can configure the hell out of it -- or not -- as you like. I can't figure out how the Gnome developers think that less configuration == easier to use. KDE's tightly integrated desktop model and configuration tools are *far* superior to Gnome (1 or 2)! KDE is (nearly) on par with Apple's OSX, as far as desktop integration and tools. wow!
Issue 3
Wife's computer crashes or freezes all the friggin time.
Not necessarily solved with KDE. This problem, I think, stems from cheap hardware more than anything else. My computers, at work and at home, simply don't crash (well, hang, really) as often as hers does. Admittedly, the porblem for her is that she needs to use MSWord and MSExcel and I have them running for her using Crossover Office -- and these are what hang the most. (Haven't convinced her to use OO.org yet). But my work computer with Crossover does not hang one tenth as often as hers does.
Issue 4
Can't easily configure the RedHat menu. (i.e. "Start" Menu)
Solved with KDE3. Why oh why did RedHat ship a broken Gnome2? I mean, the docs that ship with RHL9 and the things that actually happen are not congruous. Take menu editing for example. Why is there no menu editor for Gnome2??? You *should* be able to use nautilus to edit the menus by going to applications:/// and drag-n-dropping links to programs and launchers and whatnot. But it doesn't work!! At least KDE3 has a menu editor. And it's very easy to get to - right-click on the K-Menu->Menu Editor.
Allright, so there you have it. A jumble of notes. My main point in all of this is stated in my description of "Issue 3" -- that KDE is far more tightly integrated, more configurable, more featurful, easier to use, and just a generally better desktop experince than Gnome. I wish it weren't the case, 'cause I really like Gnome2. However, the Gnome2 shipping with RHL9 is clumsy at best and broken at worst. (Maybe this is not true for other distros? I hear Mandrake is a better Gnome2 experience.)
As I have been using KDE3 over the last coupla weeks, I have exclaimed "Wow!" at some feature of other of KDE3 every few hours. The file manager (Konquerer) starts faster and works better than Gnome's (Nautilus). The window manager is flexible and configurable. (Unlike Metacity, Gnome2's default WM). Little things, like the kpilot app that minimizes itself inside the System Notifcation tray.
I could go on.
JavaScript Code Snippets
Posted by: JDS
I am posting some JavaScript code snippets here for future reference. They may not work, but try 'em and see.
Confirm Action yes/no
First is a snippet that will confirm a user's action with a dialog. There are basically two ways to accomplish this: using a <form> or using a plain link. Both are essentially the same, however.
Using an HTML form:
snippet with user function:
<html>
<head>
<script language="javascript">
// you need this function which looks at the value coming
// from the confirm() dialog box
function someMessage() {
var msg = "You will now delete this entry!";
if (confirm(msg)) {
return true;
}
return false;
}
</script>
</head>
<body>
<!-- You also need the onLoad event handler for the delete button: -->
<form action='action/' method='get' onSubmit='return someMessage()'>
<input type='submit' value='Delete'>
</form>
A simpler form of the 'confirm delete' script is as follows. It does not require a javascript function "someMessage()" in the HEAD section (which is why it is simpler):
<form action='action/' method='get' onSubmit='return confirm("Do you really want to do this?"'>
<input type='submit' value='Delete'>
</form>
</body>
</html>
The simplest form is the plain HREF link, without the user function someMessage():
<a onClick='return confirm("You really want to do this?")' href="test.php?submit=1&var1=yes">TEST</a>
I've tested these snippets in MSIE 5, Opera 7, and Mozilla 1.4, all on Linux. YMMV.
Newt's Linux/Apache/MySQL/PHP (LAMP) FAQ
Posted by: JDS
I often find myself lurking in the various Linux/Apache/MySQL/PHP newsgroups, answering questions (and asking them). The more I lurk, the more I see questions oft repeated. So here is my self-compiled FAQ on those topics.
This is a work in progress, so check back and see what's been added!
Questions
- I want to configure IPTables but don't know how. Help!
- My PHP script gave me the following error: "Parse Error...blah". What does this mean?
- What is the best editor for editing PHP code? (or HTML or Perl or C/C++ etc.)
- What is "Resource Id #2"?
- Why can't I use a variable name I have passed in via the URL? or I had a script that used to work with the variable $value that was passed in via the URL like so: URL?value=123. Why doesn't this work now that I have upgraded to the latest version of PHP?
Answers
I want to configure IPTables but don't know how. Help! Use a freely available Firewall script. For examples, go here: http://www.linuxguruz.com/iptables/or here: http://rocky.molphys.leidenuniv.nl/ (recommended! )
My PHP script gave me the following error: "Parse Error...blah". What does this mean? "Parse Error" = "Syntax Error".
What is the best editor for editing PHP code? (or HTML or Perl or C/C++ etc.)Vi, obviously! Gvim, specifically.
Just my opinion, of course, but beyond reccomending Vim, I have no opinion on other editors. Why Vim? Easy macros, abbreviations, and aliases, Syntactic highlighting, parens finding, multiple cut-and-paste memory registers, easy keyboard-only navigation, small, lightweight memory footprint, and it runs on every computer ever made.
What is "Resource Id #2"? It is a "handle" that PHP uses to access a data resource, such as a file, MySQL query result, or socket. Most often seen in conjunction with MySQL, but may also appear in conjunction with file access, image creation, and others.
If you see an error referring to "Resource ID #xx" as "not a vaild resource" then you have a problem in the code that is supposed create the resource. The most common problems for the mysql_xx functions are incorrect username, password, host, database name, or sql statement. Check those.
Why can't I use a variable name I have passed in via the URL? or...
register_globals must be turned on. Newer versions of PHP have this turned off by default. register_globals allows you to pass variables from script to script via the URL query string.
New computer/Samba domain
Posted by: JDS
My coworker just got a new Dell computer. Yay! However, there were some problems connecting it to our Samba-controlled NT domain.
Turns out that there is a Registry entry that needs to be updated on WindowsXP before it will log on properly to a Samb controlled domain. The registry change is as follows:
(Cut and paste the following into a file called "whatever.reg")
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetlogonParameters]
"requiresignorseal"=dword:00000000
I can't guaranttee that the above registry file will work for you. So don't blame me, please. You can also edit the registry (using gpedit.msc or regiedit) and find and change the key by hand. Worked for me!
For more information:
There are probably more sites with more info, but I couldn't find them. Put this into the "obscure-and-hard-to-find-but-terribly-important" category.
Update: Adding printer
Later the same day...
I tried to connect Jason's new computer to the networked printer shares on our Samba fileserver, but Noooo! It no workey!
Why? WIndows XP is why. Well, to be precise, there is a group policy on Windows XP and Windows Server 2003 which limits the ability to add networked printer by default if the print server does not have the proper print drivers available. I disabled this policy by doing the following:
- Run gpedit.msc (Group Policy Editor)
- Edit the policy User ConfigurationAdministrative TemplatesControl PanelPrinters to be Disabled.
- Done
This then gave me the "Cannot find a driver..." dialog box I'd come to expect from Windows 2000 and earlier when I browsed the network for the print share. I chose the proper driver from the local list of drivers (WinXP ships with a lot of drivers!) and presto! Working printer!
See the following for more information: