Wednesday, June 29, 2011

How to install Evernote in Wine on Ubuntu 11.04 GNU/Linux

Evernote has the "Platinum" rating at http://appdb.winehq.org , which means this windows program runs awesome sauce on GNU/Linux. Wine is an awesome program that lets you run windows programs in GNU/Linux - there's also a commercially supported version called crossover by codeweavers, check it out here.

In this tutorial we'll be installing Evernote 4.4.1.4892 in wine1.3 from winehq.org on Ubuntu 11.04 GNU/Linux. See the install steps below the video.



Here are the steps (Easy Pleasy):

1.) Go to http://evernote.com and download the Evernote for windows version
2.) Install wine1.3 in Ubuntu 11.04 with these commands (thanks to Scott Ritchie for the ppa):
sudo add-apt-repository ppa:ubuntu-wine/ppa
3.) Update your Ubuntu with the new ppa repository data and install wine1.3
sudo apt-get update && sudo apt-get install wine1.3
4.) Right click on the Evernote installer that you downloaded in step 1, then left click "Open with Wine Program Loader".
5.) Follow the on-screen instructions to install the Evernote program.

That's it! Double click the desktop icon for Evernote, login with your Evernote account and away you go!

Leave a constructive comment if you like.

Cheers!
Shannon VanWagner
06/29/11

Tuesday, June 28, 2011

Install GIMP 2.7.x on Ubuntu 11.04 using PPA

GIMP is an awesome Free Open Source Software photo editing program which is arguably comparible Adobe's Photoshop.

GIMP does not come preinstalled by default on Ubuntu 11.04 GNU/Linux anymore but you can easily add GIMP 2.6 by installing it from the Ubuntu Software Center.

Despite the program's greatness, the "text tool to be clumsy and restrictive as compared to Photoshop" according to Tony Bradley on his "Ubuntu Linux, Day 27: Working With GIMP" blog post (see pics below for examples).  But this is something that's getting revamped in the newer "beta/development" version of GIMP (version 2.7.x) and the future 'stable' release GIMP 2.8.x.

But until the new release is available, you can easily install the newer 2.7.x version of GIMP (with the great new features) thanks to the 'matthaeus123' PPA for Ubuntu.

(New text tool in Gimp. (top - Gimp 2.6, bottom Gimp 2.7.x))





Here's how to upgrade GIMP using the 'matthaeus123' PPA for Ubuntu:
Note: This assumes you already have GIMP installed

#Add the 'matthaeus123' PPA for Ubuntu to your software sources (using the Terminal):
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn

#Run this command to update GIMP to the newer version.
sudo apt-get update && sudo apt-get dist-upgrade gimp -y

#While you're at it, you might as well install the gimp-plugin-registry as well
sudo apt-get install gimp-plugin-registry -y


That's it! Enjoy! Feel free to leave a comment about your experience if you like.

Shannon VanWagner
06/28/2011

Wednesday, June 22, 2011

How to Add Music to a Video with OpenShot(FOSS)


This post is a response to Tony Bradley's article entitled: "Ubuntu Linux, Day 20: Editing and Making Movies" where Tony mentions: "I still couldn't find an easy way to mute the sound from the original video clip so the song could play as a solo soundtrack for the video montage."

I've created a quick video to show how to mute the sound for the video and have the music play instead for the entire compilation.

I've also included the written instructions for this task below.

From OpenShot:
1.)Click the plus (+) and add your video
2.) Click to select the video in OpenShot, then right-click, then click Add to Timeline(+), then click Add
3.) The video now shows in the Track 2 position on the lower portion of the OpenShot interface, click the small speaker-volume icon on the clip to disable the sound for that track
4.) Add your audio track and import it, then drag it to Track 1 on the bottom of the OpenShot interface

Enjoy!
Shannon VanWagner

Monday, June 20, 2011

How to search for content in LibreOffice.org (+ OpenOffice.org) Docs using Loook

Today's post is a response to Tony Bradley's post on pcworld.com entitled: "Ubuntu Linux, Day 19: Using 'man' and 'grep'". In his post, Tony describes his woes when trying to use 'grep' to search for content in LibreOffice documents.

First of all, in my experience, grep does a lot better job at finding things in files that are "plain text" rather than looking for stuff in "binary" files. LibreOffice documents, while saved in open and ISO standard formats, are stored in binary as opposed to plain text files.

So, to address Tony's problem, I've been looking around trying to find a way to search for content in ODF files and not having much luck. Surprisingly, there doesn't seem to be this type of functionality built into Ubuntu GNU/Linux by default (at least not that I have ever noticed).

However, there's a posting out there on ooofourm.org that mentions the problem, how additional development is needed for this specific feature to be added, and some suggestions for what to use until the functionality is built into Ubuntu GNU/Linux. The recommended tool that I've had success with is named "Loook", by Daniel Naber at danielnaber.de/loook.

Loook is a lightweight, python-gui-based, FOSS program that enables you to search for content in your LibreOffice (and/or OpenOffice) files, and it works great!

Using Loook in Ubuntu 11.04 takes just a bit of setup. Here's my writeup on how to do it:

1.) Ubuntu GNU/Linux 11.04 has Python 2.7.1+, and so you need the version of Loook for Python 2.x(not 3.1), which is currently 0.6.5.
So download Loook the version of Loook for Python 2.x from:
http://www.danielnaber.de/loook/

2.) Extract the loook.zip file.

3.) Loook needs python-tk to run, which is not installed on Ubuntu 11.04 by default. But don't worry, installing this package is easy. Just enable the 'universe' repositories from the Ubuntu Software Center, then either install "python-tk" from the gui or install it by using the Terminal command:
sudo apt-get install python-tk

4.) To run: Double click the loook.py file that was extracted in step 2 above, then select "Run". You'll be presented with a dialog where you can enter "Search Terms", the "Search path", and the "Viewer" (insert /usr/bin/libreoffice here). Click search and Loook will find the documents containing the text you inserted. You can then double click on any result in the "Matches:" section and that will launch the document for you to peruse.

Power User Tip:
If you want to go a step further, you can create a "launcher" shortcut for the Loook.py program. Simply move the Loook.py file to somewhere where it can stay put (e.g., your Documents or home directory), then right click the Desktop, select "Create Launcher", leave "Type" as Application, enter the name "Loook", then enter the absolute path to the loook.py file (e.g., /home/dude/Documents/loook.py - in my case). With the Launcher, you can also add it to your panel or Unity bar with drag and drop. Note: you may want to set a better looking icon for your launcher before adding it to your panel. This can be done by opening your newly created Loook launcher *.desktop file in gedit (e.g., alt+f2 for Run, then type or paste "gedit ~/Desktop/Loook.desktop", no quotes), then change the name of the icon to use to something like "eog" (it's an icon for the "eye of gnome" program - looks like a search icon). Save the change and you should see the nice eog icon for the launcher.

Example Loook.desktop contents:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=eog
Name[en_US]=Loook
Exec=/home/dude/Documents/loook.py
Name=Loook
Icon=eog


So, while the functionality to search for content in LibreOffice/OpenOffice documents does not appear to be built into Ubuntu by default, it is a very easy thing to do with awesome Free Open Source Software programmers like Daniel Naber and his great project Loook.

Feel free to leave a comment if you have one.

Cheers!

Shannon VanWagner

Saturday, June 18, 2011

Sample Script to Report /home Directory Usage

So, awhile back, I created this simple script to monitor usage of the /home directory on a GNU/Linux server. I've been working on it a bit more lately and I figured it's time to share it. The script is configurable to check for "certain" files in a user's directory (i.e., .iso, .mp3, .etc), has a minimum reporting threshold setting, and outputs to a file.

Keep an eye out for crazy numbers because I'm seeing differences in the way the find and du commands report, depending on their versions. So if you see some weird reporting situation, let me know so I can address the problem.

Using user quotas on server would probably be just as effective but what can I say, I like a challenge.

Note: before you light your torches, I don't claim to be a bash scripting expert (not yet anyways). So if anyone has any "constructive" criticism, please feel free to leave a comment.

The script is GPL (of course), so please feel free to use any part of it (or the whole thing) as you wish.

Here's a link to download the file:
UserUsageReport.tar.gz
sha1sum: eba4b49a75602240659ac45a5f4eef3e14d7f402

Enjoy.

Shannon VanWagner

Saturday, June 11, 2011

Setting to Automatically Extend Your Screen onto External Monitor in Ubuntu Linux w/Nvidia graphics

Setting to Automatically "Extend" Your Screen onto External Monitor in Ubuntu Linux w/Nvidia graphics

Just a quick write up with a fix for those who are having problems saving their "extended" monitor configurations when using their notebooks with and without the docking station.

For a long time I would use the nvidia-settings utility to manually set up my external monitor after docking. This required several clicks of the mouse. Now I've found a way to make a minor edit to my /etc/X11/xorg.conf file that will keep the "extended" setting when docked and revert to the single screen without issue when not.

Here are the 2 steps to to configure Ubuntu GNU/Linux to allow you to a.) automatically "Extend"your display onto the external monitor, set the external monitor as "primary"(configurable), set the external monitor to be to the right of the built-in one(configurable), and autoselect the best resolution for the monitors as necessary. Note: these steps only need to be performed once:

1.) Backup your current xorg.conf, then modify the current xorg.conf (note: gedit is a graphical text editor, starting it with gksu is like starting it as admin, this is required because it lives in system space (not user space))

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.beforenvidiaclonesetting
gksu gedit /etc/X11/xorg.conf

2.) Now, find the section entitled 'Section "Device"' and insert the following lines (Make sure to add the text below between 'Section "Device"' and "EndSection", see example below), save the file, then close gedit.

#Enables the "extended desktop" setting
Option "TwinView" "1"
#Set which screen gets to be primary with TwinViewXineramaInfoOrder
Option "TwinViewXineramaInfoOrder" "DFP-0"
#Set the position of each monitor
Option "TwinViewOrientation" "CRT-0 RightOf DFP-0"
#Autoselect the best resolution for the monitors
Option "MetaModes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"

Here's is an example of what the specific section of the xorg.conf should look like:

Section "Device"
     Identifier "Default Device"
     Driver "nvidia"
     Option "NoLogo" "True"
     Option "TwinView" "1"
     Option "TwinViewXineramaInfoOrder" "DFP-0"
     Option "TwinViewOrientation" "CRT-0 RightOf DFP-0"
     Option "MetaModes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"
EndSection

That's it! Logout and back in with your external monitor attached and it should work as an "exteneded" external monitor (with normal resolution settings and primary being the attached monitor).

Should you need to roll back from the settings, simply run this terminal command, then logout/login:
sudo cp /etc/X11/xorg.conf.beforenvidiaclonesetting /etc/X11/xorg.conf


Friday, June 10, 2011

Setting to Automatically "clone" External Monitor in Ubuntu Linux w/Nvidia graphics

Automatically "clone" External Monitor in Ubuntu Linux w/Nvidia graphics

Just a quick write up with a fix in response to the configuratin problem Tony Bradley(PCWorld.com) describes in his article entitled "Day 7: Lessons from the Unity Trenches"(June 7th, 2011).

Tony was having problems getting his external monitor to show up as a "clone" of the notebook monitor(with correct resolution), having the setting stay after reboot, and being able to shut the lid of the computer without breaking his configuration.

Here are the 2 steps to to configure Ubuntu GNU/Linux to allow you to a.) close the lid of your laptop and not have the action change anything, and b.) automatically "clone" the notebook display to the attached external monitor (note: these steps only need to be performed once):

1.) Set the laptop lid close option to do nothing:
Hit alt+f2 to bring up the Run Dialog box
Type or paste in the command below and click OK or hit enter to set
(Note: should all be on one line):

`gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"`

2.) Backup your current xorg.conf, then modify the current xorg.conf (note: gedit is a graphical text editor, starting it with gksu is like starting it as admin, this is required because it lives in system space (not user space))

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.beforenvidiaclonesetting
gksu gedit /etc/X11/xorg.conf

Now, find the section entitled 'Section "Device"' and insert the following lines (Make sure to add between 'Section "Device"' and "EndSection", see example below), save the file, then close gedit.

Option "TwinView" "1"
Option "TwinViewOrientation" "clone"

Here's is an example of what the specific section of the xorg.conf should look like:
Section "Device"
     Identifier "Default Device"
     Driver "nvidia"
     Option "NoLogo" "True"
     Option "TwinView" "1"
     Option "TwinViewOrientation" "clone"
EndSection

That's it! Logout and back in with your external monitor attached and it should work as a cloned external monitor (with normal resolution setting). Next, close the lid on your computer to make sure it doesn't make anything funky happen.

Should you need to roll back from the settings, simply run this terminal command, then logout/login:
sudo cp /etc/X11/xorg.conf.beforenvidiaclonesetting /etc/X11/xorg.conf


How To Connect Ubuntu Linux to Cisco VPN with openconnect (anyconnect-capable alternative)

For Ubuntu Linux, Cisco provides the anyconnect VPN client. But why not connect with the simplistic, FOSS, and Network-Manager-integrated, "openconnect" and "network-manager-openconnect" packages from the "universe" repository instead? I've used this method with much success for quite some time now.

Special Note - these instructions are for connecting to the VPN using the open source alternative to Cisco AnyConnect client (openconnect). If you are looking for instructions related to using the open source alternative to the Cisco Systems VPN client (vpnc), have a look at my post entitled: How To: Cisco Systems VPN with Ubuntu 11.10 / 10.10 GNU/Linux

You can install these packages easily with using either of the two methods below. Also, you may need to enable the universe FOSS repository first (see the "****" note below for enabling the "universe" repository):

Method A.) From the Ubuntu Software Center (see image below).

Simply click Applications, Ubuntu Software Center, then search for and install "openconnect", "network-manager-openconnect" (see image below).

Update 1/6/15: For newer Ubuntu, e.g., 14.04 add: "network-manager-openconnect-gnome"




Method B.) From the Terminal(hit alt+f2, type or enter "gnome-terminal", hit enter), type or paste in these commands:

sudo apt-get update && sudo apt-get install openconnect && sudo apt-get install network-manager-openconnect

Update: 1/6/15: For newer Ubuntu, e.g., 14.04, use:
sudo apt-get update && sudo apt-get install openconnect && sudo apt-get install network-manager-openconnect && sudo apt-get install network-manager-openconnect-gnome


After you install the required packages, reboot your computer to finalize the settings. When you login again, you should see the "VPN Connections" setting to appear on the Network Manager applet(same place where the other network connections are found). Next, click the Network Manager,  VPN Connections, Configure VPN, Add. (see image below)


Next, select "Cisco AnyConnect Compatible VPN (openconnect)" and click Create. (see image below)



Then enter the gateway IP address or DNS name to connect to (this comes from your IT dept), Enter a name for the connection, check "Connect automatically", (optional depending on your company network) Enter the internal DNS servers and Search Domains for your company network(IT dept for this) on the IPv4 Settings Tab. (see image below)




(optional)For split tunneling (allows you to go out of your regular connection to the Internet as opposed to through the VPN) From the IPv4 tab, click Routes, check "Use this connection only for resources on its network", click OK, click Save, click Close (to close Network Connections) and voila, you're all set.


To connect, establish your regular Internet connection first, then click the Network Manager, mouse over "VPN Connections", click the name of the VPN you created. If all went well, you'll be presented with place to enter your anyconnect username/password and you can connect. Whey you see a small lock in the Network Manager - that means VPN is connected and you should have access to your network.

**** To enable the universe repositories:
Launch the Applications, "Ubuntu Software Center", click Edit, click "Software Sources" (see image below)

Then from the "Software Sources" dialog box: Click System, Software Sources (authenticate), In the software Sources dialog, check "Community-maintained Open Source software", oh and now's a good time to select a faster repository source, set "Download from:" to something like samaritan.ucmerced.edu, or ubuntu.osuosl.org(example only) (or use the tool there to find the fastest server near you). The default source of "Main Server" is typically slower than what's available elsewhere.) Click close, reload the sources (this is the same as sudo apt-get update) and now you'll have the universe repository enabled and available for use. (see image below)




Feel free to leave a comment if you like.

1/6/15: Many Thanks to +Tonya Ohrel in the comments for replying with the additional manager-openconnect-gnome being needed for the newer Ubuntu.

Cheers!
Shannon VanWagner