Closed ShamrockLee closed 3 years ago
Reminds me of one yet unmerged commit from #26. Does adding this snippet to your home-manager configuration help?
{
# Fix locale (perl apps panic without it)
home.sessionVariables = {
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
};
}```
It doesn't work. Should I reinstall something then?
You can try to. That fix got merged in the meantime, maybe something would change.
To help me understand the issue, please:
env
after that. Again, post the relevant configs and the whole terminal output.This way it would be easiest for me to understand what precisely did you do and what exactly failed. Thank you.
Terminal output during the initial installation:
Welcome to Nix-on-Droid!
If nothing works, open an issue at https://github.com/t184256/nix-on-droid/issues or try the rescue shell.
Setting default user profile...
Sourcing Nix environment...
Installing and updating nix-channels...
unpacking channels...
b.com/t184256/nix-on-droid/issues or try the rescue shell.
Setting default user profile...
Sourcing Nix environment...
Installing and updating nix-channels...
unpacking channels...
created 1 symlinks in user environment
these derivations will be built:
/nix/store/26myds0rkzkbbaa0i5q5b2b4v3js6l5g-nix-on-droid.drv
building '/nix/store/26myds0rkzkbbaa0i5q5b2b4v3js6l5g-nix-on-droid.drv'...
unpacking channels...
created 2 symlinks in user environment
Copying default nix-on-droid config...
Installing first nix-on-droid generation...
[1 built, 43 copied (69.5 MiB), 16.1 MiB DL]
Building activation package...
[13 built, 10 copied (217.0 MiB), 20.5 MiB DL]
Executing activation script...
Activating linkBinSh
Activating linkUsrBinEnv
Activating installLogin
Activating installLoginInner
Activating installPackages
installing 'nix-on-droid-path'
building '/nix/store/08jybdgsss7jyqzw7shd1vwlh7945h5q-user-environment.drv'...
created 5 symlinks in user environment
Activating installProotStatic
Activating setUpEtc
Removing obsolete symlink '/etc/UNINTIALISED'...
Activating linkProfile
Congratulations! Now you have Nix installed with some default packages like bashInteractive, coreutils, cacert and most important nix-on-droid itself to manage local configuration, see
nix-on-droid help
or in the config file
~/.config/nixpkgs/nix-on-droid.nix
You can go for the bare nix-on-droid setup or you can configure your phone via home-manager. See config file for further information.
Sourcing Nix environment...
bash-4.4$
Tightvnc vncserver
terminal output:
bash-4.4$ export DISPLAY=":1"
bash-4.4$ vncserver
vncserver: couldn't find "Xvnc" on your PATH.
bash-4.4$
bash-4.4$ #Allow storage access
bash-4.4$ vncserver
vncserver: couldn't find "Xvnc" on your PATH.
bash-4.4$ vncserver --localhost
vncserver: couldn't find "Xvnc" on your PATH.
bash-4.4$ vncserver localhost
vncserver: couldn't find "Xvnc" on your PATH.
bash-4.4$
Installed Packages and output of env
:
bash-4.4$ nix-env -q
coreutils-8.31
man-db-2.8.6.1
nix-on-droid-path
openbox-3.6.1
tightvnc-1.3.10
zip-3.0
bash-4.4$ nix-env --version
nix-env (Nix) 2.3.2
bash-4.4$ nix-channel --version
nix-channel (Nix) 2.3.2
bash-4.4$ nix-channel --list
nix-on-droid https://github.com/t184256/nix-on-droid/archive/master.tar.gz
nixpkgs https://nixos.org/channels/nixos-19.09
bash-4.4$ env
PROOT_L2S_DIR=/data/data/com.termux.nix/files/usr/.l2s
LD_LIBRARY_PATH=/data/data/com.termux.nix/files/usr/lib
LANG=en_US.UTF-8
PREFIX=/data/data/com.termux.nix/files/usr
USER=nix-on-droid
TZDIR=/etc/zoneinfo
NIX_PROFILES=/nix/var/nix/profiles/default /data/data/com.termux.nix/files/home/.nix-profile
PWD=/data/data/com.termux.nix/files/home
NIX_PATH=nixpkgs=/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs/:/data/data/com.termux.nix/files/home/.nix-defexpr/channels
HOME=/data/data/com.termux.nix/files/home
TMPDIR=/data/data/com.termux.nix/files/usr/tmp
TERM=xterm-256color
NIX_SSL_CERT_FILE=/data/data/com.termux.nix/files/home/.nix-profile/etc/ssl/certs/ca-bundle.crt
SHLVL=1
ANDROID_ROOT=/system
LOCALE_ARCHIVE=/nix/store/sgimiw1jz3pb8sw823f5lv2k97k8fwq2-glibc-locales-2.27/lib/locale/locale-archive
ANDROID_DATA=/data
EXTERNAL_STORAGE=/sdcard
PATH=/data/data/com.termux.nix/files/home/.nix-profile/bin:/data/data/com.termux.nix/files/usr/bin:/data/data/com.termux.nix/files/usr/bin/applets
PROOT_TMP_DIR=/data/data/com.termux.nix/files/usr/tmp
GC_NPROCS=1
__NOD_SESS_INIT_SOURCED=1
_=/data/data/com.termux.nix/files/home/.nix-profile/bin/env
OLDPWD=/data/data/com.termux.nix/files
Terminal output when installing packages: installing_packages_202001241910.txt
Weird, but it seems like tightvnc doesn't have Xvnc, only tigervnc does. On my NixOS laptop:
$ nix run nixpkgs.tightvnc
$ Xvnc
The program ‘Xvnc’ is currently not installed. You can install it by typing:
nix-env -iA nixos.tigervnc
/data/data/com.termux.nix
bash-4.4$ nix-env -e tightvnc
uninstalling 'tightvnc-1.3.10'
bash-4.4$ nix-env -iA nixpkgs.tigervnc
installing 'tigervnc-1.9.0'
......
bash-4.4$ echo $DISPLAY
bash-4.4$ vncserver --help
/usr/bin/env: ‘perl’: No such file or directory
bash-4.4$ nix search ^perl\$
warning: using cached results; pass '-u' to update the cache
* nixpkgs.perl (perl)
The standard implementation of the>
* nixpkgs.perl528 (perl)
The standard implementation of the>
* nixpkgs.perl528Packages.perl (perl)
The standard implementation of the>
* nixpkgs.perl530 (perl)
The standard implementation of the>
* nixpkgs.perl530Packages.perl (perl)
The standard implementation of the>
* nixpkgs.perlPackages.perl (perl)
The standard implementation of the>
* nixpkgs.perldevel (perl)
bash-4.4$ nix-env -iA nixpkgs.perl
......
bash-4.4$ vncserver --help .vncserver-wrapped: couldn't find "xauth" on your PATH.
bash-4.4$ xauth --help
bash: xauth: command not found
bash-4.4$ nix search ^xauth warning: using cached results; pass '-u' to update the cache
* nixpkgs.xorg.xauth (xauth)
bash-4.4$ nix-env -iA nixpkgs.xorg.xauth
......
bash-4.4$ vncserver --help
usage: .vncserver-wrapped [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
[-autokill]
[-noxstartup]
[-xstartup <file>]
<Xvnc-options>...
.vncserver-wrapped -kill <X-display>
.vncserver-wrapped -list
bash-4.4$ vncserver :1
You will require a password to access your desktops.
Password: # shown in plain text
Verify: # shown in plain text
Would you like to enter a view-only password (y/n)? n
xauth: file /data/data/com.termux.nix/files/home/.Xauthority does not exist
Could not start Xvnc.
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Xvnc TigerVNC 1.9.0 - built Jan 1 1970 00:00:01
Copyright (C) 1999-2018 TigerVNC Team and many others (see README.rst)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12005000, The X.Org Foundation
Sat Jan 25 09:28:33 2020
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE)
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE)
bash-4.4$
Solved in https://github.com/t184256/nix-on-droid/issues/75, more precisely https://github.com/t184256/nix-on-droid/issues/75#issuecomment-682208218, with root causes. Can be closed in favor of other thread?
@deliciouslytyped Thank you!
I have installed
nixpkgs.xorg
,nixpkgs.xwaayland
,nixpkgs.openbox
andnixpkgs-unstable.tightvnc
, andexport DISPLAY=":1"
but getwhen running
vncserver
. So I still have difficulty getting a gui.