Skip to content

Commit 37b65ce

Browse files
authored
Update 2016-09-26-Typora on Linux.md
1 parent b7c4ebb commit 37b65ce

File tree

1 file changed

+12
-69
lines changed

1 file changed

+12
-69
lines changed

_posts/basic/2016-09-26-Typora on Linux.md

+12-69
Original file line numberDiff line numberDiff line change
@@ -9,76 +9,30 @@ typora-root-url: ../../
99

1010
Installation instructions for different flavours of Linux.
1111

12+
> If you are a user in China, replace all `https://typora.io/` with `https://typoraio.cn/`.
13+
如果你是中国的用户,请将所有 `https://typora.io/` 替换为 `https://typoraio.cn/`
14+
1215
## Debian/Ubuntu
1316

14-
```bash
15-
# or use
16-
# wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
17-
wget -qO - https://typoraio.cn/linux/public-key.asc | sudo tee /etc/apt/trusted.gpg.d/typora.asc
17+
```shell
18+
# download the key
19+
curl https://typora.io/linux/public-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/typora.gpg
1820

1921
# add Typora's repository
20-
sudo add-apt-repository 'deb https://typora.io/linux ./'
21-
sudo apt-get update
22+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/typora.gpg] https://typora.io/linux ./" | sudo tee /etc/apt/sources.list.d/typora.list
23+
sudo apt update
2224

2325
# install typora
24-
sudo apt-get install typora
26+
sudo apt install typora
2527
```
2628

27-
### Alternative for `apt-key`
28-
29-
When you try to add an APT repository key using `apt-key` (first line in previous command line) on Debian, Ubuntu and Linux distributions based on these, you'll see the following message: "*Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))*".
30-
31-
The easiest way would be just to ignore it.
32-
33-
But if you’re not OK with the warning, you can do followings:
34-
35-
1. Download the key and save it locally somewhere.
36-
37-
```shell
38-
curl https://typora.io/linux/public-key.asc | gpg --dearmor > /usr/share/keyrings/typora.gpg
39-
```
40-
41-
2. Create repo file `typora.list` in `/etc/apt/sources.list.d`.
42-
43-
```shell
44-
sudo vim /etc/apt/sources.list.d/typora.list
45-
```
46-
47-
3. Paste repo definition into this file:
48-
49-
```shell
50-
deb [arch=amd64 signed-by=/usr/share/keyrings/typora.gpg] https://typora.io/linux ./
51-
```
52-
53-
4. Now you can install Typora:
54-
55-
```shell
56-
sudo apt-get update
57-
sudo apt-get install typora
58-
```
59-
6029
### Upgrade Typora
6130

62-
After installing Typora, the `typora` package will be managed by `apt-get`, so when your system updates installed packages, or you execute `apt-get upgrade`, Typora will be updated to latest version.
31+
After installing Typora, the `typora` package will be managed by `apt`, so when your system updates installed packages, or you execute `apt upgrade`, Typora will be updated to latest version.
6332

6433
```bash
6534
# upgrade all packages include Typora
66-
sudo apt-get upgrade
67-
```
68-
69-
## Mint
70-
71-
```sh
72-
# or use
73-
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
74-
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
75-
76-
# add Typora's repository
77-
echo -e "\ndeb https://typora.io/linux ./" | sudo tee -a /etc/apt/sources.list
78-
sudo apt-get update
79-
80-
# install typora
81-
sudo apt-get install typora
35+
sudo apt upgrade
8236
```
8337

8438
## Download deb file manually
@@ -96,8 +50,7 @@ Then, input commands from https://typora.io/#linux into the newly opened termina
9650

9751
## Other Distributions
9852

99-
1. Download the binary package [Typora-linux-x64.tar.gz](https://typora.io/linux/Typora-linux-x64.tar.gz).
100-
2. Try to install `apt-get` on your distribution, and then install typora.
53+
Download the binary package [Typora-linux-x64.tar.gz](https://typora.io/linux/Typora-linux-x64.tar.gz).
10154

10255
## Snap Version
10356

@@ -176,16 +129,6 @@ then:
176129
1. Ensure `xenial-security` updates are included in *Software & Updates*.
177130
2. run `sudo apt-get update && sudo apt-get install libnss3`
178131

179-
#### Malformed input, repository not added
180-
181-
You can add a repository by:
182-
183-
```sh
184-
echo -e "\ndeb https://typora.io/linux ./" | sudo tee -a /etc/apt/sources.list
185-
```
186-
187-
see related discussion in <https://github.com/typora/typora-issues/issues/2065#issuecomment-455877843>.
188-
189132
#### Shortcut for Heading 5 is not working
190133

191134
Please check if you uses fcitx (e.g. for typing Chinese)? `Ctrl + 5` is the global shortcut key for fcitx to reload its config. Deleting that global shortcut should make ctrl+5 work in Typora. (Thanks to https://github.com/typora/typora-issues/issues/867#issuecomment-647082881).

0 commit comments

Comments
 (0)