当我以 root 身份编辑 Gnome 菜单时alacarte
,我会
#!/bin/sh
mkdir -p /etc/my-gnome-menus
rm -rf /etc/my-gnome-menus/*
cp -r /root/.config/menus /etc/my-gnome-menus/
cp -r /root/.local/share/applications /etc/my-gnome-menus/share/
cp -r /root/.local/share/desktop-directories /etc/my-gnome-menus/share/
并将其添加到/etc/environment
XDG_CONFIG_HOME="/etc/my-gnome-menus"
XDG_DATA_HOME="/etc/my-gnome-menus/share"
但我没有看到我在系统范围内所做的更改。
我还需要做点别的吗?
答案1
rm -r /root/.local/share
rm -r /root/.config/menus
mkdir -p /etc/my-gnome-menus
echo 'XDG_CONFIG_HOME="/etc/my-gnome-menus"' >> /etc/environment
echo 'XDG_DATA_HOME="/etc/my-gnome-menus/share"' >> /etc/environment
现在用来alacarte
编辑菜单。