1 | #!/bin/bash |
---|
2 | |
---|
3 | set -e |
---|
4 | |
---|
5 | |
---|
6 | APPORT_FILE="/etc/default/apport" |
---|
7 | |
---|
8 | |
---|
9 | if [ "$1" = "configure" ] ; then |
---|
10 | |
---|
11 | #update dconf database, as we droped new settings |
---|
12 | dconf update |
---|
13 | |
---|
14 | #gconf trigger, for those settings still using gconf |
---|
15 | [ -x /usr/bin/update-gconf-defaults ] && /usr/bin/update-gconf-defaults |
---|
16 | |
---|
17 | # Xsession diversion to solve the Unity problem |
---|
18 | # Unity must be diverted |
---|
19 | |
---|
20 | # First create the directory for destination desktops |
---|
21 | [ -d "/usr/share/diverted-sessions/" ] || mkdir -p "/usr/share/diverted-sessions/" |
---|
22 | |
---|
23 | ORIGINAL_UNITY_FILE="/usr/share/xsessions/xubuntu.desktop" |
---|
24 | NEW_DIVERTED_FILE="/usr/share/diverted-sessions/xubuntu.desktop" |
---|
25 | PKG="lliurex-artwork-defaults-desktop" |
---|
26 | dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" |
---|
27 | |
---|
28 | ORIGINAL_UNITY_FILE="/usr/share/xsessions/xfce.desktop" |
---|
29 | NEW_DIVERTED_FILE="/usr/share/diverted-sessions/xfce.desktop" |
---|
30 | PKG="lliurex-artwork-defaults-desktop" |
---|
31 | dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | update-alternatives \ |
---|
36 | --install /usr/share/backgrounds/lliurex-default-background.png lliurex-default-background.png \ |
---|
37 | /usr/share/backgrounds/lliurex16-desktop-HD.png 500 |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | update-icon-caches /usr/share/icons/hicolor/scalable/ || true |
---|
43 | |
---|
44 | |
---|
45 | if [ $(uname -m) = "x86_64" ];then |
---|
46 | |
---|
47 | mkdir -p /usr/lib/x86_64-linux-gnu/qt5/plugins/ |
---|
48 | if [ ! -e /usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_keys.so ]; then |
---|
49 | cp /usr/share/lliurex-artwork-defaults/lliurex-kwin-mods/amd64/kcm_keys.so /usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_keys.so |
---|
50 | fi |
---|
51 | |
---|
52 | else |
---|
53 | |
---|
54 | mkdir -p /usr/lib/i386-linux-gnu/qt5/plugins/kcm_keys.so |
---|
55 | if [ ! -e /usr/lib/i386-linux-gnu/qt5/plugins/kcm_keys.so ]; then |
---|
56 | cp /usr/share/lliurex-artwork-defaults/lliurex-kwin-mods/i386/kcm_keys.so ./usr/lib/i386-linux-gnu/qt5/plugins/kcm_keys.so |
---|
57 | fi |
---|
58 | |
---|
59 | |
---|
60 | fi |
---|
61 | |
---|
62 | |
---|
63 | if [ ! -e /usr/share/kservices5/keys.desktop ]; then |
---|
64 | cp /usr/share/lliurex-artwork-defaults/lliurex-kwin-mods/desktop/keys.desktop /usr/share/kservices5/keys.desktop |
---|
65 | fi |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | # DISABLE APPORT |
---|
70 | echo "enabled=0" > "$APPORT_FILE" |
---|
71 | |
---|
72 | fi |
---|
73 | |
---|
74 | #DEBHELPER# |
---|
75 | |
---|
76 | exit 0 |
---|
77 | |
---|