blob: bfb675ba04b226116b4beef4c58ddbe4dfa4d928 (
plain) (
blame)
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
|
- Update system
`# pacman -Syu`
- Change password of root
`# passwd`
- Install common base tools
`# pacman -S vim sudo wget networkmanager xorg xorg-server git openssh fakeroot base-devel tigervnc tmux neofetch`
- Configure new system
- Setting correct live timezone
`# ln -sf /usr/share/zoneinfo/<Continent>/<City> /etc/localtime`
- Edit locale.gen file, replace vim with text-editor of choice
`# vim /etc/locale.gen`
- Uncomment `en_US.UTF-8 UTF-8` and any other needed locales (LANG variable), save and exit
- Generate locales
`# locale-gen`
- Also put the chosen locale into locale.conf
`# echo LANG=en_US.UTF-8 >> /etc/locale.conf`
- Create new user with sudo privileges
- Create a new user
`# useradd -mG wheel <username>`
```
useradd = add a user
-m = associate a home directory
G = specify a group
wheel = group name
```
- Password for new user
`# passwd <username>`
- Type in new password and retype it to verify
- Enable sudo privileges for any user of the `wheel` group, replace vim with editor of choice
`# EDITOR=vim visudo`
- Look for and uncomment `# %wheel ALL=(ALL) ALL`, save and exit
Example:
```
%wheel ALL=(ALL) ALL
```
//export USER=(username); useradd $USER; echo "$USER ALL=(ALL) ALL" >> /etc/sudoers
//- Add <username> to sudoers. Edit/etc/sudoers with vi, add following lines beneath "root ALL=(ALL) ALL":
//`<username> ALL=(ALL) ALL`
- Login to the non-root user account by default,
`# echo startarch login username > archlinux; chmod +x archlinux`
- To login into account:
`$ ./archlinux`
- Install yay
`$ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si`
- Edit ~/.profile and add the following lines:
```bash
export DISPLAY=:0
# Start pulse audio server in proot after login
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
```
- or just type this one time:
`$ export DISPLAY=":1"`
- And make it executable
`$ chmod +x ~/.profile`
- If Proot audio not working
Run this command in Proot-distro:
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
Run this command in Termux (not in proot!)
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
- Setup vncserver
`$ vncserver -localhost`
- Starting a vncserver, the ports starts from 5900.
`$ vncserver :1`
- Launch RealVNC Viewer, add new connection `localhost:5901` or `127.0.0.1:5901` and type in password to connect to the vncserver
> NOTE: To determine port number on which VNC server listens. It can be calculated by: 5900 + {display number}. So for display 'localhost:1' the port will be 5901
- Make the vnc startup script
`$ mkdir ~/.vnc && touch ~/.vnc/xstartup`
- Edit the startup script
`$ vim ~/.vnc/xstartup`
```bash
#!/data/data/com.termux/files/usr/bin/sh
## file is executed during VNC server
## startup.
# Launch terminal emulator Aterm.
# Requires package 'aterm'.
aterm -geometry 80x24+10+10 -ls &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
# Execute XFCE4
# Launch Window Manager/Desktop Environment
bspwm &
```
- Make it executable
`$ chmod +x ~/.vnc/xstartup`
Create a password for vncserver
vncpasswd
Add following lines to ~/.vnc/config
# The session we want to start
session=xfce4
# Screen resolution
geometry=1920x1080
localhost
Add following lines to ~/.vnc/xstartup, so it will execute XFCE4 after starting vncserver.
#!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
# Execute XFCE4
dbus-launch --exit-with-session startxfce4
- - -
- Trouble-shooting
`# pacman-key --init`
`# pacman-key --populate`
`# pacman -S archlinuxarm-keyring`
`# pacman-key --populate archlinuxarm`
`# rm /var/lib/pacman/db.lck`
|