Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 0 additions & 113 deletions docs/LINUX_USB_MOUNT.md

This file was deleted.

11 changes: 0 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,17 +338,6 @@ <h1>Select Serial Device</h1>
<div class="step-content">
<h1>Select USB Host Folder</h1>
<p>Select the root folder of your device. This is typically the CIRCUITPY Drive on your computer unless you renamed it. If your device does not appear as a drive on your computer, it will need to have the USB Host functionality enabled.</p>
<details id="linux-mount-notice" class="linux-mount-notice" hidden>
<summary><strong>Linux:</strong> seeing <code>OSError: [Errno 5]</code> after <kbd>Ctrl</kbd>+<kbd>D</kbd>? Click for fix.</summary>
<p>Your CIRCUITPY drive is mounted with asynchronous writes. Remount it with <code>sync</code>:</p>
<pre><code>udisksctl unmount -b /dev/sdX1
udisksctl mount -b /dev/sdX1 -o sync</code></pre>
<p>Replace <code>sdX1</code> with the correct device. Find it with:</p>
<pre><code>lsblk</code></pre>
<p>or:</p>
<pre><code>mount | grep CIRCUITPY</code></pre>
<p>For a permanent fix, see <a href="https://github.com/circuitpython/web-editor/blob/main/docs/LINUX_USB_MOUNT.md" target="_blank" rel="noopener">Linux USB mount notes</a>.</p>
</details>
<p>
<button class="purple-button hidden" id="useHostFolder"><span id="workingFolder"></span></button>
<button class="purple-button first-item" id="selectHostFolder">Select New Folder</button>
Expand Down
21 changes: 0 additions & 21 deletions js/common/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,6 @@ function isChromeOs() {
return false;
}

// Test to see if browser is running on Linux (and is not Chrome OS or
// Android, which can also report "Linux" in the legacy userAgent string).
function isLinux() {
// Newer test on Chromium
if (navigator.userAgentData?.platform === "Linux") {
return true;
}
// Avoid false positives for Chrome OS and Android.
if (isChromeOs()) {
return false;
}
if (navigator.userAgent.includes("Android")) {
return false;
}
if (navigator.userAgent.includes("Linux")) {
return true;
}
return false;
}

// Parse out the url parameters from the current url
function getUrlParams() {
// This should look for and validate very specific values
Expand Down Expand Up @@ -187,7 +167,6 @@ export {
isLocal,
isMicrosoftWindows,
isChromeOs,
isLinux,
getUrlParams,
getUrlParam,
timeout,
Expand Down
12 changes: 1 addition & 11 deletions js/workflows/usb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {GenericModal, DeviceInfoModal} from '../common/dialogs.js';
import {FileOps} from '@adafruit/circuitpython-repl-js'; // Use this to determine which FileTransferClient to load
import {FileTransferClient as ReplFileTransferClient} from '../common/repl-file-transfer.js';
import {FileTransferClient as FSAPIFileTransferClient} from '../common/fsapi-file-transfer.js';
import { isChromeOs, isLinux, isMicrosoftWindows } from '../common/utilities.js';
import { isChromeOs, isMicrosoftWindows } from '../common/utilities.js';

let btnRequestSerialDevice, btnSelectHostFolder, btnUseHostFolder, lblWorkingfolder;

Expand Down Expand Up @@ -211,16 +211,6 @@ class USBWorkflow extends Workflow {
btnUseHostFolder = modal.querySelector('#useHostFolder');
lblWorkingfolder = modal.querySelector('#workingFolder');

// Show the Linux-only mount-option notice when relevant (#229).
// CIRCUITPY mounted without `sync` on Linux can produce
// "OSError: [Errno 5] Input/output error" on Ctrl-D after a save
// because Chromium's File System Access writes are deferred by the
// kernel writeback for up to ~30s.
const linuxNotice = modal.querySelector('#linux-mount-notice');
if (linuxNotice) {
linuxNotice.hidden = !isLinux();
}

// Map the button states to the buttons
this.connectButtons = {
request: btnRequestSerialDevice,
Expand Down
67 changes: 0 additions & 67 deletions sass/layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -542,70 +542,3 @@
}

}

// Inline notice shown in the USB connect dialog for Linux users (#229).
.linux-mount-notice {
margin-top: 1rem;
padding: 0.5rem 1rem;
border-left: 4px solid #f0ad4e;
background-color: #fff8e1;
border-radius: 3px;
font-size: 0.95em;

summary {
cursor: pointer;
padding: 0.25rem 0;
list-style: none;
position: relative;
padding-left: 1.25rem;

&::-webkit-details-marker {
display: none;
}

&::before {
content: "\25B6"; // right-pointing triangle
position: absolute;
left: 0;
font-size: 0.8em;
transition: transform 150ms ease-in-out;
display: inline-block;
}
}

&[open] summary {
margin-bottom: 0.5rem;

&::before {
transform: rotate(90deg);
}
}

p {
margin: 0.25rem 0;
}

pre {
margin: 0.5rem 0;
padding: 0.5rem;
background-color: #2d2d2d;
color: #f1f1f1;
border-radius: 3px;
overflow-x: auto;
font-size: 0.9em;
}

code {
font-family: monospace;
}

kbd {
display: inline-block;
padding: 1px 4px;
font-family: monospace;
font-size: 0.9em;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 3px;
}
}