Extend the capacity of PB to 50GB with MEGA.nz
#1
I wanted to exchange some files as easy as I do in all my machines, phones, tablets, etc. However there was nothing available in arm architecture, such as Dropbox, Ubuntu One as far as I see is no longer available, so I had to be creative, and I managed to find that mega had a binary for Raspbian, so from here it was a learning process...

This can also be used to run all the binaries that are made for armhf (raspberry pi an so on) on arm64 machines.


Lets go for the real HOW TO...


1st - it is necessary to download the software from the MEGA website. There is only one option when it comes to arm, so you need to go to https://mega.nz/cmd and download Raspbian 8.0 (Jessie) in 64 bits. The file name should be megacmd-Raspbian_8.0_armhf.deb


2nd - this binary comes for architecture armhf, so we need to activate multi-architecture in Pinebook Ubuntu Xenial so that we have access to all the requested libraries necessary to run. For that you should run:


sudo dpkg --add-architecture armhf

sudo apt update

3rd - we are not there yet, as Mega uses some fancy cryptografic libraries, we need to add a source to the resources list. just run


sudo nano /etc/apt/sources.list


and add this line


deb http://ports.ubuntu.com/ trusty main universe


after press control+x and say yes.


now run


sudo apt update


4th - now we have all resources to make the installation, run the instalation in the same folder were the megacmd is located


sudo gdebi megacmd-Raspbian_8.0_armhf.deb


just follow the instructions and reply yes, it might be the case that it ends in error, just ignore.


5th - now you are ready to run mega-cmd from the terminal. you will be asked your username and login, and after login it is similar to a linux terminal. You can also open another terminal and use the scripts mega-ls, mega-cd, etc, etc... just read tru the help... 


Very important is that you can also sync folders which can be very useful, just read the help on mega-sync command, nothing special to do.


BUGS - so far only bug found, and already reported to Mega.nz is that the get function (to download to your computer) does not work with filenames containing spaces. However using the folder syncing it works without any issues using the same files.


Anything that is not working properly, or you would like some explanation just drop a message or contact me in the Pine 64 irc channel.


Pinebook (or any arm64) - Linux Mega.nz Howto

Special Thanks to Xalius_PB11 on the multiarch...
#2
Nice writeup... thanks for that Pirolocito! 

Another option to consider if you can run it is to self-host your own Nextcloud or Owncloud, which also means don't have to worry about the service shutting their doors or charging stupid prices for data Wink
#3
Have you tried google drive?
#4
Wizzard, you can mount your google drive as an external disk.
You can find me on IRC, Discord and Twitter


#5
(05-21-2017, 12:02 AM)Wizzard Wrote: Have you tried google drive?

Nope, there is no offical release for linux arm, so haven't tried any 3rd party clients.

(05-20-2017, 06:35 PM)pfeerick Wrote: Nice writeup... thanks for that Pirolocito! 

Another option to consider if you can run it is to self-host your own Nextcloud or Owncloud, which also means don't have to worry about the service shutting their doors or charging stupid prices for data Wink

If you have a constantly running server yes, that is even better. Not my case Smile.
#6
You can add just about any some online accounts to your installation by installing gnome control center accounts management: 

Code:
sudo apt-get install gnome-control-center gnome-online-accounts

Then : 

Code:
exec=env XDG_CURRENT_DESKTOP=GNOME gnome-control-center --overview

Under the 'Personal' tab select 'Online Accounts', then just add your account. I don't know if this works for all online accounts but it does work for google drive. 

Here is a pic of some of the accounts you can add. 
   

Edit: you can have google drive mount as an external / network drive with all stuff accessible from there.
You can find me on IRC, Discord and Twitter


#7
It's actually just
Code:
XDG_CURRENT_DESKTOP=GNOME gnome-control-center --overview
to load the control panel (plus you had exex instead of exec Wink ). The exec bit is in reference to the line that needs to be changed in the shortcut file if you want to be able to see more than four icons in the control panel. And if you specifically wanted the online-accounts module, you can do the following instead

Code:
XDG_CURRENT_DESKTOP=GNOME gnome-control-center online-accounts

One line install and configuration for Ubuntu mate:

Code:
wget -q -O - https://raw.githubusercontent.com/pfeerick/pine64-scripts/master/install-mate-gnome-online-accounts.sh | sudo /bin/bash

Online accounts module seems to works well enough [edit: when it works]. I added my google drive, and it was visible under the 'Devices' heading in Caja (file browser). Just remember this is online access (not offline synced)... so you'll lose access to it if you don't have internet access. 

And the webkit browser that is used for to let you log into the different services and allow access seems very temperamental. Had to close and open the login screen three when trying to add my microsoft account as it kept freezing. And I've given up trying to add flickr as I was at first able to enter my username and it would freeze when loading the password prompt screen, and now it's not even getting that far. 

And credit goes to Andrew who did the writeup showing how get it working on MATE.
#8
pfeerick, thanks for the corrections and for trying out other accounts - much appreciated !
You can find me on IRC, Discord and Twitter


#9
(05-21-2017, 10:05 PM)pfeerick Wrote: It's actually just
Code:
XDG_CURRENT_DESKTOP=GNOME gnome-control-center --overview
to load the control panel (plus you had exex instead of exec Wink ). The exec bit is in reference to the line that needs to be changed in the shortcut file if you want to be able to see more than four icons in the control panel. And if you specifically wanted the online-accounts module, you can do the following instead

Code:
XDG_CURRENT_DESKTOP=GNOME gnome-control-center online-accounts

One line install and configuration for Ubuntu mate:

Code:
wget -q -O - https://raw.githubusercontent.com/pfeerick/pine64-scripts/master/install-mate-gnome-online-accounts.sh | sudo /bin/bash

Online accounts module seems to works well enough [edit: when it works]. I added my google drive, and it was visible under the 'Devices' heading in Caja (file browser). Just remember this is online access (not offline synced)... so you'll lose access to it if you don't have internet access. 

And the webkit browser that is used for to let you log into the different services and allow access seems very temperamental. Had to close and open the login screen three when trying to add my microsoft account as it kept freezing. And I've given up trying to add flickr as I was at first able to enter my username and it would freeze when loading the password prompt screen, and now it's not even getting that far. 

And credit goes to Andrew who did the writeup showing how get it working on MATE.

hahaha Nice, I was on i3w and since I have been away from linux from a few year... :Smile Thanks
#10
One thing, as tkaiser duly noted in IRC, hard to say how safe using this utility is (although, I would think it's pretty safe) and then there is this: https://github.com/megous/megatools
You can find me on IRC, Discord and Twitter




Forum Jump:


Users browsing this thread: 1 Guest(s)