<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Lo Spazioporto</title>
    <link rel="self" type="application/atom+xml" href="https://spaziale.codeberg.page/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://spaziale.codeberg.page"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-10-19T00:00:00+00:00</updated>
    <id>https://spaziale.codeberg.page/atom.xml</id>
    <entry xml:lang="en">
        <title>Trasferire dati fra due PC? Basta un cavo Ethernet 🔌</title>
        <published>2026-10-19T00:00:00+00:00</published>
        <updated>2026-10-19T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://spaziale.codeberg.page/trasferimento-dati/"/>
        <id>https://spaziale.codeberg.page/trasferimento-dati/</id>
        
        <content type="html" xml:base="https://spaziale.codeberg.page/trasferimento-dati/">&lt;p&gt;Trasferire dati fra due PC è sempre stato, per me, una &lt;strong&gt;sofferenza&lt;/strong&gt;. Se i file sono piccoli usare servizi di messaggistica come Telegram &lt;strong&gt;ci può stare&lt;/strong&gt;™ però ultimamente ho avuto un occasione per far girare i neuroni: il cambio di PC. Io odio cambiare dispositivi, è sempre una sofferenza unica. Per fortuna ho trovato un modo migliore del passare tutto su una memoria esterna per poi copiarla sul nuovo PC.&lt;/p&gt;
&lt;p&gt;Premessa:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assumo che stiate usando Fedora Linux&lt;/li&gt;
&lt;li&gt;È un pò tecnico il setup ma nulla di impossibile. Una volta impostato è facilissimo&lt;/li&gt;
&lt;li&gt;Si può adattare a qualsiasi sistema operativo, internet è il vostro migliore amico&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;nella-rete-locale&quot;&gt;Nella rete locale&lt;/h1&gt;
&lt;p&gt;Se siete fortunat* da avere un WiFi a casa: Congratulazioni 🎉️ , non dovere fare quasi nulla. Serve solo che entrambi i due PC siano nella stessa rete. Per scambio di grandi file consiglio di attaccarvi con il cavo Ethernet.&lt;/p&gt;
&lt;h1 id=&quot;cavo-diretto-fra-i-2-pc&quot;&gt;Cavo diretto fra i 2 PC&lt;/h1&gt;
&lt;p&gt;Io faccio parte di quei poracci che non hanno un abbonamento ad Internet per la casa. E quindi come si fa? Serve creare un profilo “diretto”, un canale di comunicazione fra i 2 PC. E cosa ci sta di più veloce che gli stessi cavi di internet?&lt;/p&gt;
&lt;p&gt;Per prima cosa capiamo su quale &lt;em&gt;interfacce di rete&lt;/em&gt; vogliamo creare il profilo con &lt;code&gt;nmcli device status&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;DEVICE&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;       TYPE      STATE                   CONNECTION&lt;/span&gt;&lt;span&gt;             &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;lo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;           loopback  connected&lt;/span&gt;&lt;span&gt; (externally)  lo                     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;enp63s0&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;      ethernet  non disponibile&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt;         --&lt;/span&gt;&lt;span&gt;                     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;wlp62s0&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;      wifi      non disponibile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scegliamo l’interfaccia Ethernet, nel mio caso &lt;code&gt;enp63s0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ora possiamo creare la connessione diretta&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;nmcli&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; con add type ethernet ifname enp63s0 con-name diretto ipv4.method link-local connection.autoconnect no&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Disabilitiamo l’autoconnect per evitare che prevalga rispetto a connessioni più importanti come quella al router. Quindi ricordatevi di attivare ogni volta la connessione quando serve.&lt;/p&gt;
&lt;figure class=&quot;post-figure &quot;&gt;
        &lt;div class=&quot;post-figure-wrap&quot;&gt;
            &lt;img class=&quot;post-figure-thumb&quot;
         src=&quot;https://spaziale.codeberg.page/processed_images/image_3.6a07229fd47ebaa3.avif&quot;
         width=&quot;492&quot;
         height=&quot;517&quot;
         alt=&quot;Menu delle impostazioni di rete con la connessione via cavo &#39;diretto&#39; attiva su Ethernet PCI.&quot;
         fetchpriority=&quot;high&quot;
         loading=&quot;eager&quot;
         decoding=&quot;sync&quot;&gt;
            &lt;details class=&quot;alt-badge&quot; aria-hidden=&quot;true&quot;&gt;
                &lt;summary class=&quot;pressable&quot;&gt;ALT&lt;/summary&gt;
                &lt;p&gt;Menu delle impostazioni di rete con la connessione via cavo &#39;diretto&#39; attiva su Ethernet PCI.&lt;/p&gt;
            &lt;/details&gt;
        &lt;/div&gt;&lt;figcaption&gt;Esempio di attivazione della connessione &#39;diretto&#39; da GNOME&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Questa procedura va &lt;strong&gt;ripetuta su entrambi i due PC&lt;/strong&gt;.
&lt;strong&gt;diretto&lt;/strong&gt;&lt;/p&gt;
&lt;h1 id=&quot;come-collegarsi&quot;&gt;Come collegarsi&lt;/h1&gt;
&lt;p&gt;Per prima cosa bisogna capire:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;hostname, che possiamo trovare con &lt;code&gt;hostname&lt;/code&gt;; e se non ci piace si cambia con &lt;code&gt;sudo hostnamectl set-hostname nuovo-nome&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;username, con &lt;code&gt;whoami&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Esiste una cosa magica, l’&lt;strong&gt;mDNS&lt;/strong&gt;, che ci permette di scoprire quali PC ci sono nella rete tramite il loro nome. Possiamo trovarli con &lt;code&gt;hostname-del-pc.local&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;signora-mia-non-ci-si-puo-piu-fidare-di-nessuno-oggi&quot;&gt;Signora mia, non ci si può più fidare di nessuno oggi&lt;/h2&gt;
&lt;p&gt;Per evitare di fare danni bisogna restringere i permessi. Non vogliamo bot russi nel nostro PC. Quindi per sicurezza il servizio &lt;code&gt;ssh&lt;/code&gt;, quello che useremo per comunicare fra i PC, deve essere ammesso solo nella nostra zona &lt;strong&gt;home&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; firewall-cmd&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --permanent --zone=FedoraWorkstation --remove-service=ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; firewall-cmd&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --permanent --zone=home --remove-service=ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #928374;font-style: italic;&quot;&gt;# LAN di casa &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; firewall-cmd&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --permanent --zone=home --add-rich-rule=&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;rule family=&amp;quot;ipv4&amp;quot; source address=&amp;quot;192.168.1.0/24&amp;quot; service name=&amp;quot;ssh&amp;quot; accept&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #928374;font-style: italic;&quot;&gt;# Cavo diretto&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; firewall-cmd&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --permanent --zone=home --add-rich-rule=&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;rule family=&amp;quot;ipv4&amp;quot; source address=&amp;quot;169.254.0.0/16&amp;quot; service name=&amp;quot;ssh&amp;quot; accept&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; firewall-cmd&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --reload&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ora possiamo aggiungere la nostra connessione nella zona &lt;strong&gt;home&lt;/strong&gt;, quella fidata insomma, ed attivare il tutto&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;nmcli&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; con mod diretto connection.zone home&lt;/span&gt;&lt;span style=&quot;color: #928374;font-style: italic;&quot;&gt;  # caso cavo diretto&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;nmcli&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; con mod&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;nome&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; connection.zone home&lt;/span&gt;&lt;span style=&quot;color: #928374;font-style: italic;&quot;&gt;   # caso rete di casa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;nmcli&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; con up NOME&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; systemctl enable&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --now&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; sshd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;evitare-che-ti-si-spenga-il-pc-mentre-sposti-i-file-e-ti-prenda-un-colpo&quot;&gt;Evitare che ti si spenga il PC mentre sposti i file e ti prenda un colpo&lt;/h2&gt;
&lt;p&gt;Ovviamente a me non è successo.&lt;/p&gt;
&lt;p&gt;Per farlo creiamo un servizio che controlla ogni 10 secondi se una sessione &lt;em&gt;ssh&lt;/em&gt; è attiva e nel caso disabilita la sospensione.&lt;/p&gt;
&lt;div class=&quot;code-header&quot;&gt;
        &lt;span class=&quot;monospace&quot;&gt;inhibit-ssh&lt;/span&gt;
        &lt;svg class=&quot;btn pressable&quot;
             onclick=&quot;copyCode(this)&quot;
             viewBox=&quot;0 0 24 24&quot;
             width=&quot;14&quot;
             height=&quot;14&quot;
             stroke=&quot;currentColor&quot;
             stroke-width=&quot;2&quot;
             fill=&quot;none&quot;
             stroke-linecap=&quot;round&quot;
             stroke-linejoin=&quot;round&quot;&gt;
            &lt;rect x=&quot;9&quot; y=&quot;9&quot; width=&quot;13&quot; height=&quot;13&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;
            &lt;path d=&quot;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&quot;&gt;&lt;/path&gt;
        &lt;/svg&gt;
        &lt;noscript&gt;
            &lt;style&gt;.code-copy-btn { display: none !important; }&lt;/style&gt;
        &lt;/noscript&gt;
        &lt;script&gt;
                if (!window.copyCode) {
                    const COPY_ICON = &#39;&lt;rect x=&quot;9&quot; y=&quot;9&quot; width=&quot;13&quot; height=&quot;13&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;&lt;path d=&quot;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&quot;&gt;&lt;/path&gt;&#39;;
                    const CHECK_ICON = &#39;&lt;polyline points=&quot;20 6 9 17 4 12&quot;&gt;&lt;/polyline&gt;&#39;;
                    window.copyCode = function(el) {
                        const text = &quot;#!/bin/sh\nactive() { ss -Htn state established &#39;( sport = :22 )&#39; | grep -q .; }\nwhile :; do\n  if active; then\n    systemd-inhibit --what=sleep:idle:handle-lid-switch --who=inhibit-ssh \\\n      --why=\&quot;Sessione SSH/SFTP attiva\&quot; --mode=block \\\n      sh -c &#39;while ss -Htn state established \&quot;( sport = :22 )\&quot; | grep -q .; do sleep 10; done&#39;\n  fi\n  sleep 10\ndone\n&quot;;
                        navigator.clipboard.writeText(text).then(() =&gt; {
                            el.innerHTML = CHECK_ICON;
                            setTimeout(() =&gt; el.innerHTML = COPY_ICON, 2000);
                        }).catch(console.error);
                    };
                }
        &lt;/script&gt;
        &lt;a class=&quot;btn pressable&quot;
           href=&quot;data:text/plain;charset=utf-8,%23%21/bin/sh%0Aactive%28%29%20%7B%20ss%20-Htn%20state%20established%20%27%28%20sport%20%3D%20%3A22%20%29%27%20%7C%20grep%20-q%20.%3B%20%7D%0Awhile%20%3A%3B%20do%0A%20%20if%20active%3B%20then%0A%20%20%20%20systemd-inhibit%20--what%3Dsleep%3Aidle%3Ahandle-lid-switch%20--who%3Dinhibit-ssh%20%5C%0A%20%20%20%20%20%20--why%3D%22Sessione%20SSH/SFTP%20attiva%22%20--mode%3Dblock%20%5C%0A%20%20%20%20%20%20sh%20-c%20%27while%20ss%20-Htn%20state%20established%20%22%28%20sport%20%3D%20%3A22%20%29%22%20%7C%20grep%20-q%20.%3B%20do%20sleep%2010%3B%20done%27%0A%20%20fi%0A%20%20sleep%2010%0Adone%0A&quot;
           download=&quot;inhibit-ssh&quot;
           title=&quot;Scarica il file&quot;&gt;
            &lt;svg viewBox=&quot;0 0 24 24&quot;
                 width=&quot;14&quot;
                 height=&quot;14&quot;
                 stroke=&quot;currentColor&quot;
                 stroke-width=&quot;2&quot;
                 fill=&quot;none&quot;
                 stroke-linecap=&quot;round&quot;
                 stroke-linejoin=&quot;round&quot;&gt;
                &lt;path d=&quot;M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4&quot;&gt;&lt;/path&gt;
                &lt;polyline points=&quot;7 10 12 15 17 10&quot;&gt;&lt;/polyline&gt;&lt;line x1=&quot;12&quot; y1=&quot;15&quot; x2=&quot;12&quot; y2=&quot;3&quot;&gt;&lt;/line&gt;
            &lt;/svg&gt;
        &lt;/a&gt;
    &lt;/div&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #928374;font-style: italic;&quot;&gt;#!/bin/sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;active&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;() {&lt;/span&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt; ss&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; -Htn&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; state established&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;( sport = :22 )&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #8EC07C;&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; -q&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; .&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt; do&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt; active&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt; then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;    systemd-inhibit&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --what=sleep:idle:handle-lid-switch --who=inhibit-ssh \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt;      --why=&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;Sessione SSH/SFTP attiva&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --mode=block \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;      sh&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; -c&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;while ss -Htn state established &amp;quot;( sport = :22 )&amp;quot; | grep -q .; do sleep 10; done&lt;/span&gt;&lt;span style=&quot;color: #A89984;&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt;  fi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;  sleep&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FB4934;&quot;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;code-header&quot;&gt;
        &lt;span class=&quot;monospace&quot;&gt;inhibit-ssh.service&lt;/span&gt;
        &lt;svg class=&quot;btn pressable&quot;
             onclick=&quot;copyCode(this)&quot;
             viewBox=&quot;0 0 24 24&quot;
             width=&quot;14&quot;
             height=&quot;14&quot;
             stroke=&quot;currentColor&quot;
             stroke-width=&quot;2&quot;
             fill=&quot;none&quot;
             stroke-linecap=&quot;round&quot;
             stroke-linejoin=&quot;round&quot;&gt;
            &lt;rect x=&quot;9&quot; y=&quot;9&quot; width=&quot;13&quot; height=&quot;13&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;
            &lt;path d=&quot;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&quot;&gt;&lt;/path&gt;
        &lt;/svg&gt;
        &lt;noscript&gt;
            &lt;style&gt;.code-copy-btn { display: none !important; }&lt;/style&gt;
        &lt;/noscript&gt;
        &lt;script&gt;
                if (!window.copyCode) {
                    const COPY_ICON = &#39;&lt;rect x=&quot;9&quot; y=&quot;9&quot; width=&quot;13&quot; height=&quot;13&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;&lt;path d=&quot;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&quot;&gt;&lt;/path&gt;&#39;;
                    const CHECK_ICON = &#39;&lt;polyline points=&quot;20 6 9 17 4 12&quot;&gt;&lt;/polyline&gt;&#39;;
                    window.copyCode = function(el) {
                        const text = &quot;[Unit]\nDescription=Blocca la sospensione mentre ci sono sessioni SSH attive\n\n[Service]\nExecStart=/usr/local/bin/inhibit-ssh\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n&quot;;
                        navigator.clipboard.writeText(text).then(() =&gt; {
                            el.innerHTML = CHECK_ICON;
                            setTimeout(() =&gt; el.innerHTML = COPY_ICON, 2000);
                        }).catch(console.error);
                    };
                }
        &lt;/script&gt;
        &lt;a class=&quot;btn pressable&quot;
           href=&quot;data:text/plain;charset=utf-8,%5BUnit%5D%0ADescription%3DBlocca%20la%20sospensione%20mentre%20ci%20sono%20sessioni%20SSH%20attive%0A%0A%5BService%5D%0AExecStart%3D/usr/local/bin/inhibit-ssh%0ARestart%3Dalways%0A%0A%5BInstall%5D%0AWantedBy%3Dmulti-user.target%0A&quot;
           download=&quot;inhibit-ssh.service&quot;
           title=&quot;Scarica il file&quot;&gt;
            &lt;svg viewBox=&quot;0 0 24 24&quot;
                 width=&quot;14&quot;
                 height=&quot;14&quot;
                 stroke=&quot;currentColor&quot;
                 stroke-width=&quot;2&quot;
                 fill=&quot;none&quot;
                 stroke-linecap=&quot;round&quot;
                 stroke-linejoin=&quot;round&quot;&gt;
                &lt;path d=&quot;M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4&quot;&gt;&lt;/path&gt;
                &lt;polyline points=&quot;7 10 12 15 17 10&quot;&gt;&lt;/polyline&gt;&lt;line x1=&quot;12&quot; y1=&quot;15&quot; x2=&quot;12&quot; y2=&quot;3&quot;&gt;&lt;/line&gt;
            &lt;/svg&gt;
        &lt;/a&gt;
    &lt;/div&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;[&lt;/span&gt;&lt;span&gt;Unit&lt;/span&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #83A598;&quot;&gt;Description&lt;/span&gt;&lt;span style=&quot;color: #8EC07C;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;Blocca&lt;/span&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt; la&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; sospensione mentre ci sono sessioni SSH attive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;[&lt;/span&gt;&lt;span&gt;Service&lt;/span&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #83A598;&quot;&gt;ExecStart&lt;/span&gt;&lt;span style=&quot;color: #8EC07C;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;/usr/local/bin/inhibit-ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #83A598;&quot;&gt;Restart&lt;/span&gt;&lt;span style=&quot;color: #8EC07C;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;always&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;[&lt;/span&gt;&lt;span&gt;Install&lt;/span&gt;&lt;span style=&quot;color: #FE8019;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #83A598;&quot;&gt;WantedBy&lt;/span&gt;&lt;span style=&quot;color: #8EC07C;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt;multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Nota&lt;/strong&gt;: l’inhibit include &lt;em&gt;handle-lid-switch&lt;/em&gt;, altrimenti la chiusura schermo sospende comunque&lt;/p&gt;
&lt;p&gt;E per installare questi servizi usiamo&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #EBDBB2; background-color: #282828;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; -m 755&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; inhibit-ssh /usr/local/bin/inhibit-ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; -m 644&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; inhibit-ssh.service /etc/systemd/system/inhibit-ssh.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; systemctl daemon-reload&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FABD2F;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; systemctl enable&lt;/span&gt;&lt;span style=&quot;color: #D3869B;&quot;&gt; --now&lt;/span&gt;&lt;span style=&quot;color: #B8BB26;&quot;&gt; inhibit-ssh.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;collegarti-al-pc-da-un-file-manager&quot;&gt;Collegarti al PC da un file manager&lt;/h2&gt;
&lt;p&gt;La stragrande maggioranza dei file manager ti permette di collegarti a server &lt;em&gt;SFTP&lt;/em&gt;; in pratica puoi collegarti al tuo PC come se fosse un disco esterno, navigarci, spostarci le cose e pure lavorarci.&lt;/p&gt;
&lt;p&gt;Ad esempio su quello di GNOME basta premere &lt;code&gt;Ctrl+L&lt;/code&gt;, incollare sulla barra degli indirizzi &lt;code&gt;sftp://utente@hostname.local/&lt;/code&gt; e voilà. Per comodità potere salvare il vostro PC nei segnalibri con tasto destro -&amp;gt; segnalibro, o  &lt;code&gt;Ctrl+D&lt;/code&gt;.&lt;/p&gt;
&lt;figure class=&quot;post-figure &quot;&gt;
        &lt;div class=&quot;post-figure-wrap&quot;&gt;
            &lt;img class=&quot;post-figure-thumb&quot;
         src=&quot;https://spaziale.codeberg.page/processed_images/image_1.8f2e5aa09e465bec.avif&quot;
         width=&quot;640&quot;
         height=&quot;368&quot;
         alt=&quot;Gestore file con il file &#39;Ciau 👋.txt&#39; selezionato nella cartella &#39;sono sul vecchio pc&#39;.&quot;
         fetchpriority=&quot;high&quot;
         loading=&quot;eager&quot;
         decoding=&quot;sync&quot;&gt;
            &lt;details class=&quot;alt-badge&quot; aria-hidden=&quot;true&quot;&gt;
                &lt;summary class=&quot;pressable&quot;&gt;ALT&lt;/summary&gt;
                &lt;p&gt;Gestore file con il file &#39;Ciau 👋.txt&#39; selezionato nella cartella &#39;sono sul vecchio pc&#39;.&lt;/p&gt;
            &lt;/details&gt;
        &lt;/div&gt;&lt;figcaption&gt;GNOME Files con connessione remota al PC secondario&lt;/figcaption&gt;&lt;/figure&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Titolo clickbait (per l&#39;IndieWeb)</title>
        <published>2026-09-30T00:00:00+00:00</published>
        <updated>2026-09-30T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://spaziale.codeberg.page/nuovo-inizio/"/>
        <id>https://spaziale.codeberg.page/nuovo-inizio/</id>
        
        <content type="html" xml:base="https://spaziale.codeberg.page/nuovo-inizio/">&lt;p&gt;Salve bell*, questo è il primo post del mio blog, niente di che.&lt;/p&gt;
&lt;p&gt;Qui non so cosa scriverò, ma sentivo il bisogno avere qualcosa di mio per i miei pensieri e progetti ed eccoci qua.
Probabilmente parlerò di privacy, tech &lt;strong&gt;etico&lt;/strong&gt;, arte e altre cose che mi passano per la testa.&lt;/p&gt;
&lt;p&gt;Se vi va potete seguirmi dal &lt;a rel=&quot;external&quot; href=&quot;https://livellosegreto.it/@spaziale/&quot;&gt;fediverso&lt;/a&gt; o con il feed rss che trovate con l’apposito pulsantone.
Dato che ci piace complicarci la vita, il blog è un pastrocchio &lt;a rel=&quot;external&quot; href=&quot;https://codeberg.org/Spaziale/blog&quot;&gt;open source&lt;/a&gt;. È un pò da smanettoni, per soluzioni semplici no-code consiglio &lt;a rel=&quot;external&quot; href=&quot;https://writefreely.org/&quot;&gt;WriteFreely&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Insomma, fatemi sapere se vi piace il tema minimale e se trovate problemi,
cia 👋&lt;/p&gt;
</content>
        
    </entry>
</feed>
