<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oleksandr Popov on Medium]]></title>
        <description><![CDATA[Stories by Oleksandr Popov on Medium]]></description>
        <link>https://medium.com/@popovoleksandr?source=rss-a84c632da423------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2AZL4qsawXJrISS5hr6WIw.jpeg</url>
            <title>Stories by Oleksandr Popov on Medium</title>
            <link>https://medium.com/@popovoleksandr?source=rss-a84c632da423------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:57:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@popovoleksandr/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why TeamViewer hangs on Omarchy, and how I fixed it without touching TeamViewer]]></title>
            <link>https://medium.com/@popovoleksandr/why-teamviewer-hangs-on-omarchy-and-how-i-fixed-it-without-touching-teamviewer-e2eee6dde390?source=rss-a84c632da423------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2eee6dde390</guid>
            <category><![CDATA[teamviewer]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[omarchy]]></category>
            <category><![CDATA[hyprland]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Oleksandr Popov]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 14:11:01 GMT</pubDate>
            <atom:updated>2026-10-20T14:11:01.605Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Three bugs between “Connecting to partner…” and a working remote session on Hyprland: a process tree, a missing portal and a 1.25 scale factor. Plus a small open-source launcher that fixes all three.</em></p><p>I use <a href="https://omarchy.org/">Omarchy</a>, an opinionated Arch Linux setup built around the Hyprland compositor, as my daily machine. One evening I needed to reach it remotely with TeamViewer. I installed TeamViewer 15 from the AUR, started it, typed its ID on another computer, pressed <strong>Connect</strong> and got this:</p><blockquote><em>Connecting to partner…</em></blockquote><p>Forever. No error, no timeout, just a spinner that was clearly enjoying itself.</p><p>What followed was a small detective story with three culprits, all in TeamViewer, each hiding behind the previous one. Here’s how I found them, how I worked around them without modifying TeamViewer or Omarchy, and the little project that came out of it: <a href="https://github.com/popovoleksandr/omarchy-teamviewer-launcher"><strong>omarchy-teamviewer-launcher</strong></a>.</p><h3>First, a red herring</h3><p>TeamViewer’s own knowledge base has an article for exactly this symptom. It blames <strong>dbus-broker</strong>, the modern D-Bus implementation that Arch (and Omarchy) use, and suggests switching back to the classic dbus-daemon.</p><p>So I did: I installed dbus-daemon-units and rebooted. Nothing changed. Same spinner, same logs. Lesson one: read the logs before following the knowledge base.</p><h3>How TeamViewer starts a remote session</h3><p>It helps to know the moving parts. On Linux, TeamViewer has two halves:</p><ul><li><strong>teamviewerd</strong>, a root system service that receives the incoming connection.</li><li><strong>TeamViewer_Desktop</strong>, a helper that has to run <em>inside your graphical session</em> to capture the screen and inject mouse and keyboard.</li></ul><p>To start the helper in the right place, the daemon looks for your <strong>session D-Bus</strong> and asks it to launch the helper for you. The daemon’s log (/opt/teamviewer/logfiles/TeamViewer15_Logfile.log, and it&#39;s world-readable) told me exactly where that failed:</p><pre>LaunchDesktopProcess: session bus not found, Errorcode=11</pre><p>Without the bus, the daemon starts the helper itself, from inside its own system service. The helper then can’t tell which login session it belongs to and gives up:</p><pre>SysSessionInfoManager::GetOwnProcessSession: No session found!<br>Own session could not be resolved, unable to startup</pre><p>The client, meanwhile, keeps spinning politely.</p><h3>Bug 1: TeamViewer looks for your desktop by process name</h3><p>My session bus was right there at /run/user/1000/bus. So how was TeamViewer looking for it?</p><p>Running strings on the daemon turned up a telling list of names: plasmashell, gnome-session, kwin_wayland, xfce4-session, dbus-daemon, wayfire, labwc, sway… Clearly it searches for known desktop processes. But which processes does it search, and what does it read from them?</p><p>I wanted to watch it with strace, which wasn&#39;t installed. gdb was, and gdb can do a surprisingly decent strace impression:</p><pre>catch syscall openat<br>commands<br>  silent<br>  printf &quot;OPENAT %s\n&quot;, (char*)$rsi<br>  continue<br>end<br>run</pre><p>Running the helper under that script showed the whole algorithm:</p><ol><li>It reads /proc/&lt;pid&gt;/stat of the <strong>login session&#39;s leader</strong>, the process logind considers the root of your session. On Omarchy that&#39;s sddm-helper, from the SDDM login manager.</li><li>It reads /proc/*/stat of <strong>every process</strong> on the system, to learn who is whose child.</li><li>It reads /proc/&lt;pid&gt;/environ, where it would find DBUS_SESSION_BUS_ADDRESS, <strong>only for a descendant of that leader with a name on the list</strong>.</li></ol><p>It read no environ file except its own. Nothing had matched.</p><p>And here’s why. Omarchy starts Hyprland through <strong>uwsm</strong>, which runs the compositor as a systemd <em>user service</em>. That’s a good design: your desktop, its apps and its D-Bus all run under your user’s systemd manager, neatly supervised. But it means the login session’s own process tree is almost empty:</p><pre>session-1.scope<br>├─ sddm-helper … --start &quot;uwsm start -g -1 -e -D Hyprland hyprland.desktop&quot;<br>├─ sh /usr/lib/uwsm/signal-handler.sh wayland-session-envelope@hyprland.desktop.target<br>└─ systemctl --user start --wait wayland-session-envelope@hyprland.desktop.target</pre><p>sh and systemctl aren&#39;t on TeamViewer&#39;s list, and Hyprland lives in a completely different branch of the tree. That&#39;s also why the dbus-broker advice couldn&#39;t help: after the switch, the bus daemon <em>was</em> called dbus-daemon, but it still lived outside that tree. I also tried starting an extra dbus-daemon with the right environment variables through systemd-run --user. TeamViewer ignored it too: only ancestry counts.</p><h3>The fix: give it something to find</h3><p>If TeamViewer wants a dbus-daemon inside the login session, let&#39;s give it one.</p><p>The trick is finding a hook that runs <em>inside</em> that tree. SDDM starts every Wayland session through /usr/share/sddm/scripts/wayland-session, which re-executes itself as a <strong>login shell</strong> of your user&#39;s shell. So ~/.bash_profile runs as a child of sddm-helper, and the environment at that point already contains the real DBUS_SESSION_BUS_ADDRESS.</p><p>So the fix is an idle placeholder dbus-daemon, started from ~/.bash_profile:</p><pre>if [ &quot;$(cat /proc/$PPID/comm 2&gt;/dev/null)&quot; = sddm-helper ]; then<br>  /usr/bin/dbus-daemon --session --nofork --nopidfile \<br>    --address=&quot;unix:path=$XDG_RUNTIME_DIR/teamviewer-placeholder-bus&quot; &gt;/dev/null 2&gt;&amp;1 &amp;<br>fi</pre><p>A few details matter:</p><ul><li><strong>It listens on its own socket</strong>, which nobody ever uses. TeamViewer only reads its <em>environment</em>, finds the address of the real bus there, and from then on talks to the real bus.</li><li><strong>The </strong><strong>sddm-helper check</strong> keeps it out of terminals, SSH and TTY logins.</li><li><strong>No </strong><strong>setsid.</strong> It would detach the process from the tree, which defeats the whole point.</li><li><strong>uwsm’s signal handler only waits for its own child</strong>, so the extra process doesn’t hold up logout. When the session ends, logind cleans it up.</li></ul><p>I logged out, logged back in and connected. TeamViewer asked for the password. Progress!</p><p>Then it stopped at a new message:</p><blockquote><em>Waiting for partner to confirm the request…</em></blockquote><h3>Bug 2: a portal Hyprland doesn’t have</h3><p>Now the helper was starting properly, and its own log (~/.local/share/teamviewer15/logfiles/TeamViewer15_Logfile.log) had the next clue:</p><pre>DesktopMainLin: FreedesktopPortal SPI created<br>RemoteDesktopPortal error: calling method CreateSession on interface<br>  org.freedesktop.portal.RemoteDesktop failed: No such interface</pre><p>On Wayland, apps don’t get to grab the screen on their own. They ask the compositor’s <strong>xdg-desktop-portal</strong> backend, and TeamViewer asks for the <strong>RemoteDesktop</strong> portal, which bundles screen capture and input. Hyprland’s portal backend, xdg-desktop-portal-hyprland 1.4.1, implements Screenshot, ScreenCast, GlobalShortcuts and InputCapture. No RemoteDesktop.</p><p>So TeamViewer was waiting for a permission dialog that could never appear. That’s the “partner to confirm” message on the other end.</p><p>Back to strings, this time on TeamViewer_Desktop. It contains a second, portal-free backend, WLRootsSPI, built on the Wayland protocols wlroots-style compositors share:</p><ul><li>zwlr_screencopy_manager_v1 to capture the screen;</li><li>virtual pointer and virtual keyboard protocols for input.</li></ul><p>Hyprland supports all of them. And right next to the string wlroots sat XDG_CURRENT_DESKTOP and XDG_SESSION_DESKTOP.</p><p>One experiment confirmed the hunch: start the helper with XDG_CURRENT_DESKTOP=Hyprland:wlroots and the log says</p><pre>DesktopMainLin: WLRoots SPI created</pre><h3>The fix: change one variable for one program</h3><p>I didn’t want to set that variable for the whole desktop, where other apps might react to it. Luckily, the daemon launches the helper through <strong>D-Bus activation</strong>, and D-Bus looks in your home folder before the system folders. A one-file override in ~/.local/share/dbus-1/services/ points the helper&#39;s service at a small wrapper, which adds wlroots to the variable and starts the real TeamViewer_Desktop. Nothing else on the system sees the change.</p><p>Connect again. The session opens… and the screen stays black.</p><h3>Bug 3: frames of the wrong size</h3><p>The helper log was now full of this:</p><pre>WLRScreenCopyFrame: Unsupported shared memory buffer<br>  (format: 0, size: 3840x2160, expected size: 3072x1728), grabbing failed</pre><p>My monitor is 4K, and I run it at <strong>scale 1.25</strong>, so apps see a desktop of 3840 / 1.25 × 2160 / 1.25 = <strong>3072 × 1728</strong>. The screen-capture protocol, as it should, delivers frames in real pixels (3840 × 2160). TeamViewer compares them with the <em>scaled</em> size and throws every single frame away.</p><p>To prove it, I switched the monitor to scale 1 during a live session:</p><pre>Desktop: Grabbed screen is ok.<br>Desktop grab succeeded.</pre><p>The picture appeared on the other computer, and the mouse and keyboard worked too.</p><h3>The fix: change the resolution, not just the scale</h3><p>Scale 1 on a 4K screen makes everything tiny, and I didn’t want to live like that. But TeamViewer only needs the scale to be 1 <em>during a session</em>.</p><p>So the wrapper does this when a connection arrives. For every scaled monitor, it switches to scale 1 <strong>at the resolution that keeps the same layout</strong>:</p><ul><li><strong>3840×2160 at 1.25</strong> would be 3072×1728;</li><li><strong>at 1.5</strong>, 2560×1440;</li><li><strong>at 2</strong>, 1920×1080.</li></ul><p>Everything keeps roughly its usual size, both on the screen and for the person connecting. When the session ends, the wrapper restores the exact original mode, scale and position.</p><p>Not every monitor offers every resolution, so it picks the mode in this order:</p><ol><li><strong>A mode the monitor lists</strong> at exactly that size.</li><li><strong>Otherwise, a custom mode.</strong> My NVIDIA card and HDMI monitor won’t take one: Hyprland’s test commit fails with Invalid argument.</li><li><strong>Otherwise, the closest listed mode with the same aspect ratio</strong>, so the picture is never stretched. On my machine, scale 1.25 therefore becomes 2560×1440 during a session, and scale 2 gets an exact 1920×1080.</li></ol><p>The wrapper changes monitors the same way Omarchy’s own scaling command does, through hyprctl eval on Hyprland&#39;s Lua config. On older hyprland.conf setups it falls back to hyprctl keyword monitor.</p><h3>The result: omarchy-teamviewer-launcher</h3><p>I packaged all of this so it’s one command on any Omarchy machine:</p><pre>git clone https://github.com/popovoleksandr/omarchy-teamviewer-launcher.git<br>cd omarchy-teamviewer-launcher<br>./install.sh</pre><p>Then log out and back in once, and check with ./status.sh. It verifies every piece and summarises the last connection from TeamViewer&#39;s logs.</p><p>Everything is per user. No sudo, and not a single file of TeamViewer or Omarchy is modified, so updates of either can&#39;t undo it. It installs:</p><ul><li><strong>The wrapper</strong> that D-Bus starts instead of TeamViewer_Desktop.</li><li><strong>The placeholder </strong><strong>dbus-daemon script</strong>, plus a clearly marked block in your login profile to start it.</li><li><strong>The D-Bus service override</strong> that points at the wrapper.</li></ul><p>./uninstall.sh removes all of it, and the MIT-licensed code is small enough to read in one sitting.</p><h3>Things to know before you rely on it</h3><ul><li><strong>There is no local “allow” prompt.</strong> With this backend, the TeamViewer ID and password alone give full control, just like TeamViewer on X11. Use strong passwords, or only the random one-time password.</li><li><strong>TeamViewer can’t block local input or blank the screen</strong> on this backend.</li><li><strong>The resolution switches as soon as a connection arrives</strong>, even before the password is checked.</li><li><strong>Don’t reload Hyprland’s config during a session.</strong> A hyprctl reload, or saving monitors.lua, puts your normal scale back and freezes the picture on the other end.</li><li><strong>It’s tested on one machine</strong>: a 4K HDMI monitor on an NVIDIA RTX 5070, at scales 1.25, 1.6 and 2. Laptop screens, multiple monitors and rotated monitors haven’t been tried yet, and I’d love reports.</li></ul><h3>Reporting it upstream</h3><p>All three problems are TeamViewer bugs rather than Omarchy or Hyprland ones:</p><ol><li><strong>Finding the session bus by process name</strong> breaks every desktop started the uwsm way. /run/user/&lt;uid&gt;/bus has been the standard location for years, and the daemon already reads the systemd user manager&#39;s environment elsewhere.</li><li><strong>No fallback to the wlroots backend</strong> when the RemoteDesktop portal is missing, even though that backend works fine on Hyprland.</li><li><strong>Rejecting correctly sized frames on scaled monitors</strong> is simply a bug, and it would hit sway and every other wlroots compositor with scaling too.</li></ol><p>The repository includes a write-up of all three with log excerpts, ready to send to TeamViewer. Until they’re fixed, the launcher keeps my remote sessions working.</p><h3>What I took away from this</h3><ul><li><strong>Logs first, knowledge base second.</strong> The real error was sitting in a world-readable file from the very first minute.</li><li><strong>strings is an underrated debugger.</strong> It revealed both the list of process names and the hidden wlroots backend.</li><li><strong>gdb is a fine strace</strong> when strace isn’t installed.</li><li><strong>Each fix revealed the next bug.</strong> Don’t give up at the first “it still doesn’t work”: check whether it fails <em>differently</em>.</li></ul><p>The code, the full write-up and the TeamViewer bug report are at <a href="https://github.com/popovoleksandr/omarchy-teamviewer-launcher"><strong>github.com/popovoleksandr/omarchy-teamviewer-launcher</strong></a>. If you run it on a different setup, let me know how it goes.</p><p><em>This project is not affiliated with TeamViewer or Omarchy. TeamViewer is a trademark of TeamViewer Germany GmbH.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2eee6dde390" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iCloud Drive on Linux, the way it works on a Mac]]></title>
            <link>https://medium.com/@popovoleksandr/icloud-drive-on-linux-the-way-it-works-on-a-mac-2403464042b5?source=rss-a84c632da423------2</link>
            <guid isPermaLink="false">https://medium.com/p/2403464042b5</guid>
            <category><![CDATA[icloud]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Oleksandr Popov]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 18:01:01 GMT</pubDate>
            <atom:updated>2026-10-18T18:01:01.732Z</atom:updated>
            <content:encoded><![CDATA[<p><em>icloud4linux signs in like iCloud.com, puts your whole iCloud Drive in a folder, and downloads files only when you open them. It’s free and open source.</em></p><p>Apple makes iCloud for Windows. It doesn’t make iCloud for Linux, and I wouldn’t hold my breath. So if your documents live in iCloud Drive and your laptop runs Linux, you’re left with iCloud.com in a browser tab, downloading and re-uploading files by hand. It works, the way washing dishes in a bucket works.</p><p>I’d already built <a href="https://github.com/popovoleksandr/onedrive4linux">onedrive4linux</a> to get Windows-style OneDrive on my Omarchy laptop, and part of my life is in iCloud Drive too. So I built its sibling, <strong>icloud4linux</strong>. It’s free, and the source is on <a href="https://github.com/popovoleksandr/icloud4linux">GitHub</a> under the GPL-3.0 license.</p><h3>What you get</h3><ul><li><strong>Files on demand.</strong> Your whole iCloud Drive appears in a local folder right away. Files download when you open them, and files that live only in iCloud take no space.</li><li><strong>Signing in like iCloud.com</strong>, with your Apple Account, your password and the two-factor code from your iPhone, iPad or Mac. Your password is never sent or stored; more on that below.</li><li><strong>A tray icon</strong> with sync status, recent activity, iCloud storage use, pause/resume and settings.</li><li><strong>Finder’s menu in your file manager:</strong> <em>Download Now</em>, <em>Keep Downloaded</em> and <em>Remove Download</em>, with a status emblem on every file, and iCloud Drive in the Files sidebar.</li><li><strong>Two-way sync.</strong> What you change here is uploaded after you close the file. What changes on your other devices appears live. Conflicts keep both copies.</li><li><strong>App folders</strong>, like Pages, Numbers, Keynote and Shortcuts, show up the way they do in Finder.</li><li><strong>iCloud previews.</strong> GNOME Files, Nemo and Caja show thumbnails of photos and videos that aren’t downloaded, without downloading them.</li><li><strong>A command line</strong> for scripts and for desktops without a tray.</li></ul><h3>Signing in without handing over your password</h3><p>This was the part I cared about most. A tool that asks for your Apple password had better treat it well.</p><p>icloud4linux signs in the same way iCloud.com does, with <strong>SRP (Secure Remote Password)</strong>. SRP is a handshake in which your computer and Apple’s server each prove they know the password, without the password itself ever crossing the network. Apple’s variant uses the 2048-bit group from RFC 5054 with SHA-256, and your password is first stretched with PBKDF2. What travels over the wire is maths that’s useless to anyone listening.</p><p>There’s one subtle trap I had to handle. Clients disagree about how to pad certain numbers in the handshake, and in rare cases (when a value happens to start with a zero byte) the two approaches produce different answers. A wrong proof counts towards Apple <strong>locking your account</strong>. So icloud4linux detects these ambiguous handshakes and quietly starts a fresh one instead of guessing.</p><p>After the password comes two-factor authentication:</p><ol><li>Apple sends a six-digit code to your trusted devices, and you type it in. If none arrives, you can ask for a text message instead.</li><li>From then on, the computer is trusted the way a browser at iCloud.com is, so signing in again later doesn’t ask for a code while Apple keeps that trust.</li></ol><p>What’s stored is only the resulting session (cookies and tokens), in a file readable only by you. Apple ends web sessions after a while, typically weeks. The tray then asks you to sign in again, and meanwhile your downloaded files keep working and changes queue up.</p><p>Two account settings matter:</p><ul><li><strong>Advanced Data Protection:</strong> turn on <em>Access iCloud Data on the Web</em> on your iPhone, the same switch iCloud.com needs. Your devices then ask you to approve the sign-in.</li><li><strong>Hardware security keys:</strong> accounts that require them can’t sign in yet.</li></ul><h3>Installing it</h3><pre>git clone https://github.com/popovoleksandr/icloud4linux.git<br>cd icloud4linux<br>./install.sh</pre><p>The installer finds the missing system packages (FUSE 3, Python modules, Qt, your file manager’s extension support). It <strong>shows you the </strong><strong>sudo command</strong> before running it, and it asks before installing anything from PyPI into a private virtual environment. Then the setup window opens:</p><ol><li>Sign in.</li><li>Enter the code.</li><li>Pick a folder (~/iCloudDrive by default).</li></ol><p>It runs on any distribution with Python 3.9+, FUSE 3 and Qt 6. The install and the automated tests pass in clean containers of <strong>Debian 12 and 13, Ubuntu 22.04 and 24.04, Fedora 44 and openSUSE Tumbleweed</strong>, and it runs on my Omarchy laptop with a real account. On Omarchy, it also pins its icon in the bar and never touches Omarchy’s own files.</p><h3>Everyday use</h3><p><strong>The tray icon:</strong></p><ul><li><strong>Left-click</strong> opens a status window.</li><li><strong>Middle-click</strong> opens the folder.</li><li><strong>Right-click</strong> opens the menu.</li><li><strong>The icon itself</strong> shows whether you’re up to date, syncing, paused, offline, have a problem, or are signed out.</li></ul><p><strong>The file manager</strong> works like Finder:</p><ul><li><strong>Download Now</strong> fetches a file without pinning it.</li><li><strong>Keep Downloaded</strong> keeps it (or a whole folder) on this computer. New files added to such a folder download too.</li><li><strong>Remove Download</strong> turns it back into a cloud-only file.</li></ul><p>Files you open stay downloaded until the space for opened files (10 GB by default) runs out; then the least recently used ones are removed. The emblems follow Apple’s look: a cloud with an arrow for iCloud-only files, a green check for downloaded ones, arrows while syncing.</p><p>And from a terminal:</p><pre>icloud4linux status             # state, account, storage, transfers, problems<br>icloud4linux ls ~/iCloudDrive   # files with their status<br>icloud4linux keep PATH...       # keep downloaded<br>icloud4linux download PATH...   # download now, without keeping<br>icloud4linux evict PATH...      # remove the download<br>icloud4linux online             # open iCloud Drive at iCloud.com</pre><h3>How it works under the hood</h3><pre>file manager / any app ──► ~/iCloudDrive (FUSE) ──► icloud4linux daemon ──► iCloud web services<br>                                                      │  SQLite index of iCloud Drive<br>tray, command line ─────── Unix socket ──────────────►│  content cache</pre><p>A daemon mounts a <strong>FUSE filesystem</strong> at your iCloud Drive folder and talks to the same web services iCloud.com uses. Folder listings come from a local SQLite index, so browsing is instant. Opening a file streams it into a local cache, and reads return data as soon as it arrives.</p><p>Two iCloud quirks shaped the design.</p><p><strong>There is no change feed.</strong> OneDrive can tell you “here’s what changed since last time”. iCloud’s web service can’t, so icloud4linux has to look:</p><ul><li><strong>Every 30 minutes</strong>, it walks the whole drive.</li><li><strong>Every minute</strong>, it checks the top folder plus every folder whose signature (etag, file count, size) changed.</li><li><strong>Whenever a program opens a folder</strong>, it refreshes it on the spot, so what you’re looking at is always current.</li></ul><p>For scale: listing a real drive with <strong>110,000 items</strong> works.</p><p><strong>You can’t replace a file’s content.</strong> iCloud’s web service has no “update this file”. So when you save an edited file:</p><ul><li><strong>The old version</strong> moves to <em>Recently Deleted</em>, recoverable at iCloud.com for 30 days, and the new one is uploaded.</li><li><strong>An etag check</strong> first makes sure the version being replaced is the one you actually edited. If someone changed it on another device in the meantime, both copies are kept.</li></ul><p>A few more details you’ll only notice when they’re missing:</p><ul><li><strong>Remote changes go through the mount</strong>, so file managers refresh on their own through normal inotify events.</li><li><strong>Thumbnailers, file indexers and ClamAV never trigger downloads.</strong> Thumbnailers get iCloud’s own preview instead.</li><li><strong>Deleting moves files to <em>Recently Deleted</em>.</strong></li><li><strong>Case and Unicode don’t matter in names.</strong> iCloud Drive ignores both, so Report.txt and report.txt can&#39;t coexist, just like on a Mac.</li><li><strong>.DS_Store, editor swap files and half-finished downloads</strong> stay on your computer and are never uploaded.</li></ul><h3>Where it stands today</h3><p>Here’s the honest status:</p><ul><li><strong>Tested against a real Apple account:</strong> signing in, two-factor codes, trust and listing a large drive.</li><li><strong>Tested only against a simulated iCloud so far:</strong> downloads, uploads and edits.</li></ul><p>That simulation is thorough. It runs a real SRP server that checks password proofs, sends two-factor codes by device and SMS, and imitates folder listings with decomposed Unicode names and propagating etags, multipart uploads, <em>Recently Deleted</em>, app folders and session expiry. The end-to-end tests run the real daemon and FUSE mount against it.</p><p>Still, a simulation is not Apple. <strong>Expect rough edges with real files</strong>, and keep another copy of anything precious while it matures. icloud4linux also relies on the same private web services as iCloud.com, which Apple can change at any time.</p><h3>What it doesn’t do (yet)</h3><ul><li><strong>Only your own iCloud Drive.</strong> Shared folders, files shared with you, iCloud Photos and other iCloud services don’t sync.</li><li><strong>Old macOS packages</strong> (bundles such as old-style .pages documents) show as read-only files.</li><li><strong>touch changes the modification time on this computer only</strong>, because iCloud takes a new time only together with new content.</li><li><strong>Thunar and Dolphin previews</strong> of cloud-only files download them, since their thumbnail services aren’t recognised yet.</li><li><strong>No Flatpak or Snap packages</strong> yet, and no immutable distributions such as Fedora Silverblue.</li></ul><h3>Try it</h3><p>Everything is at <a href="https://github.com/popovoleksandr/icloud4linux"><strong>github.com/popovoleksandr/icloud4linux</strong></a>. Bug reports are very welcome, especially from real-world use with real files; that’s exactly where it needs mileage. Please include the log (journalctl --user -u icloud4linux). And please double-check your password at account.apple.com before retrying a failed sign-in several times, because Apple counts wrong passwords towards locking the account.</p><p>If your files live in OneDrive instead, meet <a href="https://github.com/popovoleksandr/onedrive4linux">onedrive4linux</a>.</p><p><em>icloud4linux is not affiliated with or endorsed by Apple. iCloud and iCloud Drive are trademarks of Apple Inc.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2403464042b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OneDrive on Linux, the way it works on Windows]]></title>
            <link>https://medium.com/@popovoleksandr/onedrive-on-linux-the-way-it-works-on-windows-acdcf2e89df1?source=rss-a84c632da423------2</link>
            <guid isPermaLink="false">https://medium.com/p/acdcf2e89df1</guid>
            <category><![CDATA[onedrive]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Oleksandr Popov]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 15:16:01 GMT</pubDate>
            <atom:updated>2026-10-12T15:16:01.551Z</atom:updated>
            <content:encoded><![CDATA[<p><em>onedrive4linux puts your whole OneDrive in a folder, downloads files only when you open them, and adds a tray icon and a right-click menu to your file manager. It’s free and open source.</em></p><p>If you use OneDrive on Windows, you probably never think about it. Your whole drive sits in a folder. A file downloads the moment you open it, the rest stay in the cloud and take no space, and a small cloud in the tray tells you everything is fine.</p><p>Move to Linux and that folder is gone. Microsoft has never shipped a OneDrive client for Linux, so you choose between:</p><ul><li>a sync tool that keeps a <strong>full copy</strong> of everything on your disk,</li><li><strong>mounting</strong> the drive from a terminal, without any of the desktop comforts,</li><li>or a <strong>paid, closed-source</strong> app.</li></ul><p>My files live in OneDrive and my laptop runs Linux (<a href="https://omarchy.org/">Omarchy</a>, to be precise), so I wanted the Windows experience there. That’s what <strong>onedrive4linux</strong> is. It’s free, and the source is on <a href="https://github.com/popovoleksandr/onedrive4linux">GitHub</a> under the GPL-3.0 license.</p><h3>What you get</h3><ul><li><strong>Files On-Demand.</strong> Your whole OneDrive shows up in a local folder right away. Files download when you open them, and online-only files take no space. Even du agrees: it shows only what is really on disk.</li><li><strong>A tray icon</strong> with sync status, recent activity, storage use, pause/resume and settings.</li><li><strong>A setup wizard.</strong> Sign in with a Microsoft account (personal, work or school), pick where the folder lives, done.</li><li><strong>“Always keep on this device” and “Free up space”</strong> in your file manager’s right-click menu, with a status emblem on every file and folder.</li><li><strong>Two-way sync.</strong> What you change locally is uploaded after you close the file. What changes elsewhere appears live. Conflicts keep both copies, so nothing is silently overwritten.</li><li><strong>Cloud thumbnails.</strong> Your file manager shows previews of online-only photos and videos without downloading them.</li><li><strong>A command line</strong> for everything the tray can do, and a bit more.</li></ul><h3>Installing it</h3><pre>git clone https://github.com/popovoleksandr/onedrive4linux.git<br>cd onedrive4linux<br>./install.sh</pre><p>The installer is careful about your system:</p><ol><li>It finds the missing system packages (FUSE 3, Python modules, Qt and your file manager’s extension support). It <strong>shows the </strong><strong>sudo command</strong> it wants to run and asks first.</li><li>Anything your distribution doesn’t package comes from PyPI into a private virtual environment in your home folder, again after asking. On Ubuntu 24.04 and Debian 12 that’s PySide6; on Fedora it’s pyfuse3.</li><li>It installs onedrive4linux into your home folder, sets it to start at login and launches it. The setup window opens: sign in, pick a folder (~/OneDrive by default), and you&#39;re done.</li></ol><p>It runs on any distribution with Python 3.9+, FUSE 3 and Qt 6. I’ve tested the full install and test suite in clean containers of <strong>Debian 12 and 13, Ubuntu 22.04 and 24.04, Fedora 44 and openSUSE Tumbleweed</strong>, and I use it every day on Omarchy with a real account.</p><p>On <strong>Omarchy</strong>, everything comes from the official Arch repositories. The installer also pins the icon in the bar, so it doesn’t hide in the tray drawer, and restarts the bar once if needed. It never writes to /usr/share/omarchy or /etc, so Omarchy updates leave it alone.</p><p>./uninstall.sh removes the app, and ./uninstall.sh --purge also removes your sign-in, settings and downloaded copies.</p><h3>Everyday use</h3><p><strong>The tray icon:</strong></p><ul><li><strong>Left-click</strong> opens a status window, like the Windows flyout.</li><li><strong>Middle-click</strong> opens the OneDrive folder.</li><li><strong>Right-click</strong> opens the menu.</li><li><strong>The icon itself</strong> shows the state: synced, syncing, paused, offline, a problem, or signed out. It’s a monochrome “symbolic” icon, so Omarchy, KDE and GNOME draw it in your theme’s colours.</li></ul><p><strong>The emblems</strong> tell you where each file is:</p><ul><li><strong>Blue cloud:</strong> online only; downloads when you open it.</li><li><strong>Green check (outline):</strong> on this device, but may be freed up automatically.</li><li><strong>Green check (solid):</strong> always kept on this device.</li><li><strong>Blue arrows:</strong> uploading or downloading.</li><li><strong>Red “!”:</strong> can’t sync, and the status window says why.</li></ul><p>Files you open stay on the device until the space for opened files runs out. That’s 10 GB by default, and then the least recently used files are freed. Anything you mark <strong>Always keep on this device</strong> downloads straight away and doesn’t count against that limit. New files added to such a folder download too, which makes it perfect for the handful of folders you want offline on a plane.</p><p>Emblems and the menu work in GNOME Files (Nautilus), Nemo and Caja. Dolphin gets the menu but not the emblems, because Dolphin can’t show emblems from a script. Everywhere else, your files still work normally, and there’s the command line:</p><pre>onedrive4linux status            # state, account, storage, transfers, problems<br>onedrive4linux ls ~/OneDrive     # files with their status<br>onedrive4linux pin PATH...       # always keep on this device<br>onedrive4linux free PATH...      # free up space (make online-only)<br>onedrive4linux share PATH        # create a view link and copy it to the clipboard<br>onedrive4linux online [PATH]     # open it on the web<br>onedrive4linux pause | resume | sync</pre><p>If you like wiring things together yourself, pin, unpin and free also work through extended attributes from any tool:</p><pre>setfattr -n user.onedrive.action -v pin report.pdf<br>getfattr -n user.onedrive.status report.pdf</pre><h3>How it works under the hood</h3><pre>file manager / any app ──► ~/OneDrive (FUSE) ──► onedrive4linux daemon ──► Microsoft Graph<br>                                                  │  SQLite index of the drive<br>tray, command line ─────── Unix socket ──────────►│  content cache</pre><p>The heart of it is a small daemon that mounts a <strong>FUSE filesystem</strong> at your OneDrive folder.</p><ul><li><strong>Listings are instant</strong> because they come from a local SQLite index. The Microsoft Graph <em>delta</em> API keeps that index up to date, returning only what changed since the last check.</li><li><strong>Opening an online-only file</strong> streams it into a local cache, and reads return data as soon as it arrives. A large video starts playing while the rest is still downloading.</li><li><strong>Writes go to the cache first.</strong> The file is uploaded shortly after the last program closes it: in one request up to 4 MB, and as a resumable upload session above that.</li><li><strong>Safe saves keep your history.</strong> Many editors save by writing a temporary file and renaming it over the original. onedrive4linux recognises that and updates the same OneDrive item, so version history and sharing links survive.</li><li><strong>Remote changes go through the mount itself.</strong> So the kernel emits ordinary inotify events, and your file manager refreshes on its own.</li><li><strong>Thumbnailers, indexers and virus scanners never trigger downloads.</strong> Otherwise opening a folder of photos would download all of them. Thumbnailers get OneDrive’s cloud-rendered preview instead.</li><li><strong>Deleting sends files to the OneDrive recycle bin</strong>, where you can recover them online for 30 days.</li></ul><p>A few things are deliberately never uploaded: editor swap files, Office lock files, half-finished browser downloads, Thumbs.db and friends. Names OneDrive rejects (containing characters like : or ?) stay local and show up in the status window until you rename them.</p><h3>A word about signing in</h3><p>Signing in to Microsoft requires an <em>app registration</em>. By default, onedrive4linux uses the public registration of the open-source <a href="https://github.com/abraunegg/onedrive">OneDrive Client for Linux</a> project, so sign-in works out of the box. Microsoft’s consent screen therefore shows that app’s name.</p><p>Some organisations block apps their admin hasn’t approved. For those work or school accounts, or if you simply prefer your own, the README walks you through creating a registration in the Microsoft Entra admin center; it’s free and takes a few minutes. Then:</p><pre>onedrive4linux config client_id &lt;your-client-id&gt;</pre><p>Sign-in tokens are stored in your home folder, readable only by you.</p><h3>What it doesn’t do (yet)</h3><p>I’d rather you know before you install:</p><ul><li><strong>Only your own drive syncs.</strong> “Shared with me” items, shared folders you added to My files, and SharePoint libraries don’t.</li><li><strong>OneNote notebooks are hidden</strong>, because they aren’t files.</li><li><strong>Symlinks and special files can’t be stored</strong> in OneDrive.</li><li><strong>Case-insensitive names.</strong> OneDrive ignores case, so Report.txt and report.txt can&#39;t coexist in one folder.</li><li><strong>No Flatpak or Snap packages</strong> yet, and no immutable distributions like Fedora Silverblue (use a toolbox there).</li></ul><h3>How it’s tested</h3><p>A sync client you can’t trust is worse than none, so most of the work went into tests:</p><ul><li><strong>End-to-end tests</strong> run the real daemon on a real FUSE mount against a fake Microsoft Graph server. They cover on-demand reads, uploads, renames, deletes, live remote changes, conflicts, pinning, atomic saves, offline recovery and restarts.</li><li><strong>A container script</strong> installs it as a brand-new user would on each supported distribution and runs everything.</li><li><strong>Every window</strong> is built and rendered offscreen, and the file manager extension is loaded against each distribution’s own Nautilus, Nemo and Caja bindings.</li></ul><h3>Try it</h3><p>The code, the full README and the issue tracker are at <a href="https://github.com/popovoleksandr/onedrive4linux"><strong>github.com/popovoleksandr/onedrive4linux</strong></a>. If something breaks on your distribution or desktop, please open an issue with the log (journalctl --user -u onedrive4linux). That&#39;s the fastest way to make it work for the next person too.</p><p>And if your files live in iCloud rather than OneDrive, I’ve built the same thing for Apple’s cloud: <a href="https://github.com/popovoleksandr/icloud4linux">icloud4linux</a>.</p><p><em>onedrive4linux is not affiliated with or endorsed by Microsoft. OneDrive is a trademark of Microsoft Corporation.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acdcf2e89df1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IPFS: from zero to distributed website hero]]></title>
            <link>https://medium.com/@popovoleksandr/ipfs-from-zero-to-distributed-website-hero-77b6d094fbff?source=rss-a84c632da423------2</link>
            <guid isPermaLink="false">https://medium.com/p/77b6d094fbff</guid>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[decentralized]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[Oleksandr Popov]]></dc:creator>
            <pubDate>Fri, 05 Jun 2020 11:04:47 GMT</pubDate>
            <atom:updated>2020-06-05T11:05:12.252Z</atom:updated>
            <content:encoded><![CDATA[<p><em>IPFS comes from InterPlanetary File System. Does that mean this article will lead you to host your website on Mars or Pluton? Let’s find out!</em></p><p>Русская версия статьи доступна <a href="https://medium.com/@anantaramdas">тут</a>.</p><h3>Who am I?</h3><p>My name is <a href="https://popov.in/">Aleksandr Popov</a> and I’m working for <a href="http://unstoppabledomains.com/">Unstoppable Domains</a>, US based startup aiming to build decentralised Internet. My major role here is Frontend development, but also I take part in researches. The key part in making decentralised sites it to decentralizely host them — and here where IPFS comes to play. Let’s get little familiar with IPFS and how to host website using it!</p><h3>What IPFS really is?</h3><p>As Wiki defines, The InterPlanetary File System (IPFS) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system.</p><p>It is very similar to what Torrent does however in addition to receive content it allows to host it. And everything is in distributed manner.</p><p>But what about interplanetary staff? Very simple — the idea behind this is to make possible make internet connectivity even if you very far far away. It is done by allowing you to retrieve files from someone nearby instead of getting them from somewhere thousands or event millions kilometres away, for example on other planet. However that is idealistic goal for this project. For now it has two additional (apart of speeding up getting files from far away data center) advantages:</p><ul><li>It makes internet more resilient — i.e. even if main node is down your users can get your webpages from somewhere else.</li><li>It makes more harder to censor content — there is no central place which someone (government, corporation or people) can influence on and block your content.</li></ul><h3>Installing IPFS</h3><p>To install IPFS on your computer first you need to download release package for your operation system and platform. Follow official distribution <a href="https://dist.ipfs.io/#go-ipfs">page</a> to find appropriate package for you. After downloading and locating your installation package follow OS specific sections below:</p><h4>MacOS or Linux</h4><p>Unzip your package:</p><pre>$ tar xvfz go-ipfs_*.tar.gz</pre><p>Run installation (basically it will move binaries somewhere in your executable <strong>$PATH</strong>)</p><pre>$ cd go-ipfs</pre><pre>$ ./install.sh</pre><h4><strong>Windows</strong></h4><p>Unzip downloaded package and manually move ipfs.exe somewhere in your <strong>%PATH%</strong> (or place in some specific directory and update <strong>%PATH%</strong> variable)</p><p>After installation you could run following command to check if everything went as expected:</p><pre>$ ipfs -—version</pre><pre>ipfs version 0.5.1</pre><p>So now we ready move towards to host your website on IPFS.</p><h3>Basics</h3><p>Let’s start from basic usage with some explanation for what and why we doing that.</p><p>As IPFS stores all settings and done in locally is repository (similar to Git) first we need to initialise it using following command:</p><pre>$ ipfs init</pre><pre>initializing IPFS node at /home/[username]/.ipfs</pre><pre>generating 2048-bit RSA keypair…done</pre><pre>peer identity: <strong>QmQddxyRmLoShfP2HeJwzcoGoh2tD7crwUeRevFBg6Lt48</strong></pre><pre>to get started, enter:</pre><pre>ipfs cat /ipfs/<strong>QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc</strong>/readme</pre><p>You can use above proposed command to see what already pinned in IPFS (i.e. readme file):</p><pre>$ ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme</pre><pre>Hello and Welcome to IPFS!</pre><pre>...</pre><pre>If you&#39;re seeing this, you have successfully installed</pre><pre>IPFS and are now interfacing with the ipfs merkledag!</pre><pre>...</pre><pre>Check out some of the other files in this directory:</pre><pre>./about</pre><pre>./help</pre><pre>./quick-start     &lt;-- usage examples</pre><pre>./readme          &lt;-- this file</pre><pre>./security-notes</pre><p>Please note what <strong>bolded</strong> hashes could be different in your case. First one represents your peer identity in IPFS network. Second — current pinned version on <strong>readme</strong>, <strong>about</strong>, <strong>help</strong>, <strong>quick-start</strong> and <strong>security-notes</strong> files. All those files you could access using similar to above command.</p><h4><strong>Let’s take you online</strong></h4><p>In order to take our node online and connect to IPFS network we need to run IPFS daemon using following command:</p><pre>$ ipfs daemon</pre><pre>Initializing daemon…</pre><pre>go-ipfs version: 0.5.1</pre><pre>Repo version: 9</pre><pre>System version: amd64/linux</pre><pre>Golang version: go1.13.10</pre><pre>Swarm listening on /ip4/127.0.0.1/tcp/4001</pre><pre>Swarm listening on /ip4/192.168.1.190/tcp/4001</pre><pre>Swarm listening on /ip6/::1/tcp/4001</pre><pre>Swarm listening on /p2p-circuit</pre><pre>Swarm announcing /ip4/115.187.39.125/tcp/4001</pre><pre>Swarm announcing /ip4/127.0.0.1/tcp/4001</pre><pre>Swarm announcing /ip4/192.168.1.190/tcp/4001</pre><pre>Swarm announcing /ip6/::1/tcp/4001</pre><pre>API server listening on /ip4/127.0.0.1/tcp/5001</pre><pre>WebUI: <a href="http://127.0.0.1:5001/webui">http://127.0.0.1:5001/webui</a></pre><pre>Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080</pre><pre>Daemon is ready</pre><p>In another terminal using below command you could check to which peers you connected to:</p><pre>$ ipfs swarm peers</pre><pre><strong>/ip4/104.131.131.82/tcp/4001</strong>/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ</pre><pre>...</pre><p>where highlighted with bold part is a transport address of single peer. Also note node’s hash of public key (peer identity).</p><p>You also may noticed following line while starting daemon:</p><pre>...<br>WebUI: <a href="http://127.0.0.1:5001/webui">http://127.0.0.1:5001/webui</a><br>...</pre><p>That is web interface address of your node to work with your node:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-dsoIdxLekdAOfPShVATyA.png" /><figcaption>WebUI for IPFS node running on localhost</figcaption></figure><p>Please note that 5001 port does not exposed externally due to security reasons. Nevertheless there is at same same good and secure approach how to connect to your node remotely (or your VM). For that you can use SSH tunnel to have your local 5001 port forwarded to your node using following command:</p><pre>ssh -L 5001:localhost:5001 [username]@[server-address]</pre><p>You can use WebUI o manage files on your IPFS node, see various usage statistics and configure your node in more friendly way.</p><h3><strong>Decentralised web site</strong></h3><p>Let move to making your first decentralised web site. First we will need a site (I will not explain in much details but in short you will need site made on HTML/JS/CSS only). For example use <a href="https://gateway.pinata.cloud/ipfs/QmRWcQAd1EEPXs8dPTq67LCubSoXW9fkb1WJqmBijJvSg9/site-example.tar.gz">template</a> I prepared for you (which, by the way, hosted on IPFS).</p><p>I will assume you downloaded package above and unpacked it to <strong>ipfssite</strong> directory:</p><pre>$ ls ipfssite/</pre><pre>css images index.html js</pre><p>In order to publish it you need to have daemon started on your node. After that you can deploy it by running:</p><pre>$ ipfs add -r ipfssite</pre><pre>added QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi ipfssite/css/bootstrap.min.css</pre><pre>added QmToWAMXJFSi2s22JqfmajL4WPJZJdnzJtzSV1TaUdkFLp ipfssite/css/styles.css</pre><pre>added QmSyc5sQa4smKUvNaZtr6y44et5gVgzsf4RaWD7tu1PgCk ipfssite/images/ipfs-logo.svg</pre><pre>added QmamZxnEKaAwdLEoCtC7w4jwaVuR7ztb1cLayDQGM9DVci ipfssite/index.html</pre><pre>added QmZqVNydZxRrioxHwMxCa5CQs7yRLPqnKUexuyrTkJhBwa ipfssite/js/bootstrap.min.js</pre><pre>added QmWirprJ5C4m1rVmEKS1Wf3WBviqpoFgp64QvWACsa7wC8 ipfssite/js/jquery-3.3.1.slim.min.js</pre><pre>added QmPNoejVoMRayPqLzsKzYNLh8p5yGKyA5PBFJ3sw2xLDM3 ipfssite/js/popper.min.js</pre><pre>added QmbkVCDQ95ypMH8VWHACsCyZPxerwRrpfXZ5y3TDBGS3Rd ipfssite/css</pre><pre>added QmWJP6sa19yUjco7YXCVyqXoeX2L4378yzcTJWYxZWoMK3 ipfssite/images</pre><pre>added QmcZSAjXfTdciMAS9zjLjWcmRRcF3QTnBTqM66zzKCQAT1 ipfssite/js</pre><pre>added Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV ipfssite</pre><pre>301.28 KiB / 301.28 KiB [=============================================] 100.00%</pre><p>The last hash (for directory itself) is the one you have to remember. After that you can access to site by following url (put hash you received above):</p><p><a href="http://localhost:8080/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV">http://localhost:8080/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</a></p><p>or even one of below:</p><p><a href="https://ipfs.io/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV">https://ipfs.io/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0d7_xSJY8-BtOvz9tCgwg.png" /><figcaption>Your first decentralised website is online</figcaption></figure><p>Please be patient requesting last url — it may take some time to open it for first time.</p><p>Let’s not stop here and make it even more friendly. After all it is quite hard to send such hash through SMS or remember by heart 😉</p><p>For that you will need your domain name. Go to administration of your domain name and create attentional DNS record with type TXT to connect it to your website. In my case I would need to create following record (again, do not forget to update to your’s hash which you got on previous steps):</p><pre>dnslink=/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</pre><p>You can check that by if domain name updated by executing:</p><pre>dig +noall +answer TXT [your-domain-name]</pre><pre>[your-domain-name]. 60 IN TXT “dnslink=/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV”</pre><p>After some time DNS record will updated though DNS servers in world you will be able to access your site using:</p><p><a href="http://localhost:8080/ipns/[your-domain-name]">http://localhost:8080/ipns/[your-domain-name]</a></p><p><a href="http://gateway.ipfs.io/ipns/[your-domain-name]">http://gateway.ipfs.io/ipns/[your-domain-name]</a></p><h3><strong>Conclusion and what next?</strong></h3><p>Congratulations! You are now decentralised website ninja! So what next? On next article I will share what’s behind decentralize Internet and how create your site with real decentralised domain name. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77b6d094fbff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IPFS: от нуля до героя распределенных сайтов]]></title>
            <link>https://medium.com/@popovoleksandr/ipfs-ot-nulya-do-geroya-raspredelennyh-saytov-44538b198b74?source=rss-a84c632da423------2</link>
            <guid isPermaLink="false">https://medium.com/p/44538b198b74</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[decentralized]]></category>
            <category><![CDATA[ipfs]]></category>
            <dc:creator><![CDATA[Oleksandr Popov]]></dc:creator>
            <pubDate>Fri, 05 Jun 2020 11:02:04 GMT</pubDate>
            <atom:updated>2020-06-05T11:04:09.062Z</atom:updated>
            <content:encoded><![CDATA[<p><em>IPFS расшифровывается как InterPlanetary File System (Межпланетная Файловая система). Означает ли это что после прочтения этой статьи Вы начнёте хостить Ваши сайты на Марсе или Плутоне? Давайте разберемся!</em></p><p>English version is available <a href="https://medium.com/@anantaramdas">here</a>.</p><h3>Кто я такой?</h3><p>Меня зовут <a href="https://popov.in/">Александр Попов</a> и я работаю на <a href="http://unstoppabledomains.com/">Unstoppable Domains</a>, Американский стартап целью которого создать децентрализованный Интернет. Моя основная роль в компании Frontend разработка, но я также принимаю участие в вопросах исследований. Ключевым вопросом создания децентрализованных сайтов является хостинг — и как раз тут на сцене появляется IPFS. Давайте познакомимся с IPFS и разберемся как разместить вебсайт с помощью него!</p><h3>Так что же такое IPFS на самом деле?</h3><p>Как определяет Wiki, Межпланетная Файловая Система (IPFS) является протоколом и peer-to-peer сетью для хранения и обмена данными в распределённой файловой системе.</p><p>Это очень близко к тому что делает Torrent, только к функции получения контента протокол позволяет его также размещать. И всё это распределённым образом.</p><p>Но при чем тут межпланетность спросите Вы? Очень просто — в основе лежит идея сделать возможным Интернет подключение даже если Вы находитесь очень и очень далеко. Это осуществляется путем предоставления возможности получить контент от того кто находится ближе вместо того что бы отправлять запрос кудато за тысячи или даже миллионы километров, например на другой планете. Однако это идеалистическая цель. Сейчас этот проект имеет ещё два дополнительных (кроме увеличения скорости доступа к контенту находящегося в удаленном дата центре) преимущества:</p><ul><li>Он делает Интернет более отказоустойчивым— например даже если основная нода по той или иной причине вышла из строя пользователи всё равно могут получить доступ к сайту из другой ноды.</li><li>Он делает более сложным подвергать цензуре содержание —нет центрального места на которое кто либо (государства, корпорация или люди) могли бы повлиять и заблокировать ваш контент.</li></ul><h3>Устанавливаем IPFS</h3><p>Для того что бы установить IPFS на Вашем компьютере Вам сперва необходимо скачать соответсвующий Вашей програмной и аппаратной части установочный пакет. Перейдите на официальную <a href="https://dist.ipfs.io/#go-ipfs">страницу</a> и выберите нужный пакет. После того как Вы скачаете его, требуется провести процесс установки который немного разный в зависимости от того какую операционную систему Вы используете:</p><h4>MacOS или Linux</h4><p>Разархивируйте скачаный пакет:</p><pre>$ tar xvfz go-ipfs_*.tar.gz</pre><p>Запустите установщик (по большому счёту он делает не более чем перемещает выполняемые файлы в директорию на которую указывает переменная <strong>$PATH</strong>)</p><pre>$ cd go-ipfs</pre><pre>$ ./install.sh</pre><h4>Windows</h4><p>Разархивируйте сказанный пакет и вручную переместите <strong>ipfs.exe</strong> куда-то куда указывает переменная <strong>%PATH%</strong> (или положите в удобную для Вас директорию и обновите переменную <strong>%PATH%</strong>)</p><p>После установки что бы проверить всё ли прошло успешно выполните сдледующую команду:</p><pre>$ ipfs -—version</pre><pre>ipfs version 0.5.1</pre><p>Что ж теперь мы готовы приступить к тому что бы разместить наш сайт на IPFS.</p><h3>Основы</h3><p>Давайте начнем с основных команда также объясним зачем мы их используем.</p><p>Т.к. IPFS хранит все настройки и данные локально в репозитории (можно провести паралель с системой Git) для начала нам необходимо инициализировать его используя следующую команду:</p><pre>$ ipfs init</pre><pre>initializing IPFS node at /home/[username]/.ipfs</pre><pre>generating 2048-bit RSA keypair…done</pre><pre>peer identity: <strong>QmQddxyRmLoShfP2HeJwzcoGoh2tD7crwUeRevFBg6Lt48</strong></pre><pre>to get started, enter:</pre><pre>ipfs cat /ipfs/<strong>QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc</strong>/readme</pre><p>Вы можете использовать выше предоставленную команду что бы прямо в терминале посмотреть что-то что прицеплено в IPFS (например файл readme):</p><pre>$ ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme</pre><pre>Hello and Welcome to IPFS!</pre><pre>...</pre><pre>If you&#39;re seeing this, you have successfully installed</pre><pre>IPFS and are now interfacing with the ipfs merkledag!</pre><pre>...</pre><pre>Check out some of the other files in this directory:</pre><pre>./about</pre><pre>./help</pre><pre>./quick-start     &lt;-- usage examples</pre><pre>./readme          &lt;-- this file</pre><pre>./security-notes</pre><p>Также пожалуйста обратите внимание на выделенные <strong>жирным</strong> хэши — они могут быть другими в Вашем случае. Первый является идентификатором Вашей ноды в сети IPFS. Второй — текущий пин <strong>readme</strong>, <strong>about</strong>, <strong>help</strong>, <strong>quick-start</strong> и <strong>security-notes</strong> файлов. Вы можете посмотреть все эти фийлы воспользовавшись командой выше.</p><h4>Выходим в свет</h4><p>Для того что бы опубликовать вашу ноду онлайн и подключить её к IPFS сети нам нужно запустить демон или процесс (процессы в Unix называют daemon) IPFS воспользовавшись следующей командой:</p><pre>$ ipfs daemon</pre><pre>Initializing daemon...</pre><pre>go-ipfs version: 0.5.1</pre><pre>Repo version: 9</pre><pre>System version: amd64/linux</pre><pre>Golang version: go1.13.10</pre><pre>Swarm listening on /ip4/127.0.0.1/tcp/4001</pre><pre>Swarm listening on /ip4/192.168.1.190/tcp/4001</pre><pre>Swarm listening on /ip6/::1/tcp/4001</pre><pre>Swarm listening on /p2p-circuit</pre><pre>Swarm announcing /ip4/115.187.39.125/tcp/4001</pre><pre>Swarm announcing /ip4/127.0.0.1/tcp/4001</pre><pre>Swarm announcing /ip4/192.168.1.190/tcp/4001</pre><pre>Swarm announcing /ip6/::1/tcp/4001</pre><pre>API server listening on /ip4/127.0.0.1/tcp/5001</pre><pre>WebUI: <a href="http://127.0.0.1:5001/webui">http://127.0.0.1:5001/webui</a></pre><pre>Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080</pre><pre>Daemon is ready</pre><p>В другом терминале Вы можете проверить к каким участникам Вы подключились:</p><pre>$ ipfs swarm peers</pre><pre><strong>/ip4/104.131.131.82/tcp/4001</strong>/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ</pre><pre>...</pre><p>выше жирным подчеркнут транспортный адрес одного участиника. Также Вы можете отметить идентификатор учасника представленный хэшом публичного ключа.</p><p>Вы также могли обратить внимание на следующую строчку во время старта процесса:</p><pre>...<br>WebUI: <a href="http://127.0.0.1:5001/webui">http://127.0.0.1:5001/webui</a><br>...</pre><p>Это адрес веб интерфейса нашей ноды через который мы может удобно работать с ней:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-dsoIdxLekdAOfPShVATyA.png" /><figcaption>Веб интерфейст IPFS ноды запущенный на локальном компьютере</figcaption></figure><p>Обратите внимание что в целях безопасности 5001 порт не открыт в “мир”. Тем не менее существует хороший и одновременно безопасный способ подключится к вебинтерфейсу удаленной ноды (или запущенной на витруальной машине). Для этого можно воспользоваться SSH тунеллем и пробросить 5001 порт Вашей ноды на локальный компьютер:</p><pre>ssh -L 5001:localhost:5001 [username]@[server-address]</pre><p>С помощью веб интерфейса Вы сможете черед дружелюбный интерфейс управлять Вашей нодой, видеть разнообразную статистику а также настраивать её.</p><h3>Децентрализованный веб сайт</h3><p>Давайте перейдём к созданию Вашего первого децентрализованного ваб сайта. Для начала нам понадобится сам сайт (я не буду рассказывать детали скажу что нужен сайт построенный на HTML/JS/CSS). Для примера можно взять подготовленный мною <a href="https://gateway.pinata.cloud/ipfs/QmRWcQAd1EEPXs8dPTq67LCubSoXW9fkb1WJqmBijJvSg9/site-example.tar.gz">тэмплэйт</a> (между прочим тоже размещённый на IPFS).</p><p>Я предполагаю что Вы скачали предоставленный мною пакет и распокавали его содержимое в директорию <strong>ipfssite</strong>:</p><pre>$ ls ipfssite/</pre><pre>css images index.html js</pre><p>Для того что бы опубликовать этот сайт сперва вам нужно запустить IPFS демон на Вашем компьютере (если он ещё не запущен). После этого Вы можете загрузить вебсайт воспользовавшись следующей командой:</p><pre>$ ipfs add -r ipfssite</pre><pre>added QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi ipfssite/css/bootstrap.min.css</pre><pre>added QmToWAMXJFSi2s22JqfmajL4WPJZJdnzJtzSV1TaUdkFLp ipfssite/css/styles.css</pre><pre>added QmSyc5sQa4smKUvNaZtr6y44et5gVgzsf4RaWD7tu1PgCk ipfssite/images/ipfs-logo.svg</pre><pre>added QmamZxnEKaAwdLEoCtC7w4jwaVuR7ztb1cLayDQGM9DVci ipfssite/index.html</pre><pre>added QmZqVNydZxRrioxHwMxCa5CQs7yRLPqnKUexuyrTkJhBwa ipfssite/js/bootstrap.min.js</pre><pre>added QmWirprJ5C4m1rVmEKS1Wf3WBviqpoFgp64QvWACsa7wC8 ipfssite/js/jquery-3.3.1.slim.min.js</pre><pre>added QmPNoejVoMRayPqLzsKzYNLh8p5yGKyA5PBFJ3sw2xLDM3 ipfssite/js/popper.min.js</pre><pre>added QmbkVCDQ95ypMH8VWHACsCyZPxerwRrpfXZ5y3TDBGS3Rd ipfssite/css</pre><pre>added QmWJP6sa19yUjco7YXCVyqXoeX2L4378yzcTJWYxZWoMK3 ipfssite/images</pre><pre>added QmcZSAjXfTdciMAS9zjLjWcmRRcF3QTnBTqM66zzKCQAT1 ipfssite/js</pre><pre>added Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV ipfssite</pre><pre>301.28 KiB / 301.28 KiB [=============================================] 100.00%</pre><p>Последний хэш (самой директории) тот что Вам нужно запомнить. Вы сможете просмотреть Ваш сайт по следующей ссылке (подствьте хэш который вы получили выше):</p><p><a href="http://localhost:8080/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV">http://localhost:8080/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</a></p><p>или даже по вот такой:</p><p><a href="https://ipfs.io/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV">https://ipfs.io/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0d7_xSJY8-BtOvz9tCgwg.png" /><figcaption>Ваш первый децентрализованный сайт онлайн</figcaption></figure><p>Последняя ссылка может по началу долго открываться — поэтому наберитесь терпения, это только первый раз.</p><p>Давайте не останавливаться на этом и сделаем наш сайт ещё немного дружелюбнее. В конце концов довольно трудно запомнить или отправить такой хэш по СМС 😉</p><p>Для этого Вам понадобиться доменное имя. Перейдите в административную панель Вашего доменного имени и создайте DNS запись типа TXT что бы поключит его к Вашему сайту. В моем случае эта запись будет выглядеть вот так (опять таки обновите эту строчку согласно полученного хэша выше):</p><pre>dnslink=/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV</pre><p>Вы можете проверить обновились ли данные в доменном имени выполнив следующую команду:</p><pre>dig +noall +answer TXT [your-domain-name]</pre><pre>[your-domain-name]. 60 IN TXT “dnslink=/ipfs/Qmf2EuEZJXUtwuMRALgTsN6xsDQy5g8s4H5BQKLvMYE2dV”</pre><p>Через какое-то время DNS записи обновятся по всем основным серверам в мире и Вы сможете доступиться к Вашему сайту по следующим адресам:</p><p><a href="http://localhost:8080/ipns/[your-domain-name]">http://localhost:8080/ipns/[your-domain-name]</a></p><p><a href="http://gateway.ipfs.io/ipns/[your-domain-name]">http://gateway.ipfs.io/ipns/[your-domain-name]</a></p><p>И больше не нужно запоминать длинный ничего не значящий хэш!</p><h3>Выводы и следующие шаги?</h3><p>Поздравляю! Вас теперь смело можно назвать ниндзей децентрализованных вебсайтов! Что же теперь? В следующей статье я поделюсь что стоит за децентрализированным интернетом и как создать Ваш сайт с настоящим децентрализированными доменным именем. Заинтригованы? Тогда оставайтесь на нашем канале!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44538b198b74" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>