The wiki’s submit a package feature has been linked to our issue tracker. It will now automatically check for a duplicate name, and will submit any valid packages into the issue tracker as a new task. It’s still in testing, but we hope it will make the packaging workflow much easier.
Also, a new “unitypackage” (rss) Twitter account has been set up. It is used so that our packagers can easily report what they are working on, and they can quickly check before they begin a new package to make sure nobody else is working on it. For cases where a packager is working on many small packages, this is easier than needing to work with the issue tracker.
These systems are a work in progress though. We’re thinking of ways to have the automatically-opened issue tracker tickets also be automatically-closed once the finished package is submitted. The automatically-created wiki pages is also a leftover that would need to be cleaned up. It’ll all be worked out in time.
These feature will not only help our packagers, but they are meant to make package submission, discussion and bug reporting, and status tracking easier for the end-user.
jQuery is a very powerful JavaScript framework, and to put in their own terms, is The Write Less, Do More JavaScript library. jQuery’s slogan indeed holds true to its claim, as you’ll discover as soon as you start coding using jQuery. Although jQuery has an extensive set of API and a collection of many functions in its arsenal, I would be concentrating more on the AJAX capabilities of jQuery in this tutorial.
Most of the modern websites, irrespective of whether they offer a simple or a complex interface, usually use AJAX for some task or the other. While designing in order to cater to today’s needs, it becomes almost indispensable to use AJAX to make the end-user experience faster and more pleasant. So, if you had been deferring the use of AJAX till now owing to it’s complexity in raw JavaScript, here is your chance to start using it with utmost ease.
It is really amazing to see how much simplified AJAX is with jQuery. The developers have seemingly (and painstakingly) done a lot of hard work behind the scenes to make it easy for the web developer to implement even the most complex JavaScript concepts, including AJAX.
For the purpose of demostrating AJAX, I’ll be making use of a simple web application (that I designed using HTML, PHP, jQuery, CSS and MySQL). I call it the Albums Database.
This is the main page, the page the the end-user is going to see. Below is the complete code for this page, and even below that is a brief explanation of it.
We start with the <head> tag. First, we mention all the external scripts and stylesheets that we are going to use with our page. The scripts include a latest copy of jQuery JS file, jQuery UI (optional), AjaxUpload plugin for jQuery, and our own custom JS file. The stylesheets include our own CSS code and jQuery UI’s CSS file (optional).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Albums Database</title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript" src="js/ajaxupload.3.5.js"></script> <!-- Custom JS code that utilizes APIs of some other JS file (jQuery in our case) should be referred to in the head section after the file containing APIs --> <script type="text/javascript" src="js/javascript.js"></script> <link type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="Stylesheet" /> <link type="text/css" href="css/style.css" rel="Stylesheet" /> </head> <body> <h2 id="block" style="color: white; background-color: purple; padding: 20px; margin:0;"> Welcome to Albums database. </h2> <p><a id="new_album" href="#">New Album</a></p> <form id="new_album_form" style="background: #F3F4BA; padding: 10px; margin: 10px; display: none;"> <table width="100%"> <tr><td width="100px">Name:</td> <td><input id="album_name" type="text"/></td></tr> <tr><td width="100px">Artist:</td> <td><input id="album_artist" type="text"/></td></tr> <tr><td width="100px">Year:</td> <td><input id="album_year" type="text"/></td></tr> <tr><td width="100px">Cover:</td> <td><input id="album_cover"> <img id="loader-2" style="display:none;" height=16 width=16 src="loader-yellow-bg.gif"/></td></tr> </table> <br><input type="submit" value="Create"/> <img id="loader-3" style="display:none;" height=19 width=220 align="top" src="loader-long.gif"/> <div id="create_album_result" style="color:green; display:none;"></div> </form> <div> Search for albums: <input id="userinput" type="text"/> <img id="loader" style="display:none;" height=16 width=16 src="loader.gif"/> </div> <div id="results"> </div> </body> </html>
In the main body, we start by displaying a sweet little header. Below the header is a link New Album which, as the name implies, will display a form to create new albums and post them to our database. Below this link is a form that has 4 fields required to be filled to create a new album. By default, this form is hidden and will be shown to the user only after the above link is clicked. After the form, we have a “search box” which lets the user search for existing albums in the database, and the searching is automatically done as the user types into this box. The search results are then displayed below the search box. Magic, you say? It’s AJAX actually.
Here comes the main file of our whole web app. This file contains all the code in JavaScript that will be used to control the behavior of various elements present in our index.html page. Of course, we make use of jQuery to write our JS code in it.
$(document).ready(function() {
The first step is to make sure that index.html has fully loaded in browser of the user before our JS code can be applied to it. This reduces any chances of error or misbehavior on the part of our coding at the user’s end.
/* Convert the input with id 'album_cover' into AJAX uploader */ new AjaxUpload('album_cover', { action: 'upload.php', onChange: function(file) {$('#loader-2').show();}, onSubmit: function(file, ext) { if (!(ext && /^(jpg|png|jpeg|gif)$/.test(ext))) { // extension is not allowed alert('Error: invalid file extension'); // cancel upload $('#loader-2').hide(); return false; } }, onComplete: function(file) {$('#album_cover').val(file); $('#loader-2').hide();} } );
Now, using the AjaxUpload plugin for jQuery, we associate the functionality of uploading images through AJAX with the Cover field of our new album form.
/* Show/hide the create new album form when 'New Album' link is clicked */ $('#new_album').click(function() { $('#new_album_form').toggle('fast'); });
Next, we specify that when the New Album link is clicked, the corresponding form should be displayed (with effects) if hidden or hidden if displayed. That is, we toggle the display state of the form.
/* Post the entry of the new album into the database, using AJAX, when the form is submitted */ $('#new_album_form').submit(function() { $('#loader-3').show(); if ($('#album_name').val() != '' && $('#album_artist').val() != '' && /^([0-9]{2}|[0-9]{4})$/.test($('#album_year').val()) && $('#album_cover').val() != '') { $.post("create.php", {album_name: $('#album_name').val(), album_artist: $('#album_artist').val(), album_year: $('#album_year').val(), album_cover: $('#album_cover').val()}, function(data){ $('#create_album_result').html(data).fadeIn('slow'); $('#loader-3').hide(); }); } else { alert("Please fill in all the details and fill them correctly.\nYear can be only 2 digits or 4 digits long."); $('#loader-3').hide(); } return false; });
After that, we specify the code to be executed when the user submits the form. We start by unhiding an originally hidden animated ‘loader’ image to give the user an illusion of something going on behind the scene (that is, the form submission process starting). Then we put a if condition to check whether all the form fields were filled in and if the Year field was filled in correctly (we use regular expressions for this; the year should be 2 or 4 digits long only). If the form was filled up fine, we use the jQuery AJAX method $.post to submit the filled up form into the database. Our handler script in this case if create.php. After the form submission process has completed, we again hide our animated loader image.
/* Start searching the database, using AJAX, when the user has typed at least 2 characters */ $('#userinput').keyup(function() { if ($(this).val().length >= 2) { $('#loader').show(); $.post("search.php", {searchterm: $('#userinput').val()}, function(data){ $('#results').html(data); $('#loader').hide(); }); } else { $('#results').html(''); } return false; });
The next part of our JS code deals with the search box. We specify that as soon as the user types in the third character (whatever it be), the $.post method executes, making use of the handler script search.php this time. The fetched search results are then displayed in the <div> area with id results
Takes in just one POST variable called “searchterm” and uses it to query our MySQL database to find what the user might be looking for. It then prints the search results, in HTML form.
<?php /* Connect to the database */ include 'config.php'; $connection = mysql_connect("$DB_HOST","$DB_USER","$DB_PASSWORD"); mysql_select_db("$DB_NAME",$connection); /* Query the database for searching */ $search_query = "SELECT * FROM albums WHERE album_name LIKE '%$_POST[searchterm]%' OR album_artist LIKE '%$_POST[searchterm]%' OR album_year LIKE '%$_POST[searchterm]%'"; $search_result = mysql_query($search_query) OR die(mysql_error()); /* Display the search results */ $counter = 1; print "<table width=\"100%\" cellspacing=\"10px\" cellpadding=0>"; while($newArray = mysql_fetch_array($search_result)) { // Display alternate gray-white search result entries if($counter%2==1) { $class = "gray-box"; } else { $class = "white-box"; } $name = $newArray[album_name]; $artist = $newArray[album_artist]; $year = $newArray[album_year]; $cover = $newArray[album_cover]; print "<tr class=\"$class\">"; print "<td valign=\"top\" width=\"100px\"><img width=100 height=100 src=\"$cover\" style=\"float:left;\"/></td>"; print "<td valign=\"top\"><b>Name:</b> $name<br><b>Artist:</b> $artist<br><b>Year:</b> $year</td>"; print "</tr>"; $counter++; } print "</table>"; ?>
Takes in the four POST variables – album_name, album_artist, album_year and album_cover – and uses them to create a new entry for the submitted album into our MySQL database.
<?php /* Connect to the database */ include 'config.php'; $connection = mysql_connect("$DB_HOST","$DB_USER","$DB_PASSWORD"); mysql_select_db("$DB_NAME",$connection); /* Values received */ // mysql_real_escape_string() prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a. $album_name = mysql_real_escape_string($_POST[album_name]); $album_artist = mysql_real_escape_string($_POST[album_artist]); $album_year = $_POST[album_year]; $album_cover = $_POST[album_cover]; /* Manipulate the database */ $insert_query = "INSERT INTO albums (album_name, album_artist, album_year, album_cover) VALUES ('$album_name', '$album_artist', $album_year, 'images/$album_cover')"; $insert_result = mysql_query($insert_query) OR die(mysql_error()); print "<br>Album created! "; print "<a href=\"javascript:ResetForm();\">Create New</a>"; ?>
Simple PHP scripts that handles where and how the files uploaded, using the Cover field of the new album form, are placed on the server.
<?php $uploaddir = 'images/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "success"; } else { // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE! // Otherwise onSubmit event will not be fired echo "error"; } ?>
Included in all our PHP files and stores the variables containing MySQL database information, like DB name, host name, username and password.
<?php // ** MySQL settings ** // $DB_NAME = "albumdb"; // The name of the database. albumdb is only an example. So, replace it with the name of your database. $DB_USER = "username"; // Your MySQL username. In most cases root works, but it highly not recommended. $DB_PASSWORD = "password"; // ...and password. The default password for root is none. $DB_HOST = "localhost"; // 99% chance you won't need to change this value. ?>
Our custom CSS file. Short and precise.
.yellow-box { background-color: yellow; margin: 10px; padding: 20px; display: none; } .gray-box { background-color: #efefef; } .white-box { background-color: white; }
This is the structure of that database used with this web app, with albums as the only table.
album_id - int(11) [ PRIMARY KEY auto_increment ]
album_name - varchar(100)
album_artist - varchar(100)
album_year - int(4)
album_cover - varchar(100)
Have a look at the final thing (our web app) yourself. The demo is here.
Click here to download the entire web app, excluding the SQL database (you’ll have to create it yourself based on the structure mentioned above).
KDE 4 comes with it’s own set of cool 3D effects built-in, but disabled by default. In order to enjoy these effects, you need to enable them manually through the Desktop section of System Settings. But in some cases, enabling 3D can get painfully difficult, as was in my case.
3D can be enabled through one of two options – XRender and OpenGL. Effects using XRender are quite slow and inferior to what is offered by OpenGL.
Enabling 3D with XRender normally works well on almost all machines, but problems start when you try to enable 3D using OpenGL. The most common error that pops us when trying to do so is:
Failed to activate desktop effects using the given configuration options. Settings will be reverted to their previous values
Here are some simple steps to make sure you can enable OpenGL 3D effects without errors and problems.
To start with, make sure you have:
In most situations, these sections are usually missing from the file xorg.conf (found in /etc/X11):
Section "Files" ModulePath "/usr/lib/xorg/modules/extensions/nvidia" ModulePath "/usr/lib/xorg/modules/extensions" ModulePath "/usr/lib/xorg/modules" EndSection
Section "Screen" Option "AddARGBGLXVisuals" "True" EndSection
Section "Module" Load "glx" Load "dri" Load "extmod" Load "v4l" EndSection
Section "Extensions" Option "Composite" "Enable" EndSection
So, make sure to add the above codes to your xorg.conf file. Then go to System Settings > Desktop > Desktop Effects, and enable them using OpenGL compositing settings.
Extra info about my system:
Operating System – Fedora 11
KDE version – 4.2.4
NVIDIA driver version – 185.xx
Nowhere in the OS world have I seen a project such as Unity-Linux. A core platform, a minimal platform enabling others to create their own respins or “remasters”. Thanks to the mklivecd project, this has been made easier than never before.
Sure you have Slackware, where everything is set to default, but still you have a somewhat customized desktop, ie. Software choices are made for you. Or you have other minimalist distributions such as D**m Small Linux (DSL)where a desktop is provided for you, but your choice of software to install is very limited.
Now the thing that excites me about Unity-Linux is that each respin project or officially “branch” is unto themselves, but still grabs back to the main repositories provided by the core. The place for stability, new software and upstream development. Also, branch developers are invited to contribute to the core project.
Ok, Ubuntu does have some similarity, as many people have created their respins on the Ubuntu repositories and formed their own project from that. But can you find me a distribution with branches (respins) as the main intent?
And although developers are the target audience, who can stop an interested person from creating their own linux and sharing it with firends? I’m excited to see all the different variations (branches) that will come out of Unity.
Tagged: linux, unity-linux
well. after installing opensuse 11 on a laptop today, I ran into some wifi problems.
my first use of
Code:
dmesg | grep iwl
gave me the following
iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
iwl3945: MAC is in deep sleep!
this was solved by booting into windows (yes, the problems is because of windows) and disabling the wireless interface there.
however, this did not solve all the problems.
dmesg | grep iwl
now gave me the following.
iwl3945: Can’t stop Rx DMA
this was solved by removing the kernel module and reloading it with hardware scanning disabled.
rmmod -f iwl3945 modprobe iwl3945 disable_hw_scan=1
and now it works.
hope you can use this.
if this was helpful, please do let me know.

well, I did install openSUSE 11, translation= I deleted PCLinuxOS
that is because I liked the live cd and the test in virtual box so much.
to play my games and do othere things with 3d, I had to install the correct driver for my GeForce4 420 Go. To do this I simply had to choose the legacy driver for older cards on http://en.opensuse.org/Nvidia. I rebooted after that and nothing worked. I got a blank screen and or weird color distortions. But that was not a problem since I knew that I had to add an option into my xorg.conf file.
I’ll just write out how I went about it. First of all, I opened konsole. (yes, I am an admitted konsole junkie). There I opened the xorg.conf file like this. (with my favourite text editor of course)
sudo nano /etc/X11/xorg.conf
*notice the sudo. A new thing in openSUSE 11, at least it’s by default. hehe
There under the Section “Device” I added
Option “UseDisplayDevice” “DFP”
then I hit Ctrl + Alt + Backspace twice to restart X. *Also a new feature, having to press the key combo twice, in 2 seconds.
This fixed the problem. All fine and dandy some might say. But no, at least not for my games that are in 640×420 or 800×600. The problem was that 1/4th or 1/5th of the bottom screen was getting cut off. To fix this I had to do a bit more searching. After a while I found the solution. So to fix the problem I had to add another option under the “Device” section.
Option “ModeValidation” “NoXServerModes”
That’s it. Below is my entire “Device” section, just for reference.
——————————–
Section “Device”
BoardName “GeForce4 420 Go”
BusID “1:0:0″
Driver “nvidia”
Identifier “Device[0]“
VendorName “NVidia”
Option “UseDisplayDevice” “DFP”
Option “ModeValidation” “NoXServerModes”
EndSection

Recently, a vote was made by the Development Team on which direction to take the logo. Thanks to everyone on the Unity Linux Development Team who voted. The results are in!
Three design directions from literally over a hundred have been decided upon. Here they are:
There you have it. These logo design directions have been selected by the team as the direction to take our branding in. Remember, these are art directions that were voted on, not specific designs. Think of them as concepts – starting points. Mix them, remix them. Go all out; have some fun with it. Personally, I’d like to see these pushed!
And it is such that I announce the Unity Linux Logo Contest!
Rules for submission
How to Submit
Please submit fully-developed logo ideas in both the original source (XCF or SVG, whichever is used) and flattened PNG to the Graphics Team Mailing List; (unity-graphic@googlegroups.com). The Team will determine eligibility based on loose predetermined standards and post eligible submissions to our gallery.
Timespan
The Logo Contest will span one month. When this time has ended, eligible submissions will be rated publicly, and the top candidates chosen for creating the logo.
Thank you in advance for all your submissions, we await them with great anticipation!
Forum Updates, SMF, and MyBB
You may have noticed that the support forum has had a bit of a makeover along with the front page here. What we’ve done is move from MyBB to Simple Machines Forum (SMF). The main problem we faced with MyBB was maintaining customizations to the core. This proved difficult and spam attacks were beginning to trickle through. SMF put an end to this and has allowed our developers the chance to play in familiar territory. Some of the differences will be immediately noticeable (like subscriptions and loading screens) but hopefully, the community will find SMF familiar and usable.
Front Page Updates and Joomla
The front page received a face lift today in an attempt to move toward a simpler navigation and appearance. Currently, we use Wordpress as a CMS. However, we’ve begun working with Joomla in the background in an attempt to unify authentication across the forum, bugtracker, and wiki…and while work there is steady, it is not finished yet. What this will mean is that community members will have one username and password to take advantage of the wiki, the forum, and the bugtracker.
So What Does This Give You?
The system we’re working with Joomla is called JFusion. This system will unify authentication across projects and inititives. This means that if you decided to base your distribution on Unity, you could integrate and offer your users the same login they use at the main Unity Linux websites. This will unify across domains, across sub-domains, and across remaster/branches of software. Imagine being able to go to the e17 Unity Linux website and logging in with the same password you’d use in our support forums here. Simplicity! And that’s exactly what we’re going for with Unity Linux…keep it simple, keep it updated, and keep it free!
If you have any questions, comments, or concerns, please let us know in the comments section and thanks for reading!
It’s been active for some time now, but since there was a recent pre-release, it’s become important to announce it. A mailing list was created: ul-docs. It will be used to discuss documentation, internal communication and public relations, including press releases.
Documentation and QA (Quality Assurance) will be very important aspects of the project. One of the hopes is to have documentation leading the development, so that it’s constantly up-to-date. More organization work has to be done for that, but the idea is inspiring.
Another idea is to have a more community-driven news outlet. A magazine is being discussed.
If you love quality documentation, creating tutorials or working with the community, then drop by the Unity Linuxs docs mailing list and say hello!