Category Archives: Linux

Grive & Fedora — Working

Grive is an open source command-line-based sync tool to synchronise a directory with your Google Drive. Grive is not in the Fedora repositories, although it is undergoing review for addition into the repositories.

In the meantime, if you want to use it, I’ve written a script that should pick the latest version from the russianfedora website. Bitbucket repository is here.

Direct link to script: here

Once you install the application, create a blank folder (this will be the sync folder), then run
grive -a
to request an authentication URL. Go to that URL, log into Google if you need to, and you’ll get a response string you need to copy back into the console window. If the authentication was successful, Grive will sync your files into the folder. Each subsequent time you run Grive, it will download and/or upload files to/from your Google Drive.

There is only one limitation that I’m aware of. Documents created from within Google Drive won’t sync, but if you convert them to odt or doc files, they will sync.

Cloud Storage

Gah, I really hate corporate firewalls. They block so many sites it’s sometimes impossible to do any work. I have Cloud Storage accounts with various sites, and can’t access:

However, I can access

My main cloud storage is with DropBox because they have a linux-native application for Fedora and Ubuntu. Whilst JustCloud also have a linux application, it’s Ubuntu only, so even though I have an account with JustCloud, I can’t effectively use it yet on my laptop. But, what I do like is that JustCloud tracks your mobile device once you install the app on it. Similar to the Cerberus app. So you can keep tabs on where it is. Although there’s nowhere to hide the app or make it a device administrator, it at least gives you an idea of where to start looking for your device if you can’t find it.

Behind my draconian corporate firewall the only one I can effectively use is Google Drive since they haven’t blocked Google, and I doubt they will since it’s probably the de facto search engine for most of the Internet users (although I prefer a metasearch engine like IXQuick.

Concatenating Videos

I’ve been cracking my head trying to figure out how to concatenate my dashcam videos, which get chopped by my dashcam into 15 minutes chunks. The most obvious one is ffmpeg, where I would use this:

$ ffmpeg -i "concat:`ls -l | egrep -i "apr\ \ 2" | awk 'BEGIN {ORS="|"} { print $9 }'`" -c copy output.AVI

Continue reading

Grive: Open Source Google Drive Client For Linux ~ Web Upd8: Ubuntu / Linux blog

Grive: Open Source Google Drive Client For Linux ~ Web Upd8: Ubuntu / Linux blog.

If you use Google Drive a lot, this might be a useful tool for you. It provides a form of sync for a folder to and from your Drive.

Left & Right Handed Devices

You may recall in my earlier post that I mentioned the GfxTablet project but complained that there was no support for left-handed users, but I just discovered something.

Continue reading

Fedora

Official Ubuntu circle with wordmark. Replace ...

The Fedora Project logo

I’ve spent the most part of today (writing this at 11:40pm) installing and setting up Fedora on my laptop, moving over from Ubuntu. It’s always a pain setting up a new OS, and even more frustrating copying files to the new OS. I had over 35GB to copy and these were just work files. No movies, music, or games.

 

Setting up BOINC was a headache too. Finally got it working, but it keeps coming up with an error at loading. But it works, and that’s the important thing. On the plus side, I’ve Bitbucketted the setup script I’ve used so if I have to rebuild, it won’t take me as long next time.

git Snippet: Proxy Configuration

I do a fair amount of work using git as version control, with SVN and CVS close behind, but I haven’t used any of them so much as a distributed version control.  However, since I’ve started using Bitbucket and GitHub, I have encountered many issues to do with DVC. One of the main ones is communication via proxy.

My workplace doesn’t allow communication through the net without it going through a proxy server and it is an major pain in the arse to get through. Fortunately, git allows you to configure git to use a proxy server:

To use a proxy server for HTTP communication:

git config --global http.proxy http://user:password@proxyserver:9999

To use a proxy server for HTTPS communication:

git config --global https.proxy http://user:password@proxyserver:9999

My company firewall also injects its own SSL certificate, which breaks SSL verification, so to get around that:

git config --global http.sslVerify false

Bash Snippet: basename

I love linux and bash scripting. Whilst I am no expert, I really love the way you can pipe one application’s output into another.

One thing I don’t like to much about linux, however, is the case-sensitivity. “file.ext” is not the same as “file.EXT”, for example. On Windows, it doesn’t much care about the case of the extension, but on linux, it does. And therein is my problem.

My digital camera takes pictures and gives them a .JPG extension, which doesn’t show up on listings on my linux box where the application is looking for .jpg extensions. Sure, I can rename them manually, or macro together a simple bash script, but when you have to do this repeatedly, it gets quite frustrating.

So I did some research, and found out about the basename application. It serves two purposes. It strips out directory information to leave just the file name so that “dir1/dir2/dir3/file” becomes just “file” and optionally, allows you to strip out a suffix from the name, so for example to rename all .JPG files to .jpg in the current folder, I would use this:

for a in *.JPG
 do
   mv $a `basename $a .JPG`.jpg
 done

Here’s an example output

$ ls
file1.JPG file2.JPG file3.JPG

$ for a in *.JPG
> do
> echo mv $a `basename $a .JPG`.jpg
> done
mv file1.JPG file1.jpg
mv file2.JPG file2.jpg
mv file3.JPG file3.jpg

$ for a in *.JPG
> do
> mv $a `basename $a .JPG`.jpg
> done

$ ls
file1.jpg file2.jpg file3.jpg

GfxTablet

GfxTablet (Graphic Tablet) is a project that consists of two parts — one is Linux input driver, and the other is an Android app. It turns your Android device into a graphics tablet and you can control your Linux machine with your tablet. There is no screen output on the android device and stylus/finger motion is transmitted to the Linux box.

The only downside is there’s no option for “lefty” mode for people like me. :(

It will be interesting to see how well I can use this.

rfc2822/GfxTablet · GitHub.