<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=772&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=772</link>
		<description><![CDATA[The most recent posts in caja automatically opens some thumbdrives but not others [SOLVED].]]></description>
		<lastBuildDate>Fri, 30 Jun 2017 23:53:09 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2724#p2724</link>
			<description><![CDATA[<p>@greenjeans: Yes, the partition table was msdos from the start and I never changed that.</p><p>@golinux: I&#039;m pretty sure manufacturers do that, but I doubt it was the cause because caja would automatically open the drives when they were new.</p><p>Here are the only things I can say for sure about this strange issue, based on much experimentation:<br />1. All my usb drives could be automatically opened by caja when they were new<br />2. Some usb drives consistently stopped being automatically opened by caja, regardless of distro (MATE on devuan, debian, or arch)<br />3. I thought the breakage was GParted&#039;s fault, but I was not able to prove that through recent experiments<br />4. I was not able to fix the problem using GParted (recreating the partition table and/or recreating partitions had no effect)<br />5. wipefs or zeroing the whole drive with dd fixes the problem. I ran out of &quot;broken&quot; drives to try zeroing just the beginning sectors.</p><p>Since I&#039;m unable to reproduce the breakage, it&#039;s difficult to pinpoint exactly where the issue was. My best guess is that the culprit is some subtle corruption in early sectors of the drive that are inaccessible to parted/gparted&#039;s operations.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 30 Jun 2017 23:53:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2724#p2724</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2723#p2723</link>
			<description><![CDATA[<p>In the past I have had flash drives that misbehaved, however it was a different scenario.&#160; After using dd to copy an iso image to a drive MS Windows would no longer read, mount, format, or partition the drive until I zeroed the sectors with dd in linux.&#160; It is a rare occurrence and it may have been this same issue GNUser had or a related one.&#160; I have never been a fan of auto mounting usb drives in any OS for the same reasons I never liked &quot;Boot From Floppy&quot; as the default BIOS option in the old days.&#160; It&#039;s a good way to get a malware infection if you have ever lost sight of the flash drive.&#160; So in linux, I turn off auto mounting of everything by force of habit.&#160; </p><p>My best guess in this case is that there is either:</p><p>A.)&#160; An incompatible partition table as Greenjeans mentioned</p><p>or</p><p>B.)&#160; Some sort of minor corruption of data in the partition table.&#160; While it may not be enough to cause a loss of data in robust environment like Devuan, it might keep the system from auto mounting the drive or stop Caja from auto running the file browser.&#160; </p><p>It is also possible that there was a hidden autorun.inf somewhere on the drives that the manufacturer placed there to run their proprietary software, as Golinux suggested.&#160; I don&#039;t know if such a file would have much effect in linux even if you have wine installed.&#160; It would have to point to an executable program of some type and if the drive had been previously formatted it would be missing.&#160; </p><p>I do not think that left over information in the boot sector is the cause because wipefs won&#039;t erase data according to this excerpt from it&#039;s man page:</p><div class="codebox"><pre><code>wipefs does not erase the filesystem itself nor any other data from the
       device.  When used  without  any  options,  wipefs  lists  all  visible
       filesystems and the offsets of their basic signatures.</code></pre></div><p>Which brings us to gparted...should it be removing the old partition data by either doing the same thing wipefs does or by calling wipefs?&#160; Or should it just be overwriting the partition table and file system as it seems to be doing?&#160; If it is the former, this points to a bug.&#160; If it is the latter perhaps it needs a call to wipesfs in order to prevent this issue in the future.</p><p>lazlo</p>]]></description>
			<author><![CDATA[dummy@example.com (lazlo)]]></author>
			<pubDate>Fri, 30 Jun 2017 23:49:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2723#p2723</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2722#p2722</link>
			<description><![CDATA[<p>Don&#039;t manufacturers sometimes put strange data on flash drives that could be causing this?&#160; Maybe some &#039;security&#039; or MS idiot feature?</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Fri, 30 Jun 2017 22:58:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2722#p2722</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2719#p2719</link>
			<description><![CDATA[<div class="quotebox"><cite>GNUser wrote:</cite><blockquote><div><p>Alas, just creating a new partition table was not enough. </p><p>The only way to get caja to start automatically opening previously-ignored sticks was dd or wipefs, followed by creation of new partition table and new partition through whatever method.</p></div></blockquote></div><p>That&#039;s so bizarre. What kind of partition table was on the bad sticks to start with, ms-dos?</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Fri, 30 Jun 2017 21:57:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2719#p2719</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2718#p2718</link>
			<description><![CDATA[<p>Alas, just creating a new partition table was not enough. </p><p>The only way to get caja to start automatically opening previously-ignored sticks was dd or wipefs, followed by creation of new partition table and new partition through whatever method.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 30 Jun 2017 21:45:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2718#p2718</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2716#p2716</link>
			<description><![CDATA[<p>Yay! Glad you guys fixed it, but before you go to all the below steps on any other drive that does this in the future, I was wondering if you had tried just creating a new partition table first before proceeding with formatting? Knowing gparted and thumbdrive weirdness i&#039;ve experienced in the past, i&#039;d say there was a good chance doing just that might have been what fixed it, not sure you needed to zero it out first.</p><div class="quotebox"><cite>GNUser wrote:</cite><blockquote><div><p>lazlo: Yes, running the two wipefs commands and then going into GParted to create the partition table and fat32 partition also works (converts a non-auto-opening thumbdrive to an auto-opening one). The wipefs commands are very fast, much better than waiting 30+ minutes for the original dd command.</p><p>Since I&#039;ve bumped into this issue many times, here is a script that puts it all together: wipefs steps, new msdos partition table, creation of single partition as big as the device, formatting the partition to fat32, adding a label to the partition:</p><div class="codebox"><pre><code>sudo umount /dev/sdb1   
sudo wipefs -a -f /dev/sdb1
sudo wipefs -a -f /dev/sdb
sudo parted /dev/sdb mklabel msdos &amp;&gt;/dev/null
sudo parted /dev/sdb mkpart primary 0% 100% &amp;&gt;/dev/null
while [ ! -e /dev/sdb1 ]; do sleep 1; done # because parted mkpart exits before it&#039;s done creating sdb1!
sleep 1
sudo mkfs.msdos -F 32 /dev/sdb1
sudo dosfslabel /dev/sdb1 &quot;my_label&quot;</code></pre></div><p>EDIT: I&#039;d try the targeted dd command as well, but at this point all of my &quot;broken&quot; thumbdrives have been fixed <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p><strong>WARNING</strong>: Before using the script above, make sure a) /dev/sdb is actually your thumbdrive (one way to check is with &quot;sudo blkid&quot;), and b) the thumbdrive contains no valuable data. If you have any doubt, don&#039;t run the script--it assumes these two things are true.</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Fri, 30 Jun 2017 21:25:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2716#p2716</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2702#p2702</link>
			<description><![CDATA[<p>lazlo: Yes, running the two wipefs commands and then going into GParted to create the partition table and fat32 partition also works (converts a non-auto-opening thumbdrive to an auto-opening one). The wipefs commands are very fast, much better than waiting 30+ minutes for the original dd command.</p><p>Since I&#039;ve bumped into this issue many times, here is a script that puts it all together: wipefs steps, new msdos partition table, creation of single partition as big as the device, formatting the partition to fat32, adding a label to the partition:</p><div class="codebox"><pre><code>sudo umount /dev/sdb1   
sudo wipefs -a -f /dev/sdb1
sudo wipefs -a -f /dev/sdb
sudo parted /dev/sdb mklabel msdos &amp;&gt;/dev/null
sudo parted /dev/sdb mkpart primary 0% 100% &amp;&gt;/dev/null
while [ ! -e /dev/sdb1 ]; do sleep 1; done # because parted mkpart exits before it&#039;s done creating sdb1!
sleep 1
sudo mkfs.msdos -F 32 /dev/sdb1
sudo dosfslabel /dev/sdb1 &quot;my_label&quot;</code></pre></div><p>EDIT: I&#039;d try the targeted dd command as well, but at this point all of my &quot;broken&quot; thumbdrives have been fixed <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p><strong>WARNING</strong>: Before using the script above, make sure a) /dev/sdb is actually your thumbdrive (one way to check is with &quot;sudo blkid&quot;), and b) the thumbdrive contains no valuable data. If you have any doubt, don&#039;t run the script--it assumes these two things are true.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 30 Jun 2017 12:46:04 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2702#p2702</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2688#p2688</link>
			<description><![CDATA[<div class="quotebox"><cite>GNUser wrote:</cite><blockquote><div><p>lazlo: You nailed it!</p><p>0. I plugged in a thumbdrive that caja wasn&#039;t automatically opening, then...<br />1. </p><div class="codebox"><pre><code>sudo umount /dev/sdb1</code></pre></div><p>2. </p><div class="codebox"><pre><code>sudo dd if=/dev/zero of=/dev/sdb</code></pre></div><p>3. I went into GParted and when I chose sdb it complained about there being no partition table--presumably because it was overwritten with zeros by the dd command--so I went ahead and created an msdos partition table.<br />4. Still in GParted, I created an sdb1 partition with fat32 filesystem. </p><p>Then I removed the thumbdrive and plugged it back in, and... CAJA AUTOMATICALLY OPENED IT!</p><p>I tried cheating with a different thumbdrive, hoping that skipping the time-consuming dd step and going straight to creating a new partition table would be enough, but no luck with that.</p><p>While I will continue to wonder where exactly was the problem, thanks to you we have a fix. Thanks a lot! This has bothered me for a long time, since long before Devuan.</p></div></blockquote></div><p>OK, since that actually worked, (yes, I am a bit surprised) then in order to narrow down what the issue is the next thing I would try is:</p><div class="codebox"><pre><code>wipefs -a -f /dev/sdb1
wipefs -a -f /dev/sdb</code></pre></div><p>and see if it has the same results.&#160; If so you may have found a bug in gparted.</p><p>Thanks for letting me know that dd worked!</p><p>EDIT:&#160; After giving it more thought I realized that if wipefs doesn&#039;t do the trick you could probably just run dd like this:</p><div class="codebox"><pre><code>dd if=/dev/zero of=/dev/sdb count=512 bs=4K</code></pre></div><p>That would just wipe the first two megabytes of space on the drive which would contain the boot sector and the partition table.&#160; If that doesn&#039;t work you can speed up the drive over wite with:</p><div class="codebox"><pre><code>dd if=/dev/zero of=/dev/sdb bs=8M</code></pre></div><p>lazlo</p>]]></description>
			<author><![CDATA[dummy@example.com (lazlo)]]></author>
			<pubDate>Fri, 30 Jun 2017 01:49:47 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2688#p2688</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2687#p2687</link>
			<description><![CDATA[<p>lazlo: You nailed it!</p><p>0. I plugged in a thumbdrive that caja wasn&#039;t automatically opening, then...<br />1. </p><div class="codebox"><pre><code>sudo umount /dev/sdb1</code></pre></div><p>2. </p><div class="codebox"><pre><code>sudo dd if=/dev/zero of=/dev/sdb</code></pre></div><p>3. I went into GParted and when I chose sdb it complained about there being no partition table--presumably because it was overwritten with zeros by the dd command--so I went ahead and created an msdos partition table.<br />4. Still in GParted, I created an sdb1 partition with fat32 filesystem. </p><p>Then I removed the thumbdrive and plugged it back in, and... CAJA AUTOMATICALLY OPENED IT!</p><p>I tried cheating with a different thumbdrive, hoping that skipping the time-consuming dd step and going straight to creating a new partition table would be enough, but no luck with that.</p><p>While I will continue to wonder where exactly was the problem, thanks to you we have a fix. Thanks a lot! This has bothered me for a long time, since long before Devuan.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 30 Jun 2017 00:58:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2687#p2687</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2685#p2685</link>
			<description><![CDATA[<div class="quotebox"><cite>lazlo wrote:</cite><blockquote><div><p>I hate a puzzle I can&#039;t solve. I&#039;ll be thinking about this forever if I don&#039;t find a good solid reason for it.</p></div></blockquote></div><p>Haha. I know the feeling.</p><p>I will try dd and will post back in a few minutes.</p><p>In the meantime, the only demonstrable difference I can find between the sticks that auto-open and the ones that don&#039;t is the product id:</p><p>Here&#039;s one that doesn&#039;t auto-open:</p><div class="codebox"><pre><code>bruno@thinkpad:~$ lsusb
---snip---
Bus 007 Device 006: ID 13fe:5500 Kingston Technology Company Inc. 
---snip---</code></pre></div><p>And here&#039;s one that does:</p><div class="codebox"><pre><code>bruno@thinkpad:~$ lsusb
---snip---
Bus 007 Device 007: ID 13fe:4100 Kingston Technology Company Inc. 
---snip---</code></pre></div><p>Notice the same vendor id (13fe) but different product id (5500 vs. 4100). Could this have anything to do with it?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 29 Jun 2017 23:51:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2685#p2685</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2684#p2684</link>
			<description><![CDATA[<p>OK, so what happens when (as root) you:</p><div class="codebox"><pre><code>dd if=/dev/zero of=/dev/sdb</code></pre></div><p>and then run gparted?&#160; I am thinking that *maybe* something is not being over written or not writing correctly to the usb drives that have the issue.&#160; Honestly though, I don&#039;t expect it to do any good.</p><p>EDIT:&#160; Could it be bad sectors close to the beginning of the drive preventing a vital bit of information from updating the status of the device somewhere below the caja mount process?&#160; Or maybe it&#039;s a slight difference in the low level hardware that communicates between the block layer and the flash chip of the usb drive itself?&#160; I know it&#039;s grasping at straws, but I hate a puzzle I can&#039;t solve.&#160; I&#039;ll be thinking about this forever if I don&#039;t find a good solid reason for it.</p><p>lazlo</p>]]></description>
			<author><![CDATA[dummy@example.com (lazlo)]]></author>
			<pubDate>Thu, 29 Jun 2017 22:21:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2684#p2684</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2683#p2683</link>
			<description><![CDATA[<p>Me, too. Very mysterious behavior, to be sure.</p><p>I&#039;ll keep at it when I have time, and will post any new insights here.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 29 Jun 2017 22:19:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2683#p2683</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2682#p2682</link>
			<description><![CDATA[<p>wow, strange one GNUser......i&#039;m at a loss......</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Thu, 29 Jun 2017 22:15:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2682#p2682</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2681#p2681</link>
			<description><![CDATA[<p>greenjeans: That was a really good idea. Yes, I was trying the stick fresh without any content. Alas, adding files makes no difference (i.e., the stick automounts and icon shows up on desktop, but caja does not automatically open it).</p><p>Just to check my sanity, I found two other thumbdrives and can confirm that caja automatically opens them. Therefore, caja continues to (sometimes) respect my setting to automatically &quot;Browse media when inserted&quot;.</p><p>Are you ready for something very strange? I took one of these new sticks and formatted the existing partition to fat32 using GParted. Then I took the other stick, deleted its existing partition, created a new partition, and formatted to fat32 (all using GParted). Surprise: Caja continues to automatically open these two sticks, no problem.</p><p>So at this point I can&#039;t seem to reproduce my problem. <strong>What I can say for sure is that caja consistently opens some sticks and consistently <em>doesn&#039;t</em> open others, despite the fact that all of these sticks have been formatted in GParted in the exact same way.</strong> All the sticks are of same brand (Patriot Memory), but different models.</p><p>I have both varieties of sticks here (auto-open and no-auto-open) in case someone can think of a helpful comparison to make between them.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 29 Jun 2017 21:37:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2681#p2681</guid>
		</item>
		<item>
			<title><![CDATA[Re: caja automatically opens some thumbdrives but not others [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2680#p2680</link>
			<description><![CDATA[<p>Okay I just found another way to reproduce this.</p><p>If you run gparted and format the usb stick to something,<strong> but don&#039;t add any content to the disk before trying it</strong>, it will automount the stick <strong>but not open Caja.</strong> If you put any piece of content whatsoever on the stick, then it will auto-open as well as auto-mount.</p><p>Gnuser are you trying the stick fresh from re-formatting but with no content?</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Thu, 29 Jun 2017 20:46:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2680#p2680</guid>
		</item>
	</channel>
</rss>
