After holding out for a full two years (since 11.04) when Unity was made the default Desktop Environment, what was promised to happen in Unity with relation to the legacy systray has final happened. It's dead. Door nob dead... Well, sort of. As of the latest update to Unity (today, Feb 7th) in 13.04, the system tray (and the dconf value that enabled it) are no more. Unity will as of now only display application indicators, which means greater consistency, but in some cases, less compatibility. For example, Guake, the drop down terminal that so many love, no longer shows a system tray icon in Unity even with the system tray having been enabled before. However, this will eliminate some ...
If you’ve had to work with Bootstrap, or have had to tweak some CSS in some other person’s code (or maybe yours) and have a tough time finding out the exact selector to apply the new CSS to, welcome :) Although you can use your web browser’s in-built development tools, I prefer using Firebug and will be using that in this post. Okay, so for example’s sake I am going to change the color of the navigation bar that Bootstrap offers from black (I am using navbar-inverse) to a purplish gradient and the active element of the navbar to use orange – Ubuntu colours! YAY! Now, open up the page in your web browser and hover your mouse over the ...
If you’re like me, you have a bunch of symbolic links in your webroot (/var/www) and it’s getting tough to keep a track of all the things hosted on your local machine – locations, link names, etc. I am merely documenting(and explaining) how I found a solution to this problem. Code – /var/www/index.php: <?php $dir_open = opendir('.'); while(false !== ($filename = readdir($dir_open))){ if($filename != "." && $filename != ".."){ $link = "<a href='./$filename'> $filename </a><br />"; echo $link; } } closedir($dir_open); ?> Code Explanation: $dir_open = opendir('.'); The opendir() is very much similar to the cd command in Linux/Unix based environments. It puts the mentioned directory into perspective. So in our example, the variable $dir_open is assigned to the perspective ...
The ternary operator is used to write a very short version of an if-else block (in one line) and is used in a number of programming languages. The format of using a ternary operator is (condtion) ? truth statement : false statement Let’s see a simple example in PHP to check if the number stored in the variable is 1 or not, echo ($var == 1) ? 'Number stored is 1' : 'Number stored is not one' ; The same thing in a full if-else block would be as follows: if ($var == 1){ echo "Number stored is 1"; } else{ echo "Number stored is not one"; } We can also use nested ternary operators just as we would use ...
Sometimes we need to write up long strings in PHP and things might get confusing the next time we read through it or someone else takes a look at the code. That’s when heredoc comes to the rescue. The way to use heredoc is as follows $var_name = <<<HEREDOC_NAME /* String assignment values go here */ HEREDOC_NAME; <<<HEREDOC_NAME marks the beginning and the HEREDOC_NAME; marks the end. A heredoc name can be anything you please, but the same heredoc name should be used at both the beginning and the end of the string. A very important note – No characters, whitespace, indentation should be present either before or after the end heredoc statement,meaning that there should be nothing before or ...
Although most of you may know how to do this, it’s just a personal note for myself and for others who might get something out of it. Everyone knows the bash shell can be kickstarted with the bash command. These few switches make life a li’l more easier: 1. $ bash -r # creates a restricted bash shell where the $USER can’t move out of the home directory, even to a sub-directory nits@excalibur:~$ ls -lF | grep -i documents drwxr-xr-x 9 nits nits 4096 Dec 22 19:50 Documents/ nits@excalibur:~$ bash -r nits@excalibur:~$ cd Documents bash: cd: restricted nits@excalibur:~$ cd /mnt bash: cd: restricted nits@excalibur:~$ cd /var bash: cd: restricted 2. $ bash -c #runs a bash shell executing the string ...
Although most of you may know how to do this, it’s just a personal note for myself and for others who might get something out of it. There are a few ways to do this, we will not be depending on environment variables to tell us what shell we are on, since it’s a variable that echoes anything that it’s set to and hence is not always right. 1. $ echo $0 # prints the name of the current program running. So when entered on shell prompt, returns the name of the shell. nits@excalibur:~$ echo $0 bash nits@excalibur:~$ ksh $ echo $0 ksh 2. $ ps -p $$ # uses the PID of the currently running program to get information ...
Yes Ladies and Gentlemen, please welcome Ubuntu Developer Week (Raring)! Ubuntu Developer Week is a series of online workshops where you can: learn about different packaging techniques find out more about different development teams check out the efforts of the world-wide Development Community participate in open Q&A sessions with Ubuntu developers much more... It will be held on 29th January to 31st January, 2013, around 15:00 UTC to 20:00 UTC. Sessions include: "Introduction to Ubuntu Development" and "Getting set up to Ubuntu Development" by Daniel Holbach; "Introduction to patch systems" and "Ubuntu App Review Process explained" by Bhavani Shankar; "Working with upstreams" and "Interacting with Debian's Bug Tracking System" by Stefano Rivera; "Introduction to One Hundred Paper Cuts" by Chris ...
We all know that VNC is hard to beat when it comes to remote access of an Ubuntu Desktop. Well, okay, some of us use SSH but that isn't always an option. Take my Kindle Touch for example. There are currently no third party apps for the Kindle Touch and the only means I have to connect to anything is the built in web browser. Thankfully this browser implements a good chunk of the HTML 5 spec. Therefore, in order to connect to my machine via the Kindle, I would need to employ a browser-based solution - something that utilized the HTML5 canvas and WebSocket APIs. Enter noVNC. Now before I do any further explaining, it's important to realize just ...
Some time this month (and again today) it came to my attention that Getdeb and Playdeb are no more. The maintainer of these awesome repositories (that once were) has announced that he can no longer maintain the, due to issues he is facing (lack of time essentially). However, we have a chance to save Getdeb and Playdeb from total loss. According to the same announcement, all that is needed to recover Getdeb (provided that someone, or a team from the community, can take up the responsibility) is still there. It's not outside the scope of the Ubuntu/Debian community to pull this off, so consider this a call to action! If you have what it takes, including the time, you can ...