Mine the Harvest

Archive for May, 2009

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...

Moved to a New Condo

by on May.01, 2009, under My Life

Last month Syd and I decided to move to a new condo here in Tampa. It all rather just fell into place and happened quickly. We were growing a bit tired of our previous place and had been there about 3 years. The final straw was a dead rat in the ceiling which created a wonderful aroma for the better part of six weeks and the round shouldered condo association offering the absolute least assistance possible. We could literally hear the rats racing about in the ceiling between our unit and the ones above us. It sounded like cats playing in the unit above – too bad it had been vacant for nearly a year.

We did like the old place, especially in the pre-rat days when we moved in. It was very quiet, which we enjoyed, mostly due to about half the units either being up for sale in the collapsing Florida housing market, or winter residences for snowbirds. We had a nice view of the central court and pool area and had a good amount of space. But it was time for a change.

I had noticed a place each day on my way to work that look interesting, I liked the brick architecture and the proximity to work and central location. So one day I stopped in and found they had a few unit for lease. (They are selling them, but the horrible market played to our favor.) A few days later on the weekend Syd and I both went and looked at a few units, went back the next day and signed a lease and moved about two weeks later.

The move went fairly well really – as good as such can go. Syd was able to get a huge share of the pre-move packing done and by the time moving day came our nephew had come to live with us for a bit, so his contribution was a big help too.

Our new place is quite nice having just been fully remodeled. While they did not use the best possible fixtures, etc. they are still pretty nice and the cabinets are of good quality. One thing however is we went from about 1,100 square feet to 920 or so – and while not a drastic change it is enough to cause us to consolidate in some ways – which is not necessarily bad. (Do I honestly need three copies of the same book, and papers from three years ago?)

We have been getting settled in, but have yet to unpack the last few things. We do like our new place though. Although there are many more units than our last, the environment is quiet and the people are friendly.

Moving is always nice for us too – we enjoy the change of environment and welcome the change of new stores, restaurants and places to explore.

If we by chance accidentally neglected to update you on our new address, please let us know by email me at swiftsnowmane_at_earthlink_dot_net

Leave a Comment 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...