You are not logged in.
When I tried to connect to Arch system through ssh, it shows me error like,
/usr/lib/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console.But never wanted to start X-server from remote. Since I am using xinitrc to start my i3, I think the problem is in my zshrc file from where I have tried to start.
My xinitrc where I am starting i3,
xrandr --output HDMI-0 --right-of DP-0 &
feh --no-fehbg --bg-fill --randomize '$HOME/.local/share/wallpapers' &
setxkbmap -layout no -option caps:escape &
exec picom -CG --no-fading-openclose --xrender-sync-fence &
exec i3My .zshrc where I have am running startx,
if [[ -z $DISPLAY ]] && [[ $(tty)=/dev/tty2 ]]; then
startx $HOME/.config/X11/xinitrc
fiI think the problem is I am calling startx in zshrc which is also used when I access the system using ssh.
Is there any way I can startx automatically after login without using zshrc? OR is there some way out to my problem?
Offline
.zprofile is probably more appropriate. The Wiki currently recommends something like this:
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec startx
fiOffline
.zshrc is read every time you start a shell. You don't want startx in the file. Use, as tucuxi, suggests .zprofile.
Also, read the xinitrc wiki page, yours is incomplete.
Offline