Skip to content

Commit 83575cb

Browse files
committed
v0.1
The initial release
1 parent ceabeb3 commit 83575cb

File tree

2 files changed

+162
-1
lines changed

2 files changed

+162
-1
lines changed

README.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
11
# umai
2-
Ubuntu Mate accessibility improver
2+
3+
Ubuntu Mate is for long time known for its accessibility and convenience.
4+
5+
Still, after the system installation, there is a whole list of settings, tweaks and modifications that need to be done in order to get the system into the best shape for use with a screenreader.
6+
7+
It can be tedious even for an experienced user, and a beginner may find a series of configuration files edits, terminal commands and moving around the whole filesystem doing things they are not familiar with yet hard, error prone and even discouraging.
8+
9+
umai is a simple script specialized for Ubuntu Mate 22.04 that automatically performs the most common accessibility-related operations after the system installation. It can save time to seasoned users, and let the beginners focus on more interesting parts of their new OS.
10+
11+
## Usage
12+
13+
### When to use this script and when not
14+
15+
Warning! This script is intended to be used only and exclusively with ubuntu Mate 22.04, after completion of its installation and applying all available updates.
16+
17+
Usage with a different system, a different version or after doing other changes in the OS can lead to undefined behavior, messing the system at best.
18+
19+
A stable internet connection is also strongly recommended, since the script doesn't perform any checks of the results from the executed commands.
20+
21+
### Usage instructions
22+
23+
After finishing the system installation, perform all offered updates and follow the system's instructions.
24+
25+
When everything is ready, open the terminal by pressing the Super+T shortcut (or by typing terminal into the application search and clicking the icon).
26+
27+
Run the following commands:
28+
29+
```
30+
sudo apt update
31+
sudo apt install curl -y
32+
curl -s https://github.com/RastislavKish/umai/releases/latest/download/umai.sh | bash
33+
```
34+
35+
To download and launch the script from GitHub, or:
36+
37+
```
38+
./umai.sh
39+
```
40+
41+
If you get the script into your user directory (/home/username) by other means, like downloading via browser, bringing on a USB stick or copying from a network / USB drive.
42+
43+
Enter your user password when asked for, and wait until the script finishes. This can take few minutes.
44+
45+
You can tell the script has finished when pressing backspace in the terminal window plays a ping.
46+
47+
Log out and log in for all changes to take effect.
48+
49+
## The performed operations
50+
51+
Here is the list of operations the script currently applies
52+
53+
1. Enable Orca and the numlock key on the login screen by adding an Arctica greeter's scheme override.
54+
2. Replace the Snap version of Firefox by a standard deb installation from mozillateam ppa.
55+
3. Update Orca screenreader to its latest version from the [project's repository](https://gitlab.gnome.org/GNOME/orca).
56+
4. Set ACCESSIBILITY_ENABLED environment variable to 1 in /etc/environment.
57+
5. Install [ocrdesktop](https://github.com/chrys87/ocrdesktop) with all its Python and deb dependencies. The program is installed into /usr/local/bin and can be invoked by its name, making it easy to create a keyboard shortcut for it. The user is encouraged to install Tesseract language pack for their desired language by running sudo apt install tesseract-ocr-<lng>, where <lng> represents Tesseract's language code for a particular language.
58+

umai.sh

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Copyright (C) 2021 Rastislav Kish
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, version 3.
6+
#
7+
# This program is distributed in the hope that it will be useful,
8+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
# GNU General Public License for more details.
11+
#
12+
# You should have received a copy of the GNU General Public License
13+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
15+
#!/usr/bin/sh
16+
17+
cd
18+
mkdir .uma
19+
20+
# First, make sure everything is upto-date
21+
22+
sudo apt update
23+
sudo apt upgrade -y
24+
25+
# Activate Orca and numlock on the login screen
26+
27+
echo Activating Orca and numlock on the login screen
28+
29+
echo \
30+
'[org.ArcticaProject.arctica-greeter]
31+
activate-numlock=true
32+
screen-reader=true
33+
' | sudo tee /usr/share/glib-2.0/schemas/99_arctica_greeter.gschema.override
34+
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
35+
36+
# Remove the snap firefox and install an apt-one
37+
38+
echo Replacing Firefox with an apt version
39+
40+
sudo snap remove firefox
41+
sudo add-apt-repository ppa:mozillateam/ppa -y
42+
echo \
43+
'Package: *
44+
Pin: release o=LP-PPA-mozillateam
45+
Pin-Priority: 1001
46+
' | sudo tee /etc/apt/preferences.d/mozilla-firefox
47+
sudo apt update
48+
sudo apt install firefox -y
49+
50+
# Install the latest Orca
51+
52+
echo Installing the latest orca
53+
54+
## Add site-packages as a symling to dist-packages
55+
56+
cd /usr/local/lib/python3.10
57+
sudo ln -s dist-packages site-packages
58+
cd
59+
60+
## Uncomment source repositories
61+
62+
sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list
63+
sudo apt update
64+
65+
## Install git and clone the repository
66+
67+
sudo apt install git -y
68+
cd ~/.uma
69+
git clone https://gitlab.gnome.org/GNOME/orca.git
70+
cd orca
71+
72+
## Install dependencies, build and upgrade Orca
73+
74+
sudo apt-get build-dep gnome-orca -y
75+
PYTHON=/usr/bin/python3 ./autogen.sh
76+
make
77+
sudo make install
78+
79+
# Set the ACCESSIBILITY-ENABLED environment variable
80+
81+
echo Setting the ACCESSIBILITY_ENABLED flag
82+
83+
sudo sed -i '$ a ACCESSIBILITY_ENABLED=1' /etc/environment
84+
85+
# Install OCRDesktop
86+
87+
echo Installing OCRDesktop
88+
89+
sudo apt install python3-pip -y
90+
sudo apt install tesseract-ocr libwnck-3-0 -y
91+
pip3 install --upgrade pillow
92+
pip3 install pdf2image pytesseract scipy webcolors
93+
94+
cd ~/.uma
95+
git clone https://github.com/chrys87/ocrdesktop
96+
cd ocrdesktop
97+
sudo cp ocrdesktop /usr/local/bin
98+
99+
# Clean the downloaded files
100+
101+
echo Cleaning...
102+
103+
cd
104+
rm -r -f .uma
105+

0 commit comments

Comments
 (0)