Sunday, January 8, 2012

"Installing" an application into the Dash Search of Ubuntu

So Ubuntu makes it seriously easy to install 90% of the programs you could need. Simply click on the Ubuntu Software Center, search for the application and click install. Done!

But what if the application you need is not in the software center? The best solution is to search for an official PPA url for the application and add it to your list of software sources. If there is not a PPA, most developers will build a .deb file for you, which is basically an executable installer. But then you have applications like Zend Studio 9. No PPA, No .deb, Simply a gziped directory structure with all of the files you need, ready to be placed anywhere you want and simply executed.

So how do you "install" Zend Studio... Simply pick a place where you want it to live. No one is really clear on where that should location should be, in fact there are loads of opinions. /opt, /usr/bin, ~/Desktop, etc... I chose /usr/local. If you don't like it there, pick another place.

That part is easy, and really doesn't really beg for a blog post, so let's get to the good part... how do I get Zend Studio to show up in my applications list & the Dash Search of Ubuntu. It is as simple as creating a single file (.desktop) and placing it where it belongs!

To see some examples of .desktop files, browse the /usr/share/applications directory. In my case, I decided to create my .desktop files in the ~/.local/share/applications directory. I just felt it made more sense. If you don't like it, feel free to drop yours in the /usr/share/applications directory.

So, press Ctrl+Alt+T to open a terminal window. and type in the following:

gedit ~/.local/share/applications/zend-studio.desktop

In that file, add the following:

[Desktop Entry]
Name=Zend Studio 9
Exec=/usr/local/ZendStudio/ZendStudio
Icon=/usr/local/ZendStudio/ZendStudio/icon.xpm
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;Application;Development;

That's it! Open the search panel and type in "Zend", there you go!

Setup Mac style "Natural Scrolling" on Ubuntu

This is a super simple tip I got from OMG!Ubuntu! to reverse the scrolling on Ubuntu so that it acts like a Mac.

Press Ctrl+T to open a terminal. Then type the following:

sudo add-apt-repository ppa:zedtux/naturalscrolling
sudo apt-get update
sudo apt-get install naturalscrolling

Once that finishes, Open the program "Natural Scrolling" using the Dash Search and a little icon will appear in the application indicator area. Left click the icon and choose "Natural Scrolling. When it is turned on you will see a check mark next to it. If you want this enabled all the time, simply choose "Start on login" from the preferences menu.



Thank you cemmanouilidis for creating this simple, light, awesome utility!

Saturday, January 7, 2012

Installing Google Chrome on Ubuntu

Google Chrome is by far my favorite browser, Ubuntu is by far my favorite OS. Installing Chrome on Ubuntu is not so hard, visit the Chrome website, download the appropriate .deb package, and install. The problem, there is no auto update support.

The solution, simply install the PPA for Google Chrome and you'll be good to go:


wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install

Installing Ubuntu 11.10 on Lenovo Z570

I've been running Ubuntu as my primary OS for several years now, and have been loving every minute of it! Today, I received a new laptop for work, a Lenovo Z570. You can imagine my excitement, pulling back the plastic and booting things up.

Of course, the first thing I do is setup the laptop as Dual Boot Win7/Ubuntu. Turns out, several of the Lenovo laptop have a crappy implementation of the EFI Boot system. This means that simply popping in a cd and clicking a few buttons does not leave you with a dual booting system. Even worse, re-partition the entire hard drive, and you are left with a system that won't boot.

All of that said, it took me an entire evening and a TON of Google'ing to figure this one out. I thought I would lay this one out for anyone else who is unfortunate enough to be in the same situation.

Step 1: Install Ubuntu. Perform the basic install, resizing the Windows partition accordingly. Once the install is complete, the system will reboot and you will be full of joy to discover that you have no way to boot to Ubuntu. Turns out, the way Lenovo has things setup, grub does not get installed with Ubuntu.

Step 2: Install Grub. Pop the Ubuntu cd back into your drive and reboot to the Ubuntu Live CD. Press Ctrl+Alt+T to open a terminal and type the following:


sudo -i
mount /dev/sda6 /mnt
mount /dev/sda1 /mnt/boot
grub-install --root-directory=/mnt/ /dev/sda


mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit

Restart your laptop and you will find the happy little Grub running, but Ubuntu is still not a boot option!

Step 3: Install Ubuntu in Grub. Reboot your laptop back to the Ubuntu Live CD. Press Ctrl+Alt+T to open a terminal and type the following:

sudo -i
mkdir /media/ubuntu
mkdir /media/winBoot
mount /dev/sda6 /media/ubuntu
mount /dev/sda1 /media/winBoot
cp /media/ubuntu/boot/grub/grub.cfg /media/winBoot/grub/grub.cfg

Restart your laptop and boot into all of the Linux Goodness. There is just one problem, no WiFi!

Step 4: Fix your WiFi. This laptop suffers from MWP (Multiple Wifi Personalities), as well as a glitch in the Bios. Press Ctrl+Alt+T to open a terminal and type the following:

sudo -i
modprobe -r acer-wmi
cd /etc/modprobe.d
gedit /etc/modprobe.d/blacklist.conf

When the editor opens, add "blacklist acer-wmi" as a new line at the end of the file. Save and exit Gedit. Back at the terminal type the following:

rfkill list all

If you see any "Hard blocked: yes" entries, you have one of three things going on. Either your physical wifi switch is in the off position (Look at the front right portion of the keyboard), your software switch is off (Fn+F5), or you need to reset your Bios. For me, it took reseting my Bios to fix it. Restart your laptop and press F2 at boot up. Once in the Bios, press F9 to reset the Bios followed by F10 to save and exit.


Aside from these major but temporary setbacks, I am pretty impressed with the laptop. As I come across new issues, I'll keep everyone informed.

Many thanks to the MANY websites & blogs I had to scour to finally find the appropriate answers for my Ubuntu Woes. Thank you blogs.scienceforums.net for putting me in the right direction on the dual boot issue. Also, @Venkat with askubuntu.com, thanks for bringing back my WiFi... I was seriously going through Internet withdrawals!

Anyway, I hope this information can ease you open source pains!

Wednesday, March 17, 2010

Default Google search with Linux Mint

So I am fairly new to Linux, and am LOVING it. I mean sure, there are lots of things that are different, a few things I don't like as much.. but overall, I am really impressed. I started with Ubuntu as it seems to be the most popular distro out there. Then I found Linux Mint and knew there was something special here.

One of my biggest annoyances at this point is how Linux Mint adds in it's own custom "stuff" to the standard Google search. I don't really mind that they add in advertising to help support their software efforts... I mean, this is really amazing... but honestly their ads are huge, the search results are not standard Google results.

So I did what every good user does... I googled the easiest way to fix the issue of non standard search results. The problem was, I didn't really find anything that really worked.

So what is the solution? Simple, replace most of the google.xml found in your file system with one found in the standard Firefox download. So here you go...

1. Download Firefox from getfirefox.org.
2. Extract the files to an easy to access location, such as your desktop.
3. Search for all google.xml files in your filesystem.
4. Compare the content of each of those files with the one from your recent download, making note of each one that has a similar structure.
5. Copy the google.xml from the download over each of the files you noted from step 4. You may need to run the cp command as root (e.g. sudo cp ~/Desktop/firefox/searchplugins /usr/lib/firefox-3.6/searchplugins).

That's all. Hope this helps you out!