插入usb時不要跳出視窗 [論壇 - Ubuntu基本設定]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



插入usb時不要跳出視窗
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4816
EXP: 84
離線
Dear all,

跟這位網友有同樣的問題,想請問內文說的設定
在ubuntu 16.04(英文版)的哪裡?
https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=flat&order=ASC&topic_id=4430&forum=4

謝謝

2017/4/12 16:26
應用擴展 工具箱
回覆: 插入usb時不要跳出視窗
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30282
EXP: 23
離線
ubuntu_net2016 寫到:
Dear all,

跟這位網友有同樣的問題,想請問內文說的設定
在ubuntu 16.04(英文版)的哪裡?
https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=flat&order=ASC&topic_id=4430&forum=4

謝謝


這一段的機制,我也不清楚,以下剛測試的結果,提供參考

我的系統是「Xubuntu 16.04 amd64 英文界面」,

關於「Removeable Drives and Media (管理可移除裝置與媒體的設定值)」

是「thunar-volman-settings」這個指令。

不過我猜這應該是for 「thunar」這個「File Manager」在使用的,我尚未深究,不確定。

在「Ubuntu」的「File Manager」應該是「GNOME Files (Nautilus)」。

我剛到「VitualBox」開啟「Ubuntu 16.04」Live System,

到右上方有一個設定的圖示,按下,會出現下拉選單,選「System Settings」,

就會出現一個設定視窗「System Settings」,也可以執行「$ unity-control-center」,就會出現這個設定視窗。

然後在下面有一個「System」區塊,可以看到一個「Details」圖示,(我的是在左方算來第二個圖示)。

點下去後,會出現另一個畫面,也可以執行「$ unity-control-center info」,就會出現這個設定視窗。

有四個頁籤,在第三個「Removeable Media」,您再研究看看是不是有選項可以設定,

我沒測試,這部份就留給您自行確認了。

另外一提,剛用「never prompt or start programs on media insertion」當關鍵字找尋,
找到「這篇文章」,有上面提到的「設定視窗的圖片」。

================================================================================

以下只是暫記剛剛測試的結果,可以忽略。

我的系統是「Xubuntu 16.04 amd64 英文界面」,

關於「Removeable Drivers and Medias (管理可移除裝置與媒體的設定值)」

是「thunar-volman-settings」這個指令。

執行


$ whereis thunar-volman-settings



顯示


thunar-volman-settings: /usr/bin/thunar-volman-settings /usr/share/man/man1/thunar-volman-settings.1.gz



執行


$ dpkg -S /usr/bin/thunar-volman-settings



顯示


thunar-volman: /usr/bin/thunar-volman-settings



表示「/usr/bin/thunar-volman-settings」是屬於「thunar-volman」這個套件

執行


$ apt-cache show thunar-volman



顯示


Package: thunar-volman
Priority: optional
Section: universe/x11
Installed-Size: 1137
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>
Architecture: amd64
Version: 0.8.1-2
Depends: libc6 (>= 2.4), libexo-1-0 (>= 0.5.0), libglib2.0-0 (>= 2.37.3), libgtk2.0-0 (>= 2.14.0), libgudev-1.0-0 (>= 146), libnotify4 (>= 0.7.0), libpango-1.0-0 (>= 1.14.0), libxfce4ui-1-0 (>= 4.11.1), libxfce4util7 (>= 4.9.0), libxfconf-0-2 (>= 4.6.0), thunar (>= 1.1.1), exo-utils
Filename: pool/universe/t/thunar-volman/thunar-volman_0.8.1-2_amd64.deb
Size: 114368
MD5sum: efd0626455d3e33e4bb2365f7a7036cf
SHA1: 0aefe6ddff560cbad350f594aba4b2cdcf4fceae
SHA256: 25b7cac54c4abb660353bb2cd52809f83a4c0147780f7a72f303b66ab1d21dd7
Description-en: Thunar extension for volumes management
The Thunar Volume Manager is an extension for the Thunar file manager, which
enables automatic management of removable drives and media.

Description-md5: bf00f71962d5cf45709fae3389409774
Homepage: http://goodies.xfce.org/projects/thunar-plugins/thunar-volman
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
Task: xubuntu-core, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, ubuntustudio-desktop-core, ubuntustudio-desktop



執行


$ apt-cache search 'Volume Manager'



顯示


lvm2 - Linux Logical Volume Manager
collectd-core - statistics collection and monitoring daemon (core system)
kvpm - Logical volume manager and disk partitioner GUI based on KDE
kvpm-dbg - kvpm's debugging symbols
libvslvm-dbg - Linux LVM volume system format access library -- debug symbols
libvslvm-dev - Linux LVM volume system format access library -- development files
libvslvm-utils - Linux LVM volume system format access library -- Utilities
libvslvm1 - Linux LVM volume system format access library
python-libvslvm - Linux LVM volume system format access library -- Python 2 bindings
python3-libvslvm - Linux LVM volume system format access library -- Python 3 bindings
system-storage-manager - system storage management tool
testdisk - Partition scanner and disk recovery tool, and PhotoRec file recovery tool
thunar-volman - Thunar extension for volumes management
zfs-dkms - Native OpenZFS filesystem kernel modules for Linux



執行


$ dpkg -l '*gnome*'



================================================================================

在「Xubuntu 16.04 amd64 英文界面」

執行下面指令,下載「thunar-volman」的「Source Package


$ apt-get source thunar-volman




然後執行 (註:下面'Removable Storage' 可以從執行「thunar-volman-settings」的第一個頁籤找到)


$ grep 'Removable Storage' thunar-volman-0.8.1/* -R -n



顯示


...略...
thunar-volman-0.8.1/po/zh_TW.po:365:msgid "Removable Storage"
...略...
thunar-volman-0.8.1/thunar-volman-settings/tvm-preferences-dialog.c:141: label = gtk_label_new (_("Removable Storage"));


然後觀看「thunar-volman-0.8.1/thunar-volman-settings/tvm-preferences-dialog.c」這個檔案,可以找到一些線索。


執行


$ grep 'enabled' thunar-volman-0.8.1/thunar-volman-settings/tvm-preferences-dialog.c -n



顯示


160: xfconf_g_property_bind (channel, "/automount-drives/enabled", G_TYPE_BOOLEAN,
168: xfconf_g_property_bind (channel, "/automount-media/enabled", G_TYPE_BOOLEAN,
176: xfconf_g_property_bind (channel, "/autobrowse/enabled", G_TYPE_BOOLEAN,
184: xfconf_g_property_bind (channel, "/autorun/enabled", G_TYPE_BOOLEAN, button, "active");
191: xfconf_g_property_bind (channel, "/autoopen/enabled", G_TYPE_BOOLEAN, button, "active");
220: xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN,
230: xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN,
240: xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN,
284: xfconf_g_property_bind (channel, "/autoplay-audio-cds/enabled", G_TYPE_BOOLEAN,
291: xfconf_g_property_bind (channel, "/autoplay-audio-cds/enabled", G_TYPE_BOOLEAN,
323: xfconf_g_property_bind (channel, "/autoplay-video-cds/enabled", G_TYPE_BOOLEAN,
330: xfconf_g_property_bind (channel, "/autoplay-video-cds/enabled", G_TYPE_BOOLEAN,
361: xfconf_g_property_bind (channel, "/autoipod/enabled", G_TYPE_BOOLEAN,
368: xfconf_g_property_bind (channel, "/autoipod/enabled", G_TYPE_BOOLEAN,
409: xfconf_g_property_bind (channel, "/autophoto/enabled", G_TYPE_BOOLEAN,
416: xfconf_g_property_bind (channel, "/autophoto/enabled", G_TYPE_BOOLEAN,
460: xfconf_g_property_bind (channel, "/autopalm/enabled", G_TYPE_BOOLEAN,
467: xfconf_g_property_bind (channel, "/autopalm/enabled", G_TYPE_BOOLEAN,
499: xfconf_g_property_bind (channel, "/autopocketpc/enabled", G_TYPE_BOOLEAN,
506: xfconf_g_property_bind (channel, "/autopocketpc/enabled", G_TYPE_BOOLEAN,
547: xfconf_g_property_bind (channel, "/autoprinter/enabled", G_TYPE_BOOLEAN,
554: xfconf_g_property_bind (channel, "/autoprinter/enabled", G_TYPE_BOOLEAN,
595: xfconf_g_property_bind (channel, "/autokeyboard/enabled", G_TYPE_BOOLEAN,
602: xfconf_g_property_bind (channel, "/autokeyboard/enabled", G_TYPE_BOOLEAN,
634: xfconf_g_property_bind (channel, "/automouse/enabled", G_TYPE_BOOLEAN,
641: xfconf_g_property_bind (channel, "/automouse/enabled", G_TYPE_BOOLEAN,
673: xfconf_g_property_bind (channel, "/autotablet/enabled", G_TYPE_BOOLEAN,
680: xfconf_g_property_bind (channel, "/autotablet/enabled", G_TYPE_BOOLEAN,



這些可以對照下面會提到的操作步驟。

================================================================================

在「Xubuntu 16.04 amd64 英文界面」

執行


$ xfconf-query -h



顯示


Usage:
  xfconf-query [OPTION...] - Xfconf commandline utility

Help Options:
  -h, --help            Show help options

Application Options:
  -V, --version         Version information
  -c, --channel         The channel to query/modify
  -p, --property        The property to query/modify
  -s, --set             The new value to set for the property
  -l, --list            List properties (or channels if -c is not specified)
  -v, --verbose         Verbose output
  -n, --create          Create a new property if it does not already exist
  -t, --type            Specify the property value type
  -r, --reset           Reset property
  -R, --recursive       Recursive (use with -r)
  -a, --force-array     Force array even if only one element
  -T, --toggle          Invert an existing boolean property
  -m, --monitor         Monitor a channel for property changes




執行


$ xfconf-query



顯示


Channels:
  xfprint
  xfce4-notifyd
  xsettings
  xfce4-settings-editor
  displays
  xfce4-desktop
  keyboards
  thunar
  parole
  xfce4-panel
  ristretto
  xfce4-keyboard-shortcuts
  xfce4-settings-manager
  thunar-volman
  xfce4-appfinder
  xfce4-power-manager
  xfwm4
  xfce4-session



執行


$ xfconf-query -c thunar-volman -l



顯示


/autobrowse/enabled
/autoburn/audio-cd-command
/autoburn/data-cd-command
/autoburn/enabled
/autoipod/enabled
/autokeyboard/enabled
/automount-drives/enabled
/automount-media/enabled
/automouse/enabled
/autoopen/enabled
/autophoto/enabled
/autoplay-audio-cds/command
/autoplay-audio-cds/enabled
/autoplay-video-cds/command
/autoplay-video-cds/enabled
/autoprinter/enabled
/autorun/enabled
/autotablet/enabled



執行


$ xfconf-query -c thunar-volman -p /automount-media/enabled



顯示


true



執行


$ xfconf-query -c thunar-volman -p /automount-media/enabled -s false





執行


$ xfconf-query -c thunar-volman -p /automount-media/enabled



顯示


false



執行下面指令,還原預設值


$ xfconf-query -c thunar-volman -p /automount-media/enabled -r




================================================================================


以上提供參考

報告完畢


2017/4/13 14:51
應用擴展 工具箱
回覆: 插入usb時不要跳出視窗
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4816
EXP: 84
離線
Hi samwhelp,

謝謝,先回復測試結果
我通通設成do nothing也沒用Orz
有空我在繼續google一下

2017/4/13 15:18
應用擴展 工具箱
回覆: 插入usb時不要跳出視窗
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30282
EXP: 23
離線
剛用「ubuntu usb disable automount」,

找到「這篇」和「這篇」和「這篇」。


執行


$ gsettings list-recursively | grep org.gnome.desktop.media



顯示


org.gnome.desktop.media-handling automount-open true
org.gnome.desktop.media-handling automount true
org.gnome.desktop.media-handling autorun-x-content-start-app ['x-content/unix-software']
org.gnome.desktop.media-handling autorun-never false
org.gnome.desktop.media-handling autorun-x-content-ignore @as []
org.gnome.desktop.media-handling autorun-x-content-open-folder @as []



我不確定是不是「org.gnome.desktop.media-handling automount-open」這個參數,再請您測試確認一下,

我剛在上面找到的「第二篇」,
也就是「Ubuntu Community Help Wiki / Mount USB」這篇。

找到一段說明。



Another key, org.gnome.desktop.media-handling.automount-open, controls whether to automatically open a folder for automounted media.

If set to true, Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead. This can be configured as shown below.



不過還是要請您實際測試,確認一下,確認是否適用您目前使用的版本,感恩

以下是「gsettings」指令的操作參考,
您也可以改用「dconf-editor」這個圖形界面工具來操作,

之前一些「gsettings」的討論案例,我紀錄在「[索引] 泛Ubuntu 安裝調校」的下方「## gsettings and dconf」。


執行下面指令,觀看「org.gnome.desktop.media-handling automount-open」目前的設定值。


$ gsettings get org.gnome.desktop.media-handling automount-open



顯示


true



執行下面指令,設定「org.gnome.desktop.media-handling automount-open」的設定值,設定為「false」。


$ gsettings set org.gnome.desktop.media-handling automount-open false



執行下面指令,觀看「org.gnome.desktop.media-handling automount-open」目前的設定值。


$ gsettings get org.gnome.desktop.media-handling automount-open



顯示


false




執行下面指令,恢復「org.gnome.desktop.media-handling automount-open」的預設值。


$ gsettings reset org.gnome.desktop.media-handling automount-open



執行下面指令,觀看「org.gnome.desktop.media-handling automount-open」目前的設定值。


$ gsettings get org.gnome.desktop.media-handling automount-open



顯示


true


2017/4/13 15:54
應用擴展 工具箱
回覆: 插入usb時不要跳出視窗
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4816
EXP: 84
離線
samwhelp

非常感謝您的幫忙,使用了
gsettings set org.gnome.desktop.media-handling automount-open false

插入USB後就不會自動跳出了,真的是解決我這困擾許久的問題
再次感謝

執行環境
ubuntu unity 16.04 lts 32bit
use user :root

最後真的想小抱怨一下linux桌面環境的一個問題
就是很多設定在系統設定都沒有gui,不是要靠第三方軟體就是查詢該設定檔,以使用上真的不是很合理
如果是一些危險的參數就算了,連這些小設定都沒有就不應該了
而且我覺得這問題好像不是很被重視 冏rz

2017/4/27 15:14
應用擴展 工具箱
回覆: 插入usb時不要跳出視窗
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30282
EXP: 23
離線
ubuntu_net2016 寫到:
samwhelp

非常感謝您的幫忙,使用了
gsettings set org.gnome.desktop.media-handling automount-open false

插入USB後就不會自動跳出了,真的是解決我這困擾許久的問題
再次感謝

執行環境
ubuntu unity 16.04 lts 32bit
use user :root

最後真的想小抱怨一下linux桌面環境的一個問題
就是很多設定在系統設定都沒有gui,不是要靠第三方軟體就是查詢該設定檔,以使用上真的不是很合理
如果是一些危險的參數就算了,連這些小設定都沒有就不應該了
而且我覺得這問題好像不是很被重視 冏rz



可以參考最近看到的這篇「Ubuntu放棄戰鬥, Linux桌面的悲哀」,下面提到關於GNOME的部份,
這個連結有紀錄在另一個「討論串」。

最近看某個API就有這樣的感覺,後來又看到那篇,呼應了我這樣的感覺。
還有看到這個論壇的一些發問提到狀況(像是您這篇),實際去測試,慢慢就會有這樣的感覺。

我也不曉得這樣的變動模式什麼時候才能穩定下來,
變動應該是不會停,不過穩定應該可以追求,
在這之前,可以選擇自救,瞭解一些基本的原理概念,見招拆招,Orz...
這是比較有機會可以達成的選項。


#!/usr/bin/env python3

from gi.repository import Gio

settings = Gio.Settings("org.gnome.desktop.media-handling")

print(settings)

automount_open = settings.get_boolean("automount-open")

print(automount_open)

settings.set_boolean("automount-open", False)

automount_open = settings.get_boolean("automount-open")

print(automount_open)

settings.reset("automount-open")

automount_open = settings.get_boolean("automount-open")

print(automount_open)





## 暫記連結

* http://python-gtk-3-tutorial.readthedocs.io/en/latest/introduction.html
* https://lazka.github.io/pgi-docs/#Gio-2.0/classes/Settings.html
* https://lazka.github.io/pgi-docs/#Gio-2.0/classes/SettingsSchemaSource.html
* https://lazka.github.io/pgi-docs/#Gio-2.0/classes/SettingsSchemaKey.html
* https://github.com/GNOME/gnome-tweak-tool/blob/master/gtweak/gsettings.py
* https://github.com/freyja-dev/unity-tweak-tool/blob/master/UnityTweakTool/section/spaghetti/gsettings.py

==========================================================

就好像我最近「這篇」提的

應該回過頭來問自己,
使用這些軟體,原本是要達到什麼目標?這些軟體是否符合您的需求?

不然感覺就會陷入「這篇」和「這篇」講的一樣的情境。

==========================================================

我目前使用「Xubuntu 16.04 amd64 (XFCE)」,
一些設定有「GUI」設定的方式,也有「CLI」的方式。
大部分還能輕易找到設定的地方,雖然我平時很少去設定它。
我的使用情境,安裝系統初期設定好,就比較少再去更動一些系統設定了,
我漸漸趨向不太想折騰了


xfconf-query 相關的討論

* #3 回覆: 請教一個弱弱的問題,為什麼有些ubuntu的C code有"C"的圖示
* http://hyperrate.com/thread.php?tid=33431#33431


關於

ubuntu_net2016 寫到:

...略...

插入USB後就不會自動跳出了,真的是解決我這困擾許久的問題

...略...

執行環境
ubuntu unity 16.04 lts 32bit
use user :root

最後真的想小抱怨一下linux桌面環境的一個問題
就是很多設定在系統設定都沒有gui,不是要靠第三方軟體就是查詢該設定檔,以使用上真的不是很合理
如果是一些危險的參數就算了,連這些小設定都沒有就不應該了
而且我覺得這問題好像不是很被重視 冏rz


建議可以嘗試其他的發行版,或是桌面環境,可以確認看看是否符合您的操作習慣,

例如您的案例,在「Xubuntu 16.04」是有GUI程式可以設定的,我在上面的「回覆#2」有提到。

當然不一定要選擇「Xubuntu」,只是我剛好目前用的是「Xubuntu」有測過,

只是想到,還有其他現成的方案可以去嘗試,去評估,來做選擇。

我在「[索引] 泛Ubuntu 安裝調校」,有列「UbuntuFlavors

再不然就要到「distrowatch」去找其它的了。

當然也有可能,您也已經嘗試過其它的了,評估過了,您有自己的考量,
這樣的話,就不用理會我剛剛說的了。

==========================================================

另外我通常都使用「新同文堂」來做「繁簡轉換」來看網頁

==========================================================

以上提供參考


2017/4/27 16:01
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.