Làm cách nào để hiển thị hai cấu hình khác nhau của Firefox đang chạy dưới hai biểu tượng khác nhau trên trang tổng quan của tôi?
Tôi có hai tệp .desktop khác nhau cho hai cấu hình Firefox của mình. Cả hai đều có các biểu tượng khác nhau và được ghim riêng vào dấu gạch ngang của tôi, nhưng khi chạy chúng đều chạy dưới biểu tượng mặc định. Làm cách nào để thay đổi điều này để chúng chạy riêng lẻ?
Tệp hồ sơ mặc định:
[Desktop Entry]all this seems to do is make them both launch Firefox with a default icon
Version=1.0
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox %u
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=firefox
[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -new-window
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -private-window
Hồ sơ của trường:
[Desktop Entry]
Version=1.0
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=/home/callum/Pictures/firefox-school.png
[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P school -no-remote -new-window
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P school -no-remote -private-window
Đây là hình ảnh về hai trình khởi chạy Firefox của tôi, tôi hiện đang chạy hồ sơ trường học, nhưng nó cho thấy phiên bản mặc định đang mở:
Tôi đang chạy Kubuntu 19.10 với KDE Plasma 5.16.5
Cảm ơn!
CHỈNH SỬA: Bằng cách sử dụng các lớp, tôi đã cập nhật các tệp trên màn hình để sử dụng các lớp theo đề xuất của @vanadium, nhưng cấu hình thứ hai chỉ khởi chạy một phiên bản Firefox khác với biểu tượng mặc định.
Tệp hồ sơ mặc định:
[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile
Hồ sơ của trường:
[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile
CHỈNH SỬA 2: Tôi đã sửa nó! Tôi đã cập nhật các tệp trên màn hình ~/.local/share/applicationsthay vì các tệp trongusr/share/applications
Trả lời
Tôi đã giải quyết vấn đề này bằng cách thêm các lớp vào tệp máy tính để bàn:
[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile
[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile
và sau đó di chuyển các tệp máy tính để bàn mới ~/.local/share/applicationsthay vì chỉ những tệp trongusr/share/applications