-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_cde.sh
executable file
·144 lines (127 loc) · 4.69 KB
/
install_cde.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
set -e
# References:
#
# - Install on Ubuntu/Debian
# https://sourceforge.net/p/cdesktopenv/wiki/LinuxBuild/#debian
#
# - Raspberry Pi (Contains errors, fixed in this script)
# https://sourceforge.net/p/cdesktopenv/wiki/CDE%20on%20the%20Raspberry%20Pi/
#
# - Improve fonts
# https://sourceforge.net/p/cdesktopenv/wiki/ImprovingFonts/
# http://futurile.net/2016/06/14/xterm-setup-and-truetype-font-configuration/
#
# - Motif look and feel for GTK apps
# https://www.pling.com/s/Gnome/p/1231025
#
# Additional software
# https://snapcraft.io/install/xv/raspbian
#
# >>> NOTE: Keyboard layout <<<
# If you have a non-english keyboard layout, add an X11 configuration file. See
# https://sourceforge.net/p/cdesktopenv/wiki/CDE%20on%20the%20Raspberry%20Pi/
# section 3 for more info.
function preprocess {
#------------------------------------------------------------------------------
# Generate locale support
#------------------------------------------------------------------------------
sudo locale-gen de_DE
sudo locale-gen es_ES
sudo locale-gen fr_FR
sudo locale-gen it_IT
sudo locale-gen de_DE.UTF-8
sudo locale-gen es_ES.UTF-8
sudo locale-gen fr_FR.UTF-8
sudo locale-gen it_IT.UTF-8
#------------------------------------------------------------------------------
# Install needed packages
#------------------------------------------------------------------------------
sudo apt install --reinstall ca-certificates
sudo apt -y install \
autoconf \
automake \
bison \
build-essential \
flex \
g++ \
git \
ksh \
libtool \
lib{xt,xmu,xft,xinerama,xpm,pam,motif,ssl,xaw7,x11,xss,tirpc,jpeg,freetype6,utempter}-dev \
m4 \
ncompress \
patch \
rpcbind \
tcl-dev \
x11proto-fonts-dev \
xbitmaps \
opensp \
xfonts-{100,75}dpi{,-transcoded} \
xorg
}
function install_cde {
#------------------------------------------------------------------------------
# Compile and install CDE
#------------------------------------------------------------------------------
pushd /tmp
sudo rm -rf cdesktopenv-code
git clone https://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code
cd cdesktopenv-code/cde
./autogen.sh
./configure
make -j8
sudo rm -rf /usr/dt
sudo make install
popd
}
function set_display_manager {
#------------------------------------------------------------------------------
# Set default display manager
# WIP: dtlogin is not working properly after reboot.
#------------------------------------------------------------------------------
sudo mv /etc/X11/default-display-manager /etc/X11/default-display-manager.bu
sudo echo "/usr/dt/bin/dtlogin" > /etc/X11/default-display-manager
sudo cp ./resources/systemd/dtlogin.service /lib/systemd/system/dtlogin.service
sudo ln -svf /lib/systemd/system/dtlogin.service /etc/systemd/system/display-manager.service
sudo ln -svf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
}
function improve_fonts {
#------------------------------------------------------------------------------
# Improve fonts of the interface
#------------------------------------------------------------------------------
sudo apt install gsfonts gsfonts-x11 ttf-mscorefonts-installer fonts-powerline
sudo mv /usr/dt/config/xfonts/C/fonts.alias /usr/dt/config/xfonts/C/fonts.alias.bu
sudo cp ./resources/fonts/fonts.alias /usr/dt/config/xfonts/C/fonts.alias
}
#------------------------------------------------------------------------------
# Add Motif theme for GTK
#------------------------------------------------------------------------------
function set_motif_lookandfeel {
mkdir -p ${HOME}/.themes
tar -C ${HOME}/.themes/ zxvf ./resources/gtk/cdetheme1.3.tar.gz
ln -s ${HOME}/.themes/cdetheme1.3/cdetheme ${HOME}/.themes/cdetheme
cp ./resources/gtk/settings.ini ${HOME}/.config/gtk-3.0/
}
function add_additional_software {
#------------------------------------------------------------------------------
# Install some additional X11 software from the mid 90s era.
#------------------------------------------------------------------------------
sudo apt install -y \
xfig \
xpdf
sudo apt install snapd
sudo snap install core
sudo snap install xv --edge --devmode
}
function print_info {
echo "Install Firefox CDE look and feel add-on:"
echo "https://addons.mozilla.org/en-US/firefox/addon/cde/"
}
preprocess
install_cde
set_display_manager
improve_fonts
set_motif_lookandfeel
add_additional_software
print_info