Browse Source

non-free + pixmap

master
pvincent 10 months ago
parent
commit
111eeeafed
  1. 19
      src/main

19
src/main

@ -89,6 +89,7 @@ fi
echo "# required packages"
echo "==================="
sudo apt-add-repository contrib non-free -y
for package in ${REQUIRED_PACKAGES[@]}; do
runVoid dpkg-query --status $package
if [ $runVoidError -ne 0 ]; then
@ -347,19 +348,11 @@ echo "# libre_re pixmap"
echo "================="
if [[ ! -f /usr/share/pixmaps/faces/libre_re.png ]]; then
sudo curl -o /usr/share/pixmaps/faces/libre_re.png "$GIT_BASE_URL/raw/branch/master/lib/pixmap/libre_re.png"
gnome-control-center user-accounts
cat <<EOF | python3 -
import dbus
import os
import pwd
user_id = pwd.getpwuid(os.getuid()).pw_uid
icon_file = '/usr/share/pixmaps/faces/libre_re.png'
bus = dbus.SystemBus()
user_name = bus.get_object('org.freedesktop.Accounts', '/org/freedesktop/Accounts/User' + str(user_id))
properties_manager = dbus.Interface(user_name, dbus_interface='org.freedesktop.DBus.Properties')
properties_manager.SetIconFile( icon_file, dbus_interface='org.freedesktop.Accounts.User')
EOF
dbus-send --system --dest=org.freedesktop.Accounts \
--type=method_call --print-reply \
/org/freedesktop/Accounts/User$(id -u) \
org.freedesktop.Accounts.User.SetIconFile \
string:"/usr/share/pixmaps/faces/libre_re.png"
else
echo "pixmap already copied!"
fi

Loading…
Cancel
Save