srdusr
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2023-06-03 23:58:33 +0200
committersrdusr <[email protected]>2023-06-03 23:58:33 +0200
commit11f540fceb93580f433a118fcdfecd7ce939e039 (patch)
tree0bdc031fd7dc62f1fcc1f13e8613f098612be0e5
parent4a9deeaa9c36338586327e17c3d8687c03a3e716 (diff)
downloadnotes-11f540fceb93580f433a118fcdfecd7ce939e039.tar.gz
notes-11f540fceb93580f433a118fcdfecd7ce939e039.zip
Info about packages and vnc
-rw-r--r--cheatsheets/termux.md48
1 files changed, 46 insertions, 2 deletions
diff --git a/cheatsheets/termux.md b/cheatsheets/termux.md
index f039c0a..80c898a 100644
--- a/cheatsheets/termux.md
+++ b/cheatsheets/termux.md
@@ -19,7 +19,7 @@
`# echo LANG=en_US.UTF-8 >> /etc/locale.conf`
- Install common base tools
-`# pacman -S vim sudo visudo wget networkmanager xorg xorg-server git openssh fakeroot base-devel tigervnc tmux neofetch`
+`# pacman -S vim sudo visudo wget networkmanager xorg xorg-server git openssh fakeroot bsdtar base-devel tigervnc tmux neofetch`
- Create new user with sudo privileges
- Create a new user
@@ -53,10 +53,54 @@ wheel = group name
- 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`
+
+- Setup vncserver
+`$ vncserver -localhost`
+
- Starting a vncserver, the ports starts from 5900.
`$ vncserver :1`
-- Launch RealVNC Viewer, add new connection `localhost:5901` and type in password to connect to the vncserver
+- 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`
- - -