論壇 - 查看所有帖子

無法打開終端機 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員一級
![]() ![]() 註冊日期:
1/29 11:41:00 所屬群組:
已註冊使用者 等級: 1
HP : 0 / 0
![]() |
你好
我的環境是在WIN10下的VIRTUAL BOX安裝 ubuntu-22.04.1-desktop-amd64 配給它2個CPU和8G的RAM 500G硬碟 UBUNTU的22板本裝了幾次 每次都無法打開它APP中的終端機 這圖型介面都是跑一下就不打開 有裝PYCHARM 它的內建終端機就沒問題 只是要裝其它東西就不行 有建議的軟體可以取代嗎? 沒文字介面下怎麼安裝? LINUX的記憶還停留在10年前吧 現在希望有比較好搞了 有找到KONSOLE可以解決了 因為沒法刪除該文 請管理者處理吧
Ident: 73e4d85743f639cfc4c675a76d909dcb |
2/1 14:59:34
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
版主
![]() ![]() 註冊日期:
2008/7/14 0:03 來自 螢幕的另一端
所屬群組:
網站管理員 已註冊使用者 討論區管理群 等級: 33
HP : 0 / 808
![]() |
謝謝,你回覆的內容太多了,一下看不完,先存起來之後慢慢看。
Ident: fa978e16518955d35d696e4c7f81e09b |
1/28 20:35:56
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 注意事項 ================================================================================ ## 「.」 or 「/」 在「#25」 提到的「/usr/share/glib-2.0/schemas/」裡面副檔名是「gschema.override」的檔案 舉例內容如下 [org.mate.background] picture-filename='/usr/share/backgrounds/default.jpg' > 關於「[org.mate.background]」,分隔的是用「.」 ---------------------------------------- 對照「#27」和「#28」 在「dconf」的「db」採用的「plain text keyfile」 舉例內容如下 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/default.jpg' > 關於「[org/mate/desktop/background]」,分隔的是用「/」 ================================================================================ ## path * /usr/share/glib-2.0/schemas/org.mate.background.gschema.xml 執行
顯示 <schema id="org.mate.background" path="/org/mate/desktop/background/"> ---------------------------------------- 在「gsettings」的操作範例
也就是「org.mate.background」上面的「id="org.mate.background"」。 ---------------------------------------- 在「dconf」的操作範例
也就是「/org/mate/desktop/background/」上面的「path="/org/mate/desktop/background/"」。 ================================================================================ 關於「dconf」和「gsettings」相關的議題, 大致上我想要表達的,應該都表達完了, 所以寫到這,暫告一段落。 ================================================================================ 以上提供參考 報告完畢 ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 19:57:36
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 如何產生一個空的「dconf db」 ================================================================================ ## Manpage * man 1 dconf ================================================================================ 執行
顯示 Usage: dconf compile OUTPUT KEYFILEDIR Compile a binary database from keyfiles Arguments: OUTPUT The filename of the (binary) output KEYFILEDIR The path to the .d directory containing keyfiles ================================================================================ 先產生一個空的資料夾「demo.d」。
================================================================================ 執行下面指令
就會產生「demo」這個空的「dconf db」。 ---------------------------------------- 執行下面指令
顯示
================================================================================ 對照「#28」, 只要在「demo.d」這個資料夾,放置「plain text keyfile」, 接著再度執行「dconf compile demo demo.d」,資料就會被「compile」到「demo」這個檔案。 ================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 19:15:12
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 如何設定「dconf」的「預設值」 ================================================================================ 執行下面指令,先產生資料夾「/etc/dconf/db/distro.d」
================================================================================ 延續「#27」 修改「/etc/dconf/profile/user」這個檔案的內容, 內容如下
---------------------------------------- 接著執行下面指令
就會產生「/etc/dconf/db/distro」, 這個檔案的格式,就跟「~/.config/user」是一樣的, 就是「dconf」的「db」。 接著執行下面指令
顯示
上面「/etc/dconf/profile/user」這個檔案內容的第二行「system-db:distro」, 指的就是「/etc/dconf/db/distro」這個檔案。 ================================================================================ 接著要來新增資料到「/etc/dconf/db/distro」這個「資料庫」。 產生一個檔案「/etc/dconf/db/distro.d/demo.conf」, 內容如下 [org/demo/code] message="hello" 接著執行下面指令,才會生效
也就是「/etc/dconf/db/distro.d/demo.conf」的內容, 會被「compile」到「/etc/dconf/db/distro」這個檔案。 執行下面指令
顯示的內容,其中會有紅色內容的「message」。 ================================================================================ 執行下面指令,讀取「/org/demo/code/message」的值,
顯示
================================================================================ 執行下面指令,寫入「/org/demo/code/message」的值,
---------------------------------------- 執行下面指令,讀取「/org/demo/code/message」的值,
顯示
---------------------------------------- 執行下面指令
顯示的內容,其中會有紅色內容的「hello」。 ---------------------------------------- 執行下面指令
顯示的內容,其中會有紅色內容的「beautiful-world」。 ---------------------------------------- ## 小結 > 也就是「dconf write」會寫入到「~/.config/dconf/user」這個檔案,並不會更動「/etc/dconf/db/distro」這個檔案 > 只有執行「sudo dconf update」,才會更動「/etc/dconf/db/distro」這個檔案。 > 根據的就是「/etc/dconf/profile/user」這個檔案的內容設定 內容如下
上面有效的第一行「user-db:user」,指的就是「~/.config/dconf/user」這個檔案,是可寫入的 上面有效的第二行「system-db:distro」,指的就是「/etc/dconf/db/distro」這個檔案, ================================================================================ 執行下面指令,觀看「dconf read」的用法
顯示 Usage: dconf read [-d] KEY Read the value of a key. -d to read default values. Arguments: KEY A key path (starting, but not ending with '/') ---------------------------------------- 執行下面指令,讀取「/org/demo/code/message」的「設定值」,
顯示
---------------------------------------- 執行下面指令,讀取「/org/demo/code/message」的「預設值」,
顯示
================================================================================ 我們也可以設定多個「預設值查找db」 設定「/etc/dconf/profile/user」這個檔案的內容 內容如下
> 有效的第一行是「user-db:user」,也就是「~/.config/dconf/user」是「可寫入的」 ---------------------------------------- 記得要先準備資料夾 * /etc/dconf/db/local.d * /etc/dconf/db/site.d * /etc/dconf/db/distro.d
---------------------------------------- 接著執行
就會產生下面三個檔案 * /etc/dconf/db/local * /etc/dconf/db/site * /etc/dconf/db/distro ---------------------------------------- | profile 設定 | db | 取值「查找順序」 | | ----------------- | ---------------------- | ----------------------------- | | user-db:user | ~/.config/dconf/user | 「設定值」 | | system-db:local | /etc/dconf/db/local | 「預設值 1」 | | system-db:site | /etc/dconf/db/site | 「預設值 2」 | | system-db:distro | /etc/dconf/db/site | 「預設值 3」 | ================================================================================ 也可以設定「/etc/dconf/profile/user」這個檔案的內容 內容如下
---------------------------------------- | profile 設定 | db | 取值「查找順序」 | | ------------------------ | ---------------------- | ----------------------------- | | service-db:keyfile/user | ~/.config/dconf/user | 「設定值」 | | user-db:user | ~/.config/dconf/user | 「預設值 1」 | | system-db:local | /etc/dconf/db/local | 「預設值 2」 | | system-db:site | /etc/dconf/db/site | 「預設值 3」 | | system-db:distro | /etc/dconf/db/site | 「預設值 4」 | > 在「/etc/dconf/profile/user」這個檔案的內容 > 有效的第一行是「service-db:keyfile/user」,也就是「~/.config/dconf/user.txt」是「可寫入的」 > 請搭配閱讀「man 7 dconf」的「profiles」那個章節。 其中有一段說明,摘錄如下
================================================================================ ## 應用 在「#11」,有提到一種「Gsettings / Relocatable schemas」, 當遇到「Relocatable schemas」,目前我還無法找到直接寫在「gschema.override (Vendor overrides)」的寫法。 所以就改採用這個方式, 會使用到的案例,有「custom-keybind」和「gnome-termina」的設定, 它們都有用到「Relocatable schemas」。 請參考我的實作案例 ## System Modeling * /etc/dconf/profile/user * /etc/dconf/db/distro.d/ ## Arch Packaging * ezarcher-adjustment-modeling-dconf-default-user-db-initialization * ezarcher-adjustment-modeling-gnome-terminal * ezarcher-adjustment-modeling-mate-terminal * ezarcher-adjustment-modeling-gnome-shell-keybind-custom-by-dconf-db-default * ezarcher-adjustment-modeling-mate-keybind-custom-by-dconf-db-default * ezarcher-adjustment-modeling-cinnamon-keybind-custom-by-dconf-db-default ================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 13:26:41
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 如何設定「dconf」的「db」採用「plain text keyfile」的格式 ================================================================================ 接下來要介紹進階的議題, 可以搭配閱讀「$ man 7 dconf」來了解相關的概念。 ================================================================================ 執行下面指令,準備「/etc/dconf/profile/」這個資料夾
================================================================================ 接著產生一個檔案「/etc/dconf/profile/user」 內容如下
> 原本系統上,預設並沒有「/etc/dconf/profile/user」這個檔案, > 上面那行「user-db:user」,就是等同沒有這個檔案時的預設設定。 > 意思就是會採用「~/.config/dconf/user」這個檔案,當作「可寫入」的「db」。 > 可以搭配閱讀「man 7 dconf」的「profiles」那個章節。 ================================================================================ 在「#22」,有提到「~/.config/dconf/user」是「被compile過的」 接著,我們要修改「/etc/dconf/profile/user」這個檔案的內容, 內容如下
> 上面那行「service-db:keyfile/user」, > 意思就是會採用「~/.config/dconf/user.txt」這個檔案,當作「可寫入」的「db」,並且是「plain text keyfile」的格式 ================================================================================ 接下來就可以來做測試 執行下面指令,將「org.mate.background picture-filename」設定為「/usr/share/backgrounds/mate/desktop/Float-into-MATE.png」
---------------------------------------- 執行下面指令,將設定匯出觀看
顯示 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/mate/desktop/Float-into-MATE.png' ---------------------------------------- 執行下面指令,直接觀看「~/.config/dconf/user.txt」這個檔案的內容
顯示 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/mate/desktop/Float-into-MATE.png' ================================================================================ 也可以直接透過「dconf」來設定, 執行下面指令,將「/org/mate/desktop/background/picture-filename」設定為「/usr/share/backgrounds/mate/desktop/Float-into-MATE.png」
---------------------------------------- 執行下面指令,直接觀看「~/.config/dconf/user.txt」這個檔案的內容
顯示 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/ubuntu-mate-photos/gabriele-diwald-201135.jpg' ---------------------------------------- 執行下面指令,將設定匯出觀看
顯示 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/ubuntu-mate-photos/gabriele-diwald-201135.jpg' ---------------------------------------- 透過「dconf」來讀取「/org/mate/desktop/background/picture-filename」的「設定值」 執行下面指令
顯示 '/usr/share/backgrounds/ubuntu-mate-photos/gabriele-diwald-201135.jpg' ---------------------------------------- 透過「gsettings」來讀取「org.mate.background picture-filename」的「設定值」 執行下面指令
顯示 '/usr/share/backgrounds/ubuntu-mate-photos/gabriele-diwald-201135.jpg' ================================================================================ 接著來測試直接修改「~/.config/dconf/user.txt」這個檔案的內容 內容如下 [org/mate/desktop/background] picture-filename='/usr/share/backgrounds/ubuntu-mate-photos/nasa-53884.jpg' ---------------------------------------- 透過「dconf」來讀取「/org/mate/desktop/background/picture-filename」的「設定值」 執行下面指令
顯示 '/usr/share/backgrounds/ubuntu-mate-photos/nasa-53884.jpg' ---------------------------------------- 透過「gsettings」來讀取「org.mate.background picture-filename」的「設定值」 執行下面指令
顯示 '/usr/share/backgrounds/ubuntu-mate-photos/nasa-53884.jpg' ================================================================================ ## Wallpaper Package * ubuntu-mate-wallpapers-photos / filelist ================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 11:28:25
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 再次探討「~/.config/dconf/user」這個檔案 ================================================================================ 在前面「#22」,我有提到下面這個論點 * 關於「dconf」,只要跟「預設值」不同的「設定值」,就會紀錄在「~/.config/dconf/user」這個檔案,這個檔是「被compile過的」。 我們來做個小實驗,驗證這個論點 ================================================================================ ## 備份 在做實驗前,先執行下面指令,先將「~/.config/dconf/user」這個檔案備份
================================================================================ 先執行下面指令,將「org.mate.background picture-filename」的「設定值」恢復成「預設值」
---------------------------------------- 接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
---------------------------------------- 接著執行下面指令,
應該是沒有任何顯示,會直接顯示下一個「命令提示字元」 ---------------------------------------- 接著執行下面指令,將它設定成其他的值 執行下面指令,將「org.mate.background picture-filename」設定為「/usr/share/backgrounds/mate/desktop/Float-into-MATE.png」
---------------------------------------- 接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
---------------------------------------- 接著執行下面指令,
顯示
---------------------------------------- 接著執行下面指令,
應該會看到一些內容,其中「picture-filename」是紅色的字樣 ================================================================================ 今天先介紹到這,後面還有一些進階的議題要表達,太晚所以先睡了 ================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 1:55:30
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 關於「gschema.override」的用途 ================================================================================ ## 放置資料夾 * /usr/share/glib-2.0/schemas/ 在「/usr/share/glib-2.0/schemas/」除了有放置副檔名是「gschema.xml」的檔案 還會看到另一種副檔名是「gschema.override」的檔案 副檔名是「gschema.override」的檔案,是用來讓我們自己定義自己的「預設值」 (Vendor overrides), 也就是在「compile」後,會採用「gschema.override」裡面的設定,當作「預設值」。 ================================================================================ 沿用前面「#24」的例子, 執行下面指令
顯示 <key name="picture-filename" type="s"> <default>'${prefix}/share/backgrounds/mate/desktop/Stripes.png'</default> <summary>Picture Filename</summary> <description>File to use for the background image.</description> </key> 可以看到在「/usr/share/glib-2.0/schemas/org.mate.background.gschema.xml」 定義「org.mate.background picture-filename」的預設值為「${prefix}/share/backgrounds/mate/desktop/Stripes.png」 ================================================================================ 接著來做個小實驗。 ================================================================================ 先執行下面指令,將「org.mate.background picture-filename」的「設定值」恢復成「預設值」
接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
================================================================================ 產生一個檔案「/usr/share/glib-2.0/schemas/distro.gschema.override」, > 主檔名可以任意取,只要副檔名是「gschema.override」即可。 內容如下 [org.mate.background] picture-filename='/usr/share/backgrounds/default.jpg' 同樣地,要記得要執行「sudo glib-compile-schemas /usr/share/glib-2.0/schemas/」才會生效。 ================================================================================ 接著,可以執行下面指令,來觀察剛剛的設定是否有生效 也就是執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
================================================================================ 接著繼續確認,將它設定成其他的值 執行下面指令,將「org.mate.background picture-filename」設定為「/usr/share/backgrounds/mate/desktop/Float-into-MATE.png」
---------------------------------------- 接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
---------------------------------------- 執行下面指令,將「org.mate.background picture-filename」的「設定值」恢復成「預設值」
---------------------------------------- 接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 1:49:00
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 關於「gschema.xml」的用途 ================================================================================ ## 放置資料夾 * /usr/share/glib-2.0/schemas/ 在「/usr/share/glib-2.0/schemas/」有放置一些定義檔案,副檔名是「gschema.xml」。 這些檔案,就是用來定義「key」和「default value」等等。 ================================================================================ 執行下面指令, 觀看「/usr/share/glib-2.0/schemas/」這個資料夾, 有放置那些副檔名是「gschema.xml」的檔案
================================================================================ 您可以自己作個小實驗, 產生一個檔案「/usr/share/glib-2.0/schemas/demo.gschema.xml」 模仿這些檔案的寫法, 然後記得要執行「sudo glib-compile-schemas /usr/share/glib-2.0/schemas/」才會生效。 就會將結果儲存在「/usr/share/glib-2.0/schemas/gschemas.compiled」這個檔案 ================================================================================ 執行
顯示
================================================================================ 對照「#23」的例子, 執行
或是執行
顯示 /usr/share/glib-2.0/schemas/org.mate.background.gschema.xml: <key name="picture-filename" type="s"> 也就是前面操作的「org.mate.background picture-filename」的定義, 可以在「/usr/share/glib-2.0/schemas/org.mate.background.gschema.xml」這個檔案找到。 ================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 1:41:21
|
||||||||||
![]() |
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 36
HP : 179 / 898
![]() |
================================================================================
[回到索引] ================================================================================ # 簡易介紹「gsettings」這個指令的用法 ================================================================================ 以下我們先重頭介紹起, 先簡單介紹「gsettings」這個指令的用法。 先以「更改桌面圖片」這個設定,當作說明主軸的範例。 ================================================================================ ## Manpage * man gettings ================================================================================ ## list-recursively 執行下面指令,
會顯示很多內容 ================================================================================ 執行下面指令,搭配分頁程式「less」來觀看
================================================================================ 執行下面指令,搭配「grep」過濾出我們要聚焦的內容
顯示
================================================================================ ## set 執行下面指令,將「org.mate.background picture-filename」設定為「/usr/share/backgrounds/mate/desktop/Float-into-MATE.png」
================================================================================ ## get 執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
================================================================================ ## reset 執行下面指令,將「org.mate.background picture-filename」的「設定值」恢復成「預設值」
接著執行下面指令,讀取目前「org.mate.background picture-filename」的「設定值」
顯示
================================================================================ 待續... ================================================================================ [回到索引] ================================================================================
Ident: 5c71400844172447c03d6b5bedc6cc2b |
1/28 1:34:56
|
||||||||||
![]() |