You are not logged in.

#1 2011-09-24 02:05:45

ShionjiYuuko
Member
Registered: 2011-07-31
Posts: 67

Completely Disable USB/Removable Media Automount

hello smile

I want to completely disable automount for any removable devices (DVD, USB pendrives/external hdd).
those devices don't automatically show up in /media, but every time an application shows a file open dialog (or file browser, I don't have one), the volume labels are displayed in the left pane and clicking on one of them automatically mounts the device

I have tried this udev rule (don't have hal) from http://fossplanet.com/f12/how-disable-u … ts-190812/

ACTION="add|change", subsystem=="block", ENV{UDISKS_AUTOMOUNT_HINT}="never"

it doesn't have any effect, the file open dialog still can mount external devices

I don't install any desktop environments, but I have several gnome and KDE libraries. as far as I can remember, this unwanted behavior started when I installed KDE, and still remains even after I uninstalled it


始まりの荒野を独り もう歩き出してるらしい、僕は灰になるまで僕で有り続けたい
http://about.me/nnhnkn | http://identi.ca/nnhzkn

Offline

#2 2011-09-24 02:18:59

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Completely Disable USB/Removable Media Automount

Paste your "ps ax".

Offline

#3 2011-09-25 00:24:59

ShionjiYuuko
Member
Registered: 2011-07-31
Posts: 67

Re: Completely Disable USB/Removable Media Automount

  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:01 init [5]  
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:12 [ksoftirqd/0]
    6 ?        S      0:00 [migration/0]
    7 ?        S      0:00 [watchdog/0]
    8 ?        S      0:00 [migration/1]
   10 ?        S      0:11 [ksoftirqd/1]
   12 ?        S      0:00 [watchdog/1]
   13 ?        S<     0:00 [cpuset]
   14 ?        S<     0:00 [khelper]
   15 ?        S<     0:00 [netns]
   16 ?        S      0:00 [sync_supers]
   17 ?        S      0:00 [bdi-default]
   18 ?        S<     0:00 [kblockd]
   20 ?        S      0:00 [khungtaskd]
   21 ?        S      0:01 [kswapd0]
   22 ?        SN     0:00 [ksmd]
   23 ?        SN     0:07 [khugepaged]
   24 ?        S      0:00 [fsnotify_mark]
   25 ?        S<     0:00 [crypto]
   27 ?        S<     0:00 [kthrotld]
  160 ?        S<     0:00 [ata_sff]
  162 ?        S      0:02 [scsi_eh_0]
  163 ?        S      0:00 [scsi_eh_1]
  166 ?        S      0:00 [scsi_eh_2]
  167 ?        S      0:00 [scsi_eh_3]
  168 ?        S      0:00 [kworker/u:3]
  191 ?        S      0:03 [kjournald]
  242 ?        Ss     0:00 udevd --daemon
  246 ?        S<     0:00 [cfg80211]
  247 ?        S<     0:00 [iwl3945]
  380 ?        S<     0:00 [kpsmoused]
  409 ?        S      0:00 [khubd]
  473 ?        S<     0:00 [hd-audio0]
  574 ?        S      0:00 [scsi_eh_4]
  575 ?        S      0:03 [usb-storage]
  623 ?        S      0:00 [kjournald]
  625 ?        S      0:00 [kjournald]
  921 ?        S      0:00 supervising syslog-ng
  922 ?        Ss     0:00 /usr/sbin/syslog-ng
  947 ?        Ss     0:00 /usr/sbin/crond -S -l info
  973 ?        Ss     0:00 /usr/bin/dbus-daemon --system
  997 ?        Ss     0:00 /usr/sbin/bluetoothd
 1001 ?        S<     0:00 [l2cap]
 1004 ?        S      0:00 [flush-8:0]
 1052 ?        Ss     0:00 /usr/sbin/acpid
 1078 ?        SLsl   1:46 /usr/bin/mpd /etc/mpd.conf
 1111 tty1     Ss+    0:00 /sbin/agetty -8 -s 38400 tty1 linux
 1112 tty2     Ss+    0:00 /sbin/agetty -8 -s 38400 tty2 linux
 1113 tty3     Ss+    0:00 /sbin/agetty -8 -s 38400 tty3 linux
 1114 tty4     Ss+    0:00 /sbin/agetty -8 -s 38400 tty4 linux
 1115 tty5     Ss+    0:00 /sbin/agetty -8 -s 38400 tty5 linux
 1116 tty6     Ss+    0:00 /sbin/agetty -8 -s 38400 tty6 linux
 1117 ?        Ss     0:01 /usr/bin/slim
 1118 ?        Ss     0:00 /usr/bin/mpdscribble
 1120 tty7     Ss+   14:53 /usr/bin/X -nolisten tcp vt07 -auth /var/run/slim.auth
 1129 ?        Sl     0:00 /usr/sbin/console-kit-daemon --no-daemon
 1196 ?        Sl     0:00 /usr/lib/polkit-1/polkitd
 1206 ?        S      0:00 ck-launch-session /bin/bash -login /home/shiki_no_koibito/.xinitrc
 1216 ?        S      1:41 awesome
 1222 ?        Ss     0:02 /usr/lib/scim-1.0/scim-launcher -d -c simple -e all -f socket --no-stay
 1226 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-manager
 1227 ?        Ssl    0:12 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay
 1229 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c socket -e socket -f x11
 1234 ?        S      0:00 dbus-launch --sh-syntax --exit-with-session
 1235 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 1239 ?        Ssl    4:38 conky
 1241 ?        Ss     0:30 xcompmgr -c
 1243 ?        Ssl    0:11 guake -OO /usr/lib/guake/guake.py
 1252 ?        S      0:00 /usr/lib/GConf/gconfd-2
 1253 ?        S      0:00 gnome-pty-helper
 1254 pts/0    Ss     0:00 /bin/bash
 1340 ?        Ss     0:00 /usr/sbin/pppd call provider updetach child-timeout 10 linkname provider
 1382 ?        SL     0:00 /usr/sbin/chronyd
 1386 ?        Ss     0:00 kdeinit4: kdeinit4 Runnin e
 1388 ?        S      0:00 kdeinit4: klauncher [kdei e
 1390 ?        Sl     0:01 kdeinit4: kded4 [kdeinit]  
 1394 ?        S      0:01 kdeinit4: kglobalaccel [k e
 1396 ?        S      0:01 kdeinit4: kwalletd [kdein e
 1398 ?        Sl    14:31 /usr/bin/knotify4
 1401 ?        Sl     0:03 /usr/lib/upower/upowerd
 1422 ?        Sl     0:00 /usr/lib/udisks/udisks-daemon
 1430 ?        S      0:06 udisks-daemon: polling /dev/sdb /dev/sr0
 1466 ?        S      0:00 /usr/bin/kwalletmanager --kwalletd
 1527 ?        S      0:01 kdeinit4: kio_http_cache_ e
 1538 ?        S<sl   0:00 /usr/bin/pulseaudio --start --log-target=syslog
 1540 ?        SNl    0:00 /usr/lib/rtkit-daemon
 1545 ?        Sl     0:00 /usr/lib/pulse/gconf-helper
 1625 ?        S      0:00 /usr/lib/gvfs/gvfsd
 1629 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-http --spawner :1.65 /org/gtk/gvfs/exec_spaw/0
 1635 ?        Ssl    0:00 /usr/lib/gvfs//gvfs-fuse-daemon /home/shiki_no_koibito/.gvfs
 1642 ?        Sl    14:50 /usr/lib/chromium/chromium http://news.nationalgeographic.com/news/2011/09/110923-neutrinos-speed-of-light-particles-cern-physics-ei
 1644 ?        S      0:30 /usr/lib/chromium/chromium http://news.nationalgeographic.com/news/2011/09/110923-neutrinos-speed-of-light-particles-cern-physics-ei
 1646 ?        S      0:00 /usr/lib/chromium/chromium --type=zygote
 1668 ?        Sl     0:02 /usr/lib/chromium/chromium --type=extension --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBa
 1693 ?        Z      0:17 [chromium] <defunct>
 2190 ?        Z      1:44 [chromium] <defunct>
 2492 pts/0    S+     0:18 ncmpcpp
 2494 pts/1    Ss+    0:00 /bin/bash
 2593 ?        SNl    0:00 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBac
 2708 ?        Z      2:57 [chromium] <defunct>
 2813 ?        S      0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 3246 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-launcher --daemon --config socket --display :0.0 anthy-imengine-helper 24a65e2b-10a8-4d4c-adc9-266678c
 4044 ?        Ssl    1:53 /usr/bin/transmission-daemon -g /home/shiki_no_koibito/.config/transmission-daemon
 5126 ?        Z      0:00 [chromium] <defunct>
 5893 ?        Sl     0:21 /usr/lib/chromium/chromium --type=plugin --plugin-path=/usr/lib/mozilla/plugins/libflashplayer.so --lang=en-US --channel=1642.0xa15b
 5992 ?        SLl    0:12 kopete
 6011 ?        Sl     0:00 googletalk-call
 6035 ?        S      0:00 kdeinit4: kio_http [kdein e
 6095 ?        S      0:00 [kworker/0:1]
 6104 ?        Sl     2:38 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBac
 6165 ?        S      0:00 [kworker/1:1]
 6218 ?        S      0:00 [kworker/u:0]
 6276 ?        S      0:00 [kworker/0:3]
 6278 pts/2    Ss     0:00 /bin/bash
 6305 ?        S      0:00 [kworker/1:0]
 6416 ?        S      0:00 [kworker/0:2]
 6429 ?        SNl    0:01 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBac
 6455 ?        S      0:00 [kworker/1:2]
 6520 ?        Ssl    0:00 /usr/bin/python2 /usr/bin/blueman-applet
 6527 ?        S      0:00 /usr/bin/obex-data-server --no-daemon 
 6532 ?        S<     0:00 [krfcommd]
 6540 ?        S      0:00 udevd --daemon
 6550 ?        S<     0:00 [hci0]
 6563 ?        S      0:00 udevd --daemon
 6641 ?        Sl     0:00 /usr/lib/chromium/chromium --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBac
 6651 ?        S      0:00 [kworker/0:0]
 6652 pts/2    R+     0:00 ps ax

which one is the relevant item?

==edit==

pkill'd udisks-daemon, and attached but not mounted devices show up no more in file open box
the next is how to disable udisks-daemon completely, it's not controlled by rc.conf and doesn't have rc.d startup script

Last edited by ShionjiYuuko (2011-09-25 00:34:42)


始まりの荒野を独り もう歩き出してるらしい、僕は灰になるまで僕で有り続けたい
http://about.me/nnhnkn | http://identi.ca/nnhzkn

Offline

#4 2011-09-25 00:47:50

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Completely Disable USB/Removable Media Automount

Perhaps you can just remove the udisks package and whatever depends on it  - you said it didn't happen before you installed KDE.

Otherwise, you could try stopping it from starting with "chmod -x /usr/lib/udisks/udisks-daemon".

Last edited by lucke (2011-09-25 00:49:56)

Offline

#5 2011-09-25 04:19:44

ShionjiYuuko
Member
Registered: 2011-07-31
Posts: 67

Re: Completely Disable USB/Removable Media Automount

I'll try the second, since I still use many KDE apps


始まりの荒野を独り もう歩き出してるらしい、僕は灰になるまで僕で有り続けたい
http://about.me/nnhnkn | http://identi.ca/nnhzkn

Offline

Board footer

Powered by FluxBB