Mine the Harvest

Linux

Dropbox on Suse 11.1 with KDE

by on May.25, 2009, under College Stuff, Linux

Dropbox is a service which allows you to easily share and synchronize files across several computers and mixed platforms. The client is available for Linux, OS X and Windows. Once installed, anything placed in your Dropbox folder on one machine is synchronized with the other – your most recent version is thus always on all systems using Dropbox and also via your web accessible storage account.

If you like, download it from here as doing so will give you (and me) and additional 250MB of space in addition to the 2GB you already get.

For me, this is a wonderful tool. I can place all my papers for school, research notes from work, to do lists, etc. in one location and have them always available no matter if I am at work, home or out and about on my UMPC. Additionally, if you sign up for the beta you get 2 Gigs of space on your web account for free, should you need more you can buy additional space at reasonable prices. Also, you can use it for version control so in addition to simply sharing files you can revert to previous versions. Definitely a great tool.

What about using it with KDE?

As it is still in development there is not a native KDE client. The existing tools are centered around Gnome. My solution was to install the dropbox tool using the generic Linux binary package and manually copy some files around.

Ordinarily you would then start dropbox from Gnome and create your account, etc. As I was not running Gnome I discovered this post which provides a simple means of launching the account creation dialog. Just download the client tarball (change to x86_64 for 64 bit) , extract it and move the .dropbox-dist to your home directory and then execute ~/.dropbox-dist/dropboxd & to start the daemon which will launch the account creation wizard too. (Don’t download the source code from the site, download the binary using the above link.)

To automatically start the syncronization daemon at login, just symlink it as:

paracelsus@Callandor:~> ln -s ~/.dropbox-dist/dropboxd ~/.kde/Autostart/

Now, anything placed in your /home/Dropbox folder will be synced!

Should you wish, you can also install nautilis and its dependencies and use it that way – but there is really no point. Just put things in your drop box folder and if the daemon is running it will be synced with your web account and other systems. Done. You can check how much space you have left by logging into your web account.

There is a project working on a KDE client so you will get fancy desktop notifications, implement the version control, etc.  – but you certainly don’t need to wait for it to take advantage of this now under KDE.

Cheers,

Pete

Leave a Comment more...

Brilliant Bash Profile Functions

by on May.22, 2009, under Linux

Whilst perusing about, I chanced upon these great bash functions (original author unknown) which you and place in your .bashrc  They are a great example of how simple it can be to define a function in Bash and are actually pretty useful. First some examples of the output:

paracelsus@Callandor:~> weather London
Weather for London, UK 59°F Current: Cloudy Wind: W at 9 mph Humidity: 67%

paracelsus@Callandor:~> translate cat japanese
“cat” in Japanese:              猫

paracelsus@Callandor:~> define haxor
* Leet or Eleet (sometimes rendered l33t, 1337, or 31337), also known
* A variant spelling of hacker in the leet argot

Note that as a defined function auto completion of the initial call works too, which I didn’t know.

The code to implement this is quite simple really and is the same as the site above, only I changed one line to update a reference so the translation function works:

(Displayed in the nifty new wp-codbox plugin I just installed.)

# richs-lxh needs to find rude words in other languages, define new groovy  words that the kids use nowadays, and see if it's sunny ; D

# Weather by placename # weather "Barcelona"
weather ()
{
declare -a WEATHERARRAY
WEATHERARRAY=( `lynx -dump "http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=weather+${1}&btnG=Search" | grep -A 5 -m 1 "Weather for" | grep -v "Add to "`)
echo ${WEATHERARRAY[@]}
}

#Translate Spanish/English  - USAGE: translate lamer spanish  # See dictionary.com for available languages (there are many).
translate ()
{
TRANSLATED=`lynx -dump "http://translate.reference.com/browse/${1}" | grep -i -m 1 -w "${2}:" | sed 's/^[ \t]*//;s/[ \t]*$//'`
if [[ ${#TRANSLATED} != 0 ]] ;then
   echo "\"${1}\" in ${TRANSLATED}"
   else
   echo "Sorry, I can not translate \"${1}\" to ${2}"
fi
}

# Define a groovy word - USAGE: define lamer
define ()
{
lynx -dump "http://www.google.com/search?hl=en&q=define%3A+${1}&btnG=Google+Search" | grep -m 3 -w "*"  | sed 's/;/ -/g' | cut -d- -f1 > /tmp/templookup.txt
         if [[ -s  /tmp/templookup.txt ]] ;then
            until ! read response
               do
               echo "${response}"
               done < /tmp/templookup.txt
            else
               echo "Sorry $USER, I can't find the term \"${1} \""
         fi
rm -f /tmp/templookup.txt
}

These function templates are great and provide examples from which all manner of interesting things could be made. Thanks to whomever originally contributed them!

Cheers,
Pete

5 Comments more...

IEs4Linux Hates Wine 1.1.x?

by on May.21, 2009, under Linux

I have posted before about IEs4Linux and what a good tool it is. It is unfortunate but Internet Explorer is sometimes a necessary evil. I have some sites for classes which uses active X, and some which use Adobe Shockwave (come on guys updates your sites!) and thus every now and then you have to fire up IE on Linux. IEs4Linux makes this pretty simple and installs multiple versions of IE for you. Unfortunately if you are running Wine 1.x it will complain:

“IEs4Linux 2 is developed to be used with recent Wine versions (0.9.x). It seems that you are using an old version. It’s recommended that you update your wine to the latest version (Go to: winehq.com). ”

You can circumvent this by ignoring the message, not using the GUI installer and just directly installing the versions you want:

paracelsus@Callandor:~/ies4linux-2.99.0.1> ./ies4linux –no-gui –install-ie7

If you like you can also modify the functions.sh script in the lib/ directory and alter the Wine version detection, see this post:

http://ubuntuforums.org/archive/index.php/t-886205.html

In my case (Suse 11.1) I have not had much luck with IE7, I have however been able to get IE6 to function moderately well.

Also, if you have trouble with IEs4Linux you might just want to move you .wine directory and delete the .ies4linux directory and try again.

A further option is to just skip IEs4Linux and install IE directly under wine.
This site was helpful in this regards: http://www.gentoo-wiki.info/HOWTO_Install_Internet_Explorer_6_SP1

wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/ie6setup.exe

paracelsus@Callandor:~> wine ie6setup.exe /c:”ie6wzd.exe /d /s:””#E”

paracelsus@Callandor:~> wine ~/.wine/drive_c/iexplor/ie6setup.exe

(Follow the additional steps at the Gentoo link as well.)

If you have trouble installing Shockwave in IE, you can also find a stand alone Shockwave installer, and try that method. Dig around the Adobe site: http://kb2.adobe.com/cps/158/tn_15895.html and you will eventually find the Shockwave insatller.  With this method I was able to get a recent (11.x) Shockwave to work in IE.

4 Comments more...

Strace process signal monitoring

by on May.18, 2009, under Linux

While I am no strace zen master, I did discover that in addition to
system calls, strace will also show any signals a process gets. Nifty eh?

Further, you can attach strace to a running process - you don't have to
start a process with it initially.

This can be super handy to tell if a process is even receiving signals
you are sending to it - thus you can tell if it is being mean and
ignoring them or never getting them in the first place. For example.

In shell one:

root@Anduril:~# vim blah
{ctrl z}
[1]+  Stopped                 vim blah
root@Anduril:~# jobs
[1]+  Stopped                 vim blah
root@Anduril:~# pgrep vim
22264
root@Anduril:~# strace -p 22264

In shell two, now kill the process:

root@Anduril:~# kill -9 22264
root@Anduril:~# pgrep vim

Now return to shell one and you will see strace caught and displayed the
signal received:

Process 22264 attached - interrupt to quit
+++ killed by SIGKILL +++
Process 22264 detached
[1]+  Killed                  vim blah

(As a note, you can also use lsof -p 22264 to view the files vim has
open as well.)

Why can't you kill some processes?

If a process is in an uninterpretable sleep state (listed as D for
example in ps ) it will not receive signals until it is active again.
Kill it all you want, but its out to lunch and wont care.

If a process has a defunct parent process, you might need to kill it -
and not the child. Parent processes are easily identified with pstree:

root@Anduril:~# pstree  -p | grep vim
        |                       |-bash(22180)---bash(22197)---vim(22663)

Good hunting!

Pete
Leave a Comment : more...

Sago Cloud Computing

by on Mar.30, 2009, under Sago Labs

Cloud computing is receiving increasing attention and shows great potential in the correct application. At Sago we are in a perfect situation to deploy clustering and cloud solutions and are currently conducting a feasibility analysis using a few different technologies and we wanted to let you know a bit more about these projects.

Virtualization has done a great deal of good in enterprise and data center environments, consolidating server footprints, increasing power efficiency, reducing hardware investment and maintenance costs and offering low priced virtual private servers to customers who do not require dedicated hardware. Despite the many advantages of virtualization however, it remains true that no virtual machine can exceed the resources of the underlying hardware. This is where dynamic or cloud computing can come into play, provisioning additional resources dynamically to meet changing requirements.

We are currently deploying a cluster of Linux servers using Rocks Clusters. This allows for easily adding nodes to the cluster and managing them. Cluster solutions in the past have been fairly complicated affairs and the stability and manageability was not optimum – and I am happy to say we have been extremely impressed with Rocks. If you have any clustering projects, or would like to learn more about clustering I would encourage you to check out this project. We are also experimenting with Eucalyptus cloud computing, which holds significant potential in flexible computing that can open the door to our offering completely new services to suit our customers needs. In the future, you might be able to run your servers as Virtual Machines in a cloud – responding to higher load demands and increased traffic by smoothly provisioning additional resources, without incurring the long term cost of permanently adding new hardware.

Eucalyptus is going to play a central role in the October release of Ubuntu 9.10 Karmic Koala, the release announcement of which caused a stir of interest in the Ubuntu community. There is a distinct buzz in the IT community about the possibilities of Cloud Computing and how it can help businesses in many ways, integrating with SaaS and SOA platforms, etc. Being able to leverage Cloud Computing in your business, or offer it to your customers could be a distinct advantage in the near future.

We will continue to build out our existing cluster, testing it in a variety of scenarios and deploying Amazon AMIs on our internal Eucalyptus cloud and will tell you more about this in the near future and let you know about what Cloud services we may be offering soon. See you up there!

2 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...