【分享】適合 Ubuntu MATE 的面板布局方案 [論壇 - Ubuntu基本設定]


正在瀏覽:   1 名遊客


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

« 1 2 3 (4)


回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
版主
註冊日期:
2008/7/14 0:03
來自 螢幕的另一端
所屬群組:
網站管理員
已註冊使用者
討論區管理群
等級: 33
HP : 0 / 808
MP : 511 / 35160
EXP: 33
離線
謝謝,你回覆的內容太多了,一下看不完,先存起來之後慢慢看。

1/28 20:35:56
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 關於「mate-session / required-components」

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

在另一個「討論串 - 回覆 #12」,提到在「mate desktop」,可以更換搭配不同的「window manager」,

在前面的「回覆: #6」和「回覆: #7」,則是提到可以更換搭配不同的「dock」,

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

執行下面指令,觀看相關的設定


gsettings list-recursively | grep org.mate.session | grep required-components



類似顯示如下


org.mate.session required-components-list ['windowmanager', 'panel', 'filemanager', 'dock']
org.mate.session.required-components dock 'plank'
org.mate.session.required-components filemanager 'caja'
org.mate.session.required-components panel 'mate-panel'
org.mate.session.required-components windowmanager 'marco'




可以參考「/usr/share/glib-2.0/schemas/org.mate.session.gschema.xml」這個檔案的定義

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

## 對照討論

* gnome-session-flashback / with other wm

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

[回到索引]

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

以上補充

報告完畢


2/1 19:01:29
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 如何設定「caja」可以按下「F4」,執行「Open in Terminal」的動作

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

若您使用「caja」當作「File Manager」。

預設應該有安裝「caja-open-terminal

若沒有安裝,可以執行下面指令安裝「caja-open-terminal」的指令


sudo apt-get install caja-open-terminal




若有安裝「caja-open-terminal」,

在「caja」,滑鼠按下右鍵,

出現的選單,裡面應該會出現一個選項「Open in Terminal」。

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

修改「~/.config/caja/accels」這個檔案,

找到下面這一行


; (gtk_accel_path "<Actions>/ExtensionsMenuGroup/CajaOpenTerminal::open_terminal" "")



修改成下面這一行


(gtk_accel_path "<Actions>/ExtensionsMenuGroup/CajaOpenTerminal::open_terminal" "F4")



接著執行下面指令,關閉所有的「caja」


killall -9 caja



重起「caja」後,就可以在「caja」,在某個資料夾,按下「F4」,就等同執行「Open in Terminal」這個動作

也就是會開啟預設的「Terminal」,並且初始路徑會切換到該資料夾。

如何修改「預設採用的Terminal」,請參考我在另一篇討論串回覆的「說明」。

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

[回到索引]

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

2/2 7:07:13
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 如何設定「pluma」可以按下「F4」,執行「Open Terminal Here」的動作

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

若您使用「pluma」當作「Text Editor」。

可以開啟「External Tools」這個「Plugins」,

在「Pluma / Edit / Preferences / Plugins」,勾選「External Tools」。

接著在「Pluma / Tools / Manage External Tools... / Open terminal here」,可以編輯一個檔案的內容

這個檔案的路徑是在「~/.config/pluma/tools/open-terminal-here

檔案的內容,可修改成如下


#!/usr/bin/sh
# [Pluma Tool]
# Name=Open terminal here
# Comment=Open a terminal in the document location
# Input=nothing
# Output=output-panel
# Applicability=local
# Save-files=nothing
# Languages=
# Shortcut=F4


##
## Terminal
##

#mate-terminal --working-directory=$PLUMA_CURRENT_DOCUMENT_DIR &

#gnome-terminal --working-directory="$PLUMA_CURRENT_DOCUMENT_DIR" &

xfce4-terminal --tab --working-directory="$PLUMA_CURRENT_DOCUMENT_DIR" &

#sakura --working-directory="$PLUMA_CURRENT_DOCUMENT_DIR" &

#x-terminal-emulator --working-directory="$PLUMA_CURRENT_DOCUMENT_DIR" &




> 按鍵的設定在上面註解「Shortcut=F4」那行

> 採用的「Terminal」,可以自行選擇慣用的

> 我是採用「xfce4-terminal」,並且善用它「分頁開啟」的功能,也就是「--tab」這個參數。

> 目前還找不到「下拉式」的「Terminal」,並且有「分頁開啟」的功能,若有就太讚了。

> 而「xfce4-terminal」有「下拉式」的功能,但是我嘗試的結果,無法和「分頁開啟」的功能同時使用。

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

## 設定腳本

* pluma
* xfce4-terminal

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

## 使用指令,設定「pluma」啟用的「plugin」

### set

執行下面指令,設定「pluma」啟用的「plugin」清單


gsettings set org.mate.pluma active-plugins "['filebrowser', 'spell', 'modelines', 'externaltools', 'docinfo', 'time']"



----------------------------------------

### get

執行下面指令,觀看目前設定「pluma」啟用的「plugin」清單


gsettings get org.mate.pluma active-plugins



顯示


['filebrowser', 'spell', 'modelines', 'externaltools', 'docinfo', 'time']



----------------------------------------

### reset

執行下面指令,將目前設定「pluma」啟用的「plugin」清單,恢復成「預設值」


gsettings reset org.mate.pluma active-plugins



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

[回到索引]

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

2/2 17:43:54
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 如何切換「window manager」到「compiz」

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

延續我在另一個「討論串」提到的,

我一開始是在「Arch Linux」環境,測試「Mate + Compiz」。

以下則是在「Ubuntu MATE」和「Mint MATE」測試的心得。

我沒安裝,只是將下載下來的「ISO」放置到有「ventoy」的「USB隨身碟」,

使用該隨身碟開機,直接在「Live System」測試。

因為「Mint MATE 21.1」在我的機器,無法完整開機,到了最後的階段,就停在那了,

而「Ubuntu MATE 22.04.1」在我的機器,一樣無法完整開機,情況是一樣的,我沒有想要深究。因為其他的版本可開機。

所以「Mint MATE],則是採用「21」的版本來測。

而「Ubuntu MATE」,則是採用「22.10」來測試。

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

## Mint MATE

在「Mint MATE 21]的「Live ISO」開機後,內建就有安裝「compiz」。

所以可以直接開啟「mate-terminal」,

然後執行下面指令,將「Window Manager」直接從「marco」熱切換到「compiz」。


compiz --replace



關於「Window Manager」可以直接「熱切換」,

所以您也可以執行「marco --replace」,

或是若有「openbox」,則可以執行「openbox --replace」。

這種方式是「熱切換」,

若未來要在登入時,在「MATE Desktop」的「Window Manager」要保持採用「compiz」,

則是要執行我在另一個「討論串」提到的指令來設定,如下


gsettings set org.mate.session.required-components windowmanager 'compiz'



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

## Ubuntu MATE

在「Ubuntu MATE 22.10]的「Live ISO」開機後,內建並沒有安裝「compiz」。

雖然在「Live System」裡,

但是一樣可以直接開啟「mate-terminal」,

然後執行下面指令,安裝相關的「Package」

* compiz
* compiz-plugins
* compiz-mate
* compizconfig-settings-manager


sudo apt-get install compiz compiz-plugins compiz-mate compizconfig-settings-manager



另外下面還有其他「相關的Package」,就沒去深究安裝了

* compiz-plugins-default
* compiz-plugins-extra (transitional dummy package)
* compiz-plugins-main (transitional dummy package)
* compiz-plugins-main-default (transitional dummy package)

有些是(transitional dummy package),只是名稱不同。

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

## ini or gsttings

在「Mint MATE」和「Ubuntu MATE」,關於「compiz的設定後端」,預設都是採用「gsttings」,

我們可以切換成採用「ini」的模式,

但在切換前,先透過「ccsm (CompizConfig Settings Manager)」這個「圖形使用者介面程式」把目前的設定匯出。

在「ccsm / Preferences / Profile & Backend」就有這樣的操作介面。

匯出時存檔時,有兩種模式可供選擇,

* 一種是匯出所有的設定,
* 一種是只有匯出跟「預設值」不同的「設定值」。

匯出的副檔名會是「.profile」。

剛剛將設定匯出後,記得複製一份到「~/.config/compiz-1/compizconfig/Default.ini」這個檔案

接著可以透過「ccsm」來操作切換「compiz的設定後端」,

也可以直接修改「~/.config/compiz-1/compizconfig/config」這個檔案,

我觀察到些許差異

----------------------------------------

在「Arch Linux」的環境,「~/.config/compiz-1/compizconfig/config」這個檔案的內容如下



[general]
profile = 
integration = true
backend = ini




----------------------------------------

在「Mint MATE」的環境,「~/.config/compiz-1/compizconfig/config」這個檔案的內容如下



[general_mint]
profile = 
integration = true
backend = ini




----------------------------------------

在「Ubuntu MATE」的環境,「~/.config/compiz-1/compizconfig/config」這個檔案的內容如下



[general_mate]
profile = 
integration = true
backend = ini




----------------------------------------

> 若要相容三個環境,可以將上面的三個內容,合在一起寫在「~/.config/compiz-1/compizconfig/config」。

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

[回到索引]

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

2/2 22:52:50
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# compiz-profile-switch

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

先簡單使用「Makefile」,寫了一個簡單切換「Compiz Profile」的機制,

主要是針對採用「ini」模式的設定。

一樣放在「GitHub」上,連結也有紀錄在「Compiz 探索筆記」。

以後再找時間來寫類似「#14」提到的,搭配「fzf」的輔助工具。

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

以上提供參考

報告完畢

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

[回到索引]

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

2/3 0:41:58
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 如何透過「gsettings」這個指令,設定「Theme」

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

最近有整理一些「腳本」,是透過使用「gsettings」這個指令,來設定「Theme」。

包含了「mate」,「cinnamon」,「gnome-shell」,「xfce」四種「桌面環境」。

不過我在是在「Archlinux」底下測試的,我是直接透過「yay」來安裝相關的「theme」。

所以您在「Ubuntu」底下,則需要自行安裝相關的「gtk-theme」,「icon-theme」以及「cursor-theme」。

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

## gtk-theme 放置路徑

### 個人區域

* ~/.themes
* ~/.local/share/themes

### 系統全域

* /usr/share/themes

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

## icon-theme , cursor-theme 放置路徑

### 個人區域

* ~/.icons
* ~/.local/share/icons

### 系統全域

* /usr/share/icons

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

## 舉例 / 安裝相關的「Package」

執行下面指令安裝


sudo apt-get install yaru-theme-gtk yaru-theme-icon breeze-cursor-theme



* yaru-theme-gtk / filelist
* yaru-theme-icon / filelist
* breeze-cursor-theme / filelist

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

## 舉例 / 設定

執行下面指令設定


gsettings set org.mate.Marco.general theme "Yaru-dark"
gsettings set org.mate.interface gtk-theme "Yaru-prussiangreen-dark"
gsettings set org.mate.interface icon-theme "Yaru-prussiangreen-dark"
gsettings set org.mate.peripherals-mouse cursor-theme "Breeze"
gsettings set org.mate.peripherals-mouse cursor-size "24"



上面只是舉例,您可以自行搭配,自己喜歡的組合,也就是「gtk-theme」和「icon-theme」不見得是「同名」。

* /usr/share/themes/Yaru-prussiangreen-dark
* /usr/share/icons/Yaru-prussiangreen-dark
* /usr/share/icons/breeze_cursors/


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

## Qt Style Follow Gtk

因為我慣用的「File Manager」是「Pcmanfm-qt」,

所以我就會設定,讓「Qt的應用程式外觀」和「Gtk」一致。

先執行下面指令,安裝「qt5-gtk2-platformtheme 」。


sudo apt-get install qt5-gtk2-platformtheme



* qt5-style-plugins
* qt5-gtk2-platformtheme

然後在「/etc/profile.d」產生一個檔案「qt-style-follow-gtk.sh」,內容如下。



if [ "$XDG_CURRENT_DESKTOP" != "KDE" ]; then
	export QT_QPA_PLATFORMTHEME=gtk2
fi




主要是「export QT_QPA_PLATFORMTHEME=gtk2」這行。

這樣當您採用的「gtk-theme」有提供「gtk2」的「theme」,「Qt的應用程式外觀」就會看到「效果」。

另外「Ubuntu Mate」其實已經有提供「/etc/profile.d/mate-qt.sh」這個檔案,

是來自於「Package: ubuntu-mate-default-settings / filelist

執行下面指令,觀看「/etc/profile.d/mate-qt.sh」這個檔案的內容


cat /etc/profile.d/mate-qt.sh



顯示



# MATE Desktop Qt integrations
if [ "x$DESKTOP_SESSION" = "xmate" ] || [ "x$XDG_SESSION_DESKTOP" = "xmate" ]; then
    # QT apps to use GTK styling
    export QT_QPA_PLATFORMTHEME=gtk2
fi





另外也可以採用「qt5ct」或是「kvantum」這兩種方式來控制。

一樣是設定「QT_QPA_PLATFORMTHEME」這個變數。


export QT_QPA_PLATFORMTHEME=qt5ct




export QT_QPA_PLATFORMTHEME=kvantum




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

## Wallpaper

關於「桌面圖片」的設定,我在前面「#23 - 簡易介紹「gsettings」這個指令的用法」,

就有當作範例來說明了。

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

## Font

至於「字型」我就沒有特別去設定它,

可以執行下面指令,了解有那些設定項目,


gsettings list-recursively | grep mate | grep font



顯示


org.mate.Marco.general titlebar-font 'Ubuntu Medium 11'
org.mate.Marco.general titlebar-uses-system-font false
org.mate.caja.desktop font 'Ubuntu 11'
org.mate.dictionary print-font 'Ubuntu 12'
org.mate.font-rendering antialiasing 'rgba'
org.mate.font-rendering dpi 0.0
org.mate.font-rendering hinting 'slight'
org.mate.font-rendering rgba-order 'rgb'
org.mate.interface document-font-name 'Ubuntu 11'
org.mate.interface font-name 'Ubuntu 11'
org.mate.interface monospace-font-name 'Ubuntu Mono 13'
org.mate.interface use-custom-font false
org.mate.peripherals-keyboard-xkb.indicator font-family ''
org.mate.pluma editor-font 'Ubuntu Mono 13'
org.mate.pluma print-font-body-pango 'Ubuntu Mono 9'
org.mate.pluma print-font-header-pango 'Ubuntu 11'
org.mate.pluma print-font-numbers-pango 'Ubuntu 8'
org.mate.pluma use-default-font true
org.mate.pluma.plugins.pythonconsole font 'Monospace 10'
org.mate.pluma.plugins.pythonconsole use-system-font true
org.mate.stickynotes default-font 'Ubuntu 10'
org.mate.stickynotes default-font-color '#000000'
org.mate.stickynotes use-system-font true
org.mate.system-log fontsize 10



## 字型設定相關討論

* 如何設定「sans-serif」,「serif」,「monospace」的字型查找順序
* 關於steam遊戲--Portal 2 無法顯示中文字型 - 「#8」,「#10

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

## 額外一提

另外我在另一個討論串「#11」有提到,也有整理「KDE」的「Style組合」。

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

待續...

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

[回到索引]

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

4/6 11:28:07
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 關於「mate-appearance-properties (Appearance Preferences)」

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

延續「#37」提到的,

不見得要使用「指令」來設定,也可以透過「Mate」提供的「圖形介面工具」來「設定」。

* /usr/share/applications/mate-appearance-properties.desktop

執行


grep '^Exec' /usr/share/applications/mate-appearance-properties.desktop



顯示


Exec=mate-appearance-properties %F



執行


mate-appearance-properties



* man mate-appearance-properties
* Package: mate-control-center / filelist

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

執行了「mate-appearance-properties」之後,會出現一個「視窗 - Appearance Preferences」,

會有「Theme」,「Background」,「Font」,「Interface」四個「頁籤」,

在「Theme」這個「頁籤」,第一個「項目」,是「Custom」,

然後在「頁面」的下方,有一排「按鈕」,第三個按鈕「Customize...」。

所以選擇第一個「項目 - Custom」,按下第三個「按鈕 Customize...」,

就會出現一個新的「視窗對話框 - Customize Theme」,會有四個「頁籤」,

四個「頁籤」分別是「Controls」,「Window Border」,「Icons」,「Pointer」,

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

## Controls

在「Controls」這個「頁面」,可以設定「gtk-theme」。

等同上面介紹的指令,範例如下


gsettings set org.mate.interface gtk-theme "Yaru-prussiangreen-dark"



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

## Window Border

在「Window Border」這個「頁面」,可以設定「wm-theme」。

等同上面介紹的指令,範例如下


gsettings set org.mate.Marco.general theme "Yaru-dark"



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

## Icons

在「Icons」這個「頁面」,可以設定「icon-theme」。

等同上面介紹的指令,範例如下


gsettings set org.mate.interface icon-theme "Yaru-prussiangreen-dark"



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

## Pointer

在「Pointer」這個「頁面」,可以設定「cursor-theme」和「cursor-size」。

等同上面介紹的指令,範例如下


gsettings set org.mate.peripherals-mouse cursor-theme "Breeze"
gsettings set org.mate.peripherals-mouse cursor-size "24"



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

待續...

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

[回到索引]

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

4/6 11:39:25
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29281
EXP: 6
離線
================================================================================

[回到索引]

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

# 關於「Meta Theme」

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

接續上面「#38」提到的,

執行了「mate-appearance-properties」之後,會出現一個「視窗 - Appearance Preferences」,

在「Theme」這個「頁籤」,選擇第一個「項目 - Custom」,

然後在「頁面」的下方,按下第二個「按鈕 - Save as...」,

會出現一個新的「視窗對話框 - Save Theme As...」。

可以在「Name:」那個「欄位」,輸入「As-Yaru-Prussiangreen-Dark」,

然後下面兩個選項「Save background image」,「Save nofification theme」,「都不勾選」。

接著按下下方「按鈕 - Save」,「視窗對話框 - Save Theme As...」會關閉。

接著回到「視窗 - Appearance Preferences」,

在「Theme」這個「頁籤」,會出現一個新的「項目 - As-Yaru-Prussiangreen-Dark」。

這個項目是儲存在「~/.themes/As-Yaru-Prussiangreen-Dark」這個資料夾,

執行下面指令,觀看「~/.themes/As-Yaru-Prussiangreen-Dark」這個資料夾,


ls ~/.themes/As-Yaru-Prussiangreen-Dark



顯示


index.theme



只有一個檔案「index.theme」

執行下面指令,觀看「~/.themes/As-Yaru-Prussiangreen-Dark/index.theme」這個檔案,


cat ~/.themes/As-Yaru-Prussiangreen-Dark/index.theme



顯示



[Desktop Entry]
Name=As-Yaru-Prussiangreen-Dark
Type=X-GNOME-Metatheme
Comment=

[X-GNOME-Metatheme]
GtkTheme=Yaru-prussiangreen-dark
MetacityTheme=Yaru-dark
IconTheme=Yaru-prussiangreen-dark
GtkColorScheme=visited_link_color:#c58af9
CursorTheme=Breeze
CursorSize=24





* 關於「GtkTheme=Yaru-prussiangreen-dark」 指的就是「gtk-theme」
* 關於「MetacityTheme=Yaru-dark」 指的就是「wm-theme」(Mate 預設使用「Marco」當作「Window Manager」)
* 關於「CursorTheme=Breeze」 指的就是「cursor-theme」
* 關於「CursorSize=24」 指的就是「cursor-size」

可以對照上面提到的「gseetings」的用法。

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

若是「有勾選」下面兩個選項「Save background image」,「Save nofification theme」,內容如下



[Desktop Entry]
Name=As-Yaru-Prussiangreen-Dark
Type=X-GNOME-Metatheme
Comment=

[X-GNOME-Metatheme]
GtkTheme=Yaru-prussiangreen-dark
MetacityTheme=Yaru-dark
IconTheme=Yaru-prussiangreen-dark
GtkColorScheme=visited_link_color:#c58af9
CursorTheme=Breeze
CursorSize=24
NotificationTheme=slider
BackgroundImage=/usr/share/backgrounds/default.jpg




會多出「綠色字」那兩行



NotificationTheme=slider
BackgroundImage=/usr/share/backgrounds/default.jpg




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

以上提供參考

報告完畢

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

[回到索引]

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

4/6 11:52:45
應用擴展 工具箱

« 1 2 3 (4)

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


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