我经常从颜色设置中更改颜色配置文件。我想设置一个别名,以便于在颜色配置文件之间切换,例如从 D50 切换到 D55 并切换回来。
有人知道如何通过终端命令进行更改吗?
回复 AB 的回答:
$ colormgr get-devices
Object Path: /org/freedesktop/ColorManager/devices/xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Owner: evn
Created: May 7 2015, 03:36:44 PM
Modified: May 9 2015, 08:48:18 AM
Type: display
Enabled: Yes
Embedded: Yes
Model: MacBookAir4,2
Vendor: Apple
Serial: unknown
Seat: seat0
Scope: temp
Colorspace: rgb
Device ID: xrandr-Apple Computer Inc-Color LCD
Profile 1: icc-df7c0067b1eb9bcc9fc9b33bc3a797eb
/usr/share/color/icc/colord/Gamma5000K.icc
Profile 2: icc-57f0d896250f6f98f77ca1b0d19019c0
/usr/share/color/icc/colord/Gamma5500K.icc
Profile 3: icc-c385a6cc9b355dfa77d994ff54626f8a
/home/evn/.local/share/icc/edid-2fa49b462ac314062ce76fce977d6525.icc
Metadata: XRANDR_name=eDP1
Metadata: OutputPriority=primary
Metadata: OwnerCmdline=/usr/lib/unity-settings-daemon/unity-settings-daemon
Metadata: OutputEdidMd5=2fa49b462ac314062ce76fce977d6525
$ colormgr device-get-default-profile xrandr-Apple Computer Inc-Color LCD
Not a valid object path: xrandr-Apple
$ colormgr device-get-default-profile xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Not a valid object path: xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
我收到错误“对象路径无效:...”。AB,您知道如何解决此错误吗?
AB回答:ID为双引号。
$ colormgr device-get-default-profile "xrandr-Apple Computer Inc-Color LCD"
Not a valid object path: xrandr-Apple Computer Inc-Color LCD
$ colormgr device-get-default-profile "xrandr_Apple_Computer_Inc_Color_LCD_evn_1000"
Not a valid object path: xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
粘贴完整路径有效。谢谢 AB!
$ colormgr device-get-default-profile /org/freedesktop/ColorManager/devices/xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Object Path: /org/freedesktop/ColorManager/profiles/icc_df7c0067b1eb9bcc9fc9b33bc3a797eb
Owner: root
Format: ColorSpace..
Title: D50
Qualifier: RGB..
Type: display-device
Colorspace: rgb
Gamma Table: Yes
System Wide: Yes
Filename: /usr/share/color/icc/colord/Gamma5000K.icc
Profile ID: icc-df7c0067b1eb9bcc9fc9b33bc3a797eb
Metadata: CMF_version=1.0.6
Metadata: CMF_product=colord
Metadata: FILE_checksum=df7c0067b1eb9bcc9fc9b33bc3a797eb
Metadata: CMF_binary=cd-create-profile
Metadata: License=CC0
Metadata: DATA_source=test
答案1
从man colormgr
[..]
DESCRIPTION
This manual page documents briefly the colormgr command.
colormgr allows an administrator to view and change color profile to device mappings.
[..]
列出所有设备,例如:
$ colormgr get-devices
Object Path: /org/freedesktop/ColorManager/devices/cups_HP_Color_LaserJet_CP1514n
Owner: root
Created: Mai 9 2015, 07:57:21
Modified: Mai 9 2015, 07:57:21
Type: printer
Enabled: Yes
Embedded: No
Model: HP Color LaserJet cp1514n
Vendor: Hewlett Packard
Serial: socket://192.168.2.160
Format: ColorModel.MediaType.Resolution
Scope: temp
Colorspace: rgb
Device ID: cups-HP_Color_LaserJet_CP1514n
Profile 1: HP_Color_LaserJet_CP1514n-RGB..
Profile 2: HP_Color_LaserJet_CP1514n-Gray..
Metadata: OwnerCmdline=/usr/sbin/cupsd -l
并获取一份个人资料
$ colormgr device-get-default-profile cups-HP_Color_LaserJet_CP1514n
Object Path: /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_RGB__
Owner: root
Format: ColorModel.MediaType.Resolution
Qualifier: RGB..
Colorspace: rgb
Scope: temp
Gamma Table: No
System Wide: No
Profile ID: HP_Color_LaserJet_CP1514n-RGB..
设置配置文件:
colormgr device-make-profile-default cups-HP_Color_LaserJet_CP1514n /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_Gray__
检查:
$ colormgr device-get-default-profile cups-HP_Color_LaserJet_CP1514n
Object Path: /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_Gray__
Owner: root
Format: ColorModel.MediaType.Resolution
Qualifier: Gray..
Colorspace: gray
Scope: temp
Gamma Table: No
System Wide: No
Profile ID: HP_Color_LaserJet_CP1514n-Gray..