Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
8
votes
2
answers
3169
views
How to use terminal to access iCloud Drive when Finder is not running
I would like to access iCloud drive from Terminal in order to create an emergency backup. Unfortunately, my installation of Mac OS Yosemite is not operational, so I am using recovery mode to create my backup. In this mode, the Finder is not available and iCloud Drive is not running. I am aware that...
I would like to access iCloud drive from Terminal in order to create an emergency backup. Unfortunately, my installation of Mac OS Yosemite is not operational, so I am using recovery mode to create my backup. In this mode, the Finder is not available and iCloud Drive is not running.
I am aware that normally, the iCloud drive directories are located at
~/Library/Mobile\ Documents/com~apple~CloudDocs
. Unfortunately this directory does not appear when using Terminal in recovery mode (there appears to be no *Mobile Documents* in *Library*). This makes sense, because I am not logged in as any of the users (and I believe the recovery utility runs on its own partition).
My questions are thus:
1. Is there any way I can **connect to** and access iCloud drive directories from Terminal in Mac OS **recovery mode** (i.e. after booting up while holding down cmd + r
) **when iCloud Drive sync is not running** (as Finder isn't running)?
2. How can I copy all files in a given folder (including all subfolders) into an iCloud drive directory using a Terminal command?
Should it not be possible to log into iCloud drive using Terminal, Dropbox would be an alternative. I am not sure, however, whether I can install the Dropbox command line tool in recovery mode.
Constantin
(201 rep)
Dec 27, 2014, 01:20 PM
• Last activity: Feb 9, 2023, 12:36 PM
41
votes
2
answers
114919
views
Is it possible to run iCloud Drive on Ubuntu?
I'm active Apple user, I have MacBook at home, but Linux PC on the work. One of most annoying thing for me is sync my personal data between home, work and mobile devices (like documents etc). At the moment my main cloud storage is iCloud (it is integrate to OS X). Today I tried to install iCloud for...
I'm active Apple user, I have MacBook at home, but Linux PC on the work. One of most annoying thing for me is sync my personal data between home, work and mobile devices (like documents etc). At the moment my main cloud storage is iCloud (it is integrate to OS X). Today I tried to install iCloud for Windows via Wine, but it didn't work.
Is there any possible ways to configure Wine or other software? I know about icloud.com, I need automatic sync as Dropbox.
gephaest
(511 rep)
Apr 12, 2016, 10:47 AM
• Last activity: Sep 5, 2021, 06:15 PM
2
votes
0
answers
600
views
msmtp with iCloud account doesn't work
I'm very new to Linux (Raspbian at Raspberry Pi 4 Model B) and I just try to send an e-mail via command line. Right now, this is working with `msmtp` and a `gmx.de` account following [this][1] guide. apt-get update && apt-get upgrade -V apt-get install msmtp msmtp-mta mailutils > **/etc/msmtprc** an...
I'm very new to Linux (Raspbian at Raspberry Pi 4 Model B) and I just try to send an e-mail via command line. Right now, this is working with
msmtp
and a gmx.de
account following this guide.
apt-get update && apt-get upgrade -V
apt-get install msmtp msmtp-mta mailutils
> **/etc/msmtprc** and **~/.msmtprc** contains
# Set default values for all following accounts.
defaults
port 587
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
# Mail account
account my_name@gmx.de
host mail.gmx.net
from my_name@gmx.de
auth on
user my_name@gmx.de
password PASSWORD
account default : my_name@gmx.de
aliases /etc/aliases
> **/etc/aliases** contains
root: my_name@gmx.de
default: my_name@gmx.de
> **/etc/mail.rc** contains
set sendmail="/usr/bin/msmtp -t"
**1. Test**
echo "Content of the e-mail" | mail -s "Subject" my_name@gmx.de
This works pretty well! But if I change this to my iCloud account the authentication fails (password is correct ;)).
# Set default values for all following accounts.
defaults
port 587
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Mail account
account my_name@icloud.com
host smtp.mail.me.com
from my_name@icloud.com
auth on
user my_name@icloud.com
password PASSWORD
account default : my_name@icloud.com
aliases /etc/aliases
**2. Test**
pi@raspberrypi:~ $ echo "Content of the e-mail" | mail -s "Subject" my_name@icloud.com
msmtp: authentication failed (method PLAIN)
msmtp: server message: 535 5.7.8 Error: authentication failed
msmtp: could not send mail (account default from /home/pi/.msmtprc)
mail: Sending data to /usr/bin/msmtp -t failed: Process exited with a non-zero status
mail: cannot send message: Process exited with a non-zero status
Is there anything I can do now? Any help is appreciated!
Pascal
(125 rep)
Apr 14, 2020, 05:11 PM
0
votes
0
answers
740
views
scp file on iCloud Drive/Desktop to remote - OSX
I generally use the scp command to copy files between local and remote locations. I saved my current file on my Desktop but it seems to be stored in `/iCloud \Drive/Desktop/file` . When I try to scp this to remote using the command `scp /iCloud \Drive/Desktop/file ssh myremotelocation` it gives me a...
I generally use the scp command to copy files between local and remote locations. I saved my current file on my Desktop but it seems to be stored in
/iCloud \Drive/Desktop/file
. When I try to scp this to remote using the command scp /iCloud \Drive/Desktop/file ssh myremotelocation
it gives me an error - file not found. Using ~/Desktop/file
gives same error.
**Exact commands I tried**
1. scp /iCloud\ Drive/Desktop/myfile ssh alias@myremotelocation:/path/to/location
2. scp /"iCloud Drive"/Desktop/myfile ssh alias@myremotelocation:/path/to/location
3. scp ~/Desktop/myfile ssh alias@myremotelocation:/path/to/location
**Zsh Errors:**
1,2,3: iCloud Directory/Desktop/myfile : No such file of directory
sheth7
(211 rep)
Feb 7, 2020, 10:43 PM
• Last activity: Feb 9, 2020, 05:04 PM
0
votes
0
answers
260
views
Automated way to periodically move files of a specific file-extension to cloud folder (mounted as local directory)
I am currently working on a large project (Phd thesis) using ```git``` for version control. My source files are processed by ```latex``` which are just plain-text, naturally suited to version control. The images in the project are naturally binary files (pdf/ps/png/tiff) that do not lend well to asc...
I am currently working on a large project (Phd thesis) using
for version control. My source files are processed by
which are just plain-text, naturally suited to version control.
The images in the project are naturally binary files (pdf/ps/png/tiff) that do not lend well to ascii-diff version control, and leads to ever-increasing repository size.
For these types of data, my university provides me a cloud-service (box) that is just mounted as an ordinary folder in a location on my computer.
The question is the following:
>Can perhaps a shell script be written that selectively copies the latest version of all files of only a specific type (eg
) that retains the directory structure of my original project. This script must also work bidirectionally, i.e. pull the file automatically from the cloud folder when cloning the repo to a new computer or pulling latest changes, thereby placing the latest version of the files in the correct relative paths. Version conflict must be handled automatically with a smart strategy - i.e. the file with the latest time-stamp wins. Maybe a crontab process can run?
Does anyone know of a way to manage such binary files for VCS systems across multiple machines? Git annex does not work for me. I do need the (limited) version-controlling provided to me like box/dropbox etc.
Maybe the answer is as simple as hard-linking? But I do not want to manually hard-link each file that gets generated, renamed and deleted. Instead I would like the process to be seamless.
Dr Krishnakumar Gopalakrishnan
(425 rep)
Apr 4, 2018, 06:38 PM
• Last activity: Apr 4, 2018, 06:45 PM
3
votes
3
answers
1591
views
iCloud calendar command line utility
Is there a CLI utility that allows one to sync up with their iCloud calendar (i.e., iPhone calendar on the cloud) to modify calendar events, etc.?
Is there a CLI utility that allows one to sync up with their iCloud calendar (i.e., iPhone calendar on the cloud) to modify calendar events, etc.?
George
(1899 rep)
Oct 29, 2014, 03:17 AM
• Last activity: Aug 26, 2016, 01:52 PM
2
votes
1
answers
520
views
Is it possible to integrate Apple iCloud services (e.g. contacts, calendars) with Fedora 20?
I am a new laptop user after using an iMac desktop for about seven years. Over that time, I had become fairly reliant on Apple's services syncing between my iPhone and my iMac. Now that I'm on Fedora, I'm having to run two separate calendars and contact books, and manually update changes between the...
I am a new laptop user after using an iMac desktop for about seven years. Over that time, I had become fairly reliant on Apple's services syncing between my iPhone and my iMac.
Now that I'm on Fedora, I'm having to run two separate calendars and contact books, and manually update changes between the two.
Is there a way I can integrate Apple's iCloud features (namely contacts and calendar) onto my laptop? It would make day-to-day computing much easier.
J.W.F.
(1418 rep)
Jan 8, 2014, 02:01 AM
• Last activity: Jul 23, 2016, 01:08 PM
2
votes
0
answers
275
views
iCloud stuff stops working while connected to OpenVPN
I have a fairly simple OpenVPN setup on an OpenVZ VPS with Ubuntu 11.10. Client is the Viscosity client on Mac OS X 10.8.2, and after some testing, we can rule out the client as being part of the problem. Everything has been working fine except for Apple's iCloud stuff. Web surfing, email, FTP, NNTP...
I have a fairly simple OpenVPN setup on an OpenVZ VPS with Ubuntu 11.10. Client is the Viscosity client on Mac OS X 10.8.2, and after some testing, we can rule out the client as being part of the problem.
Everything has been working fine except for Apple's iCloud stuff. Web surfing, email, FTP, NNTP, and Skype are all working as expected. It's ONLY the iCloud services that cease to function.
If I connect to the VPN, iCloud stuff stops working. I no longer get anything in Messages, Calendar items don't get updated, and Notifications stop working.
If I disconnect, the iCloud stuff all starts working. Connect again, iCloud stops working.
Here's the server.conf:
status openvpn-status.log
log /var/log/openvpn.log
verb 4
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
server 10.9.8.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push “dhcp-option DNS 10.9.8.1″
keepalive 10 120
duplicate-cn
cipher BF-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
tun-mtu 1500
mssfix 1400
I'm using iptables in a script, and it's also fairly simplistic.
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -A FORWARD -i tun0 -o venet0 -j ACCEPT
iptables -A FORWARD -i venet0 -o tun0 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.9.8.0/24 -j SNAT --to-source
echo 1 > /proc/sys/net/ipv4/ip_forward
I tried forwarding ports as well, with no success.
iptables -A FORWARD -p tcp -d 10.9.8.0/24 --dport 5222:5230 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 5222:5230 -j DNAT --to-destination 10.9.8.6
I am also sometimes behind a double-NAT situation that I have no control over.
Client -> work VPN -> my OpenVPN box -> Internet.
Client -> Airport Express -> ISP (which is doing NAT) -> my OpenVPN box -> Internet.
Those two situations are just the fact of life where I am, and I cannot change them. I do have full control over my client and the OpenVPN server.
I am completely out of ideas. I have posted a similar query at the OpenVPN forums, but it hasn't posted yet and seems to be in their moderation queue still. Tried on freenode irc channels, but nobody is awake, so here I am. I have Googled *extensively* for this, and can find nothing that is related.
Help me get iCloud stuff working again!
(Note: Sort of cross posted. I posted it here because of the Linux crowd that might be able to help with the particulars of iptables)
EDIT:
I hate to admit it, but it might possibly be the client after all. The issue does *NOT* occur with Tunnelblick.
I'm opening a dialogue with the developer on this. They've been very helpful so far, so maybe we'll find out what's going on.
EDIT: I know it's years later, but it was a client issue (Viscosity) and has been addressed by the developer since.
jrn75
(133 rep)
Oct 30, 2012, 05:22 AM
• Last activity: Jul 23, 2016, 01:08 PM
Showing page 1 of 8 total questions