Skip to content

Commit 80842a9

Browse files
committed
fix(docs): update obscure shell commands
- Now the shell commands use proper designation for user accounts. - Better use of `sudo` is also made for some of the commands.
1 parent a4b6f3b commit 80842a9

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

docs/installation/linux.md

+20-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Run the following command in a terminal:
77

88
```shell
9-
python3 -m pip install --local git+https://github.com/eeriemyxi/mechvibes-lite
9+
user:~$ python3 -m pip install --local git+https://github.com/eeriemyxi/mechvibes-lite
1010
```
1111

1212
Now you should be able to do `mvibes --version` from your terminal. If not then
@@ -24,7 +24,7 @@ processes running from your user account. First you need to add your user to the
2424
`input` group:
2525

2626
```shell
27-
sudo usermod -aG input username
27+
user:~$ sudo usermod -aG input username
2828
```
2929
Replace `username` with your account's username.
3030

@@ -53,10 +53,10 @@ receive input events from.
5353

5454
!!! note
5555
The instructions below are for Ubuntu. Please adapt them for your system yourself.
56-
56+
5757
Create a new user:
5858
```
59-
sudo adduser second-user
59+
usual-user:~$ sudo adduser second-user
6060
```
6161

6262
`second-user` is the username of the second account. Please follow the
@@ -65,16 +65,20 @@ instructions given to you by this command.
6565
Add the new user to `input` group:
6666

6767
```shell
68-
sudo usermod -aG input second-user
68+
usual-user:~$ sudo usermod -aG input second-user
6969
```
7070

7171
Log out and log back in. Now make sure your new account can read input events by
7272
reading [this](#testing-access-for-input-event). However instead of running
73-
`evtest` do `sudo -u second-user evtest`.
73+
`evtest` do:
74+
75+
```shell
76+
usual-user:~$ sudo -u second-user evtest
77+
```
7478

7579
Create a system-wide configuration directory for Mechvibes Lite:
7680
```shell
77-
sudo cp -r ~/.config/mechvibes-lite/ /etc/mechvibes-lite
81+
usual-user:~$ sudo cp -r ~/.config/mechvibes-lite/ /etc/mechvibes-lite
7882
```
7983

8084
The command above will copy your local configuration file directory to `/etc`
@@ -84,20 +88,18 @@ to not have issues with file permissions.
8488
Install Mechvibes Lite on the new user account:
8589

8690
```shell
87-
sudo apt install python3-venv
88-
sudo -u second-user bash
89-
cd /home/second-user # or just cd
90-
/usr/bin/python3 -m venv mvibes-venv
91-
cd mvibes-venv
92-
source ./bin/activate
93-
pip install git+https://github.com/eeriemyxi/mechvibes-lite
94-
exit
91+
usual-user:~$ sudo apt install python3-venv
92+
usual-user:~$ sudo -iu second-user
93+
second-user:~$ python3 -m venv mvibes-venv
94+
second-user:~$ source mvibes-venv/bin/activate
95+
second-user:~$ pip install git+https://github.com/eeriemyxi/mechvibes-lite
96+
second-user:~$ deactivate && exit
9597
```
9698

9799
Now do this from the usual account to start the `wskey` server:
98100

99101
```shell
100-
sudo -u second-user /home/second-user/mvibes-venv/bin/mvibes-wskey daemon
102+
usual-user:~$ sudo -iu second-user mvibes-venv/bin/mvibes wskey daemon
101103
```
102104

103105
### Method III
@@ -112,12 +114,12 @@ no desire to make instructions for this. Contributions welcome.
112114
Install `evtest` package:
113115

114116
```
115-
sudo apt install evtest
117+
user:~$ sudo apt install evtest
116118
```
117119

118120
Run `evtest` then select a device from the list:
119121
```
120-
evtest
122+
user:~$ evtest
121123
No device specified, trying to scan all of /dev/input/event*
122124
Not running as root, no devices may be available.
123125
Available devices:

0 commit comments

Comments
 (0)