Oct
13

Ubuntu, KDE and the Yakuake Terminal Application

Ubuntu       Share This    Trackback

Well, after Switching to KDE as my Desktop Window Manager afew months ago, I have decided that I for the first time in along time I am happy with it, There really isn’t much more i could possibily think of that they should’va added or could have done different. And to top it all off it is even Stable with Crashes happening very seldomly. But as with most people who use Linux in general, I find myself always needing a Terminal or 10 open during the course of my day. ( Atleast to me copying files thru terminal is faster then thru a GUI ) or I need to SSH into a Web Server to fix something. Now I have been using the Gnome Terminal for awhile now just because that was what I got used to and new the default keybindings to it already. But just last week I have found my new Terminal of Choice. And its called Yakuake

Yakuake

Now this is a Drop-down Terminal, By Pressing F12 your KDE Konsole magically drops down into View, you can do whatever you need to do and by Pressing F12 the Terminal Slides back up into its hidden home. My favorite part of this is Well, 1 It doesnt Add a Icon to my Taskbar or Dock Bar, and more importantly with just 1 Key Stroke your Terminal is There, no need to hunt and find a icon and hit it. The speed of that one key is the most important thing for me. This is based on the KDE Konsole and just by right clicking on the Konsole once opened you can configure how it looks/works, So how easy is that. It even supports partial Transparancy ( IE Mine is Transparent in that you can see my Desktop Background but its not real transparent that you cant see the window behind it before the background but still its cool none the less )

Installing Yakuake

Installing this Execellent Terminal is a Oneline Feat as always, just open your current Konsole and copy/paste the following line into it. Once installed, you will have to locate and start it which mine appeared in my System Menu i think. Just locate where in your menu it was installed to, Click it and it should give you a dialog that Yakuake has been started and then just press F12 and it will appear for you to use, then press F12 to hide it again.

  sudo apt-get install yakuake

This is one of those applications that now that I’ve used I could never go back to a normal terminal only again!

Sep
27

JSON Datadata and PHP

I have noticed with the Yahoo YUI! Javascript library use JSON Data alot for there Datasources. Now Turning your PHP Array into a JSON Array is very easy namely if you use PHP 5.2+ but even if not there are some easy to get Librarys out there that can convert your array in no time and you don’t need full root access to your server to do it. In this article I will only explain how to do it in the *nix Systems as that is all that I use. But if you look around enough i’m sure you can find some information for windows too.

PHP 5.2


In PHP 5.2 The JSON Library comes bundled with PHP so its very easy and extremely fast. here is a example of how you would use these new functions

 
$arr = array(url => 'url here',
		    name=>'name',	
		  );
 
echo '{"sample":'.json_encode($arr).'}';

PHP Below 5.2 Without Root Access


Below 5.2 without root access, the way to go is thru the PERL librarys here is the link

include_once('JSON.php');
$json = new Services_JSON();
 
$arr = array(url => 'url here',
		    name=>'name',	
		  );
 
echo '{"sample":'.json_encode($arr).'}';

PHP Below 5.2 With Root Access


For those of you that need to keep your current version of PHP but want the speed gained by using the PHP JSON extension can download and install it yourself, granted you have root access to the box your on. The installation is very simple, just follow the directions on the web site and you can have this extension installed and working in 10 minutes.

http://www.aurore.net/projects/php-json/

This way you can use the native PHP JSON functions, so the example code for PHP 5.2.0 or higher will work.

top
Close
E-mail It