06 February 2016

629. Google drive with rclone on debian jessie

My free dropbox account has 6Gb storage, whereas my google drive has 15Gb. Dropbox pro is way too expensive, so here's what you can do to get your google drive to work ok-ish with linux.

To set up rclone, do:
cd ~/Downloads
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-v1.27-linux-amd64
sudo cp rclone /usr/bin/
rclone config
No remotes found - make a new one n) New remote q) Quit config n/q> n name> google_drive What type of source is it? Choose a number from below 1) amazon cloud drive 2) b2 3) drive 4) dropbox 5) google cloud storage 6) swift 7) hubic 8) local 9) onedrive 10) s3 11) yandex type> 3 Google Application Client Id - leave blank normally. client_id> Google Application Client Secret - leave blank normally. client_secret> Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine or Y didn't work y) Yes n) No y/n> y If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth Log in and authorize rclone for access Waiting for code... Got code -------------------- [google_drive] client_id = client_secret = token = {"access_token":"y**5","token_type":"Bearer","refresh_token":"1/o**T","expiry":"2016-02-06T18:41:22.167889627+11:00"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y Current remotes: Name Type ==== ==== google_drive drive e) Edit existing remote n) New remote d) Delete remote q) Quit config e/n/d/q> q

Syncing is a bit of an issue as you can't sync based on last changed file. So, my solution is that each device has it's own folder that it syncs up to, and each device syncs down all other folders. For my two devices, nb and be, I have thus set it up like this:

Create new dirs and sync:
mkdir ~/gdrive/nbdrive -p
mkdir ~/gdrive/bedrive

On Nb the crontab looks like this:
*/2 *    * * * rclone sync /home/me/gdrive/nbdrive google_drive:/nbdrive
*/10 *   * * * rclone sync google_drive:/bedrive /home/me/gdrive/bedrive

and on Be it looks like this:
*/10 *    * * * rclone sync google_drive:/nbdrive /home/me/gdrive/nbdrive 
*/2 *   * * * rclone sync /home/me/gdrive/bedrive google_drive:/bedrive 

If I do work on a file on Be I then copy it to bedrive, and edit it. To edit it late on Nb I copy it from bedrive to nbdrive and edit it. Of course I could always sync manually and avoid this, but the above is a solution for people who might not feel comfortable working on the command line or if you want everything automated.

20 January 2016

628. Very briefly: Crystalmaker in debian jessie with wine-staging (1.9)

Update:
 I am seeing consistent crashes with files containing multiple structures (e.g. multi-xyz or multi-cif files). They open fine in a virtualbox instance of crystalmaker.

The terminal shows
fixme:shell:check_flags Unsupported flags: 2414
Before buying crystalmaker, make sure to try it extensively first as there is a free demo version available.

Original post:
This is a brief and somewhat incomplete post.
I recently bought a crystalmaker license, knowing that it had no support under linux. I figured that I'd live with running it in an XP VM. My allergies to all things windows made me very unhappy with that solution, however.

So I tried to install crystalmaker using wine in jessie (1.6.2) and the current (1.50.1) version of Crossover. The installation worked fine for both, but running the software lead to crashes.

I then installed the winehq-staging version (1.9):
sudo apt-get install apt-transport-https
wget https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key

I edited /etc/apt/sources.list
deb https://dl.winehq.org/wine-builds/debian/ jessie main
sudo apt-get update
sudo sudo apt-get install winehq-staging

Same issue.

I then finally actually read the crash message, which mentioned that
wine: Unimplemented function msvcp120.dll.?_Throw_C_error@std@@YAXH@Z called at address 0x7b83a70c (thread 004e), starting debugger...
That lead me to install vcrun2013 using winetricks:
winetricks -q vcrun2013 gdiplus

Crystalmaker now works perfectly (as far as I can see) under wine. Saving graphics as PNG works too. I haven't tried anything else as I'm not familiar with crystalmaker.



[NOTE: by running WINEPREFIX=~/.cxoffice/crystalmaker winetricks vcrun2013 I later got it to work in crossover. I haven't tried wine 1.6.2 again.]

[Note 2: gdiplus is needed to fix messages of the type
fixme:gdiplus:Gdip<...> graphics object has no HDC]

19 January 2016

627. Very briefly: Turn off screen blanking in GNOME/debian jessie

Update:
The only thing that worked for turning off screen-blanking when using youtube or vlc was an ugly little hack:
I installed xdotool and ran crontab -e and added:
*/2 * * * * DISPLAY=:0 XAUTHORITY=/home/andy/.Xauthority xdotool key Ctrl


Original post
In spite of not having any screen saver activate and in spite of setting "Blank Screen" to "Never' under Power options, my screen kept on blanking out after 1-3 minutes of watching TV using mythtv. I tried a lot of things, including using xset, but the only thing that worked in the end was editing my /etc/X11/xorg.conf (I use an nvidia driver) and adding the bits in red:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option "BlankTime" "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "DPMS" "0"
EndSection
Now the screen never blanks when watching TV using mythtv. On the other hand, it still blanks when watching DVDs in VLC...