linutux
(Simon Zöllner)
July 15, 2019, 4:00am
1
I use vncserver to connect to a remote server with installed MATE DE. When I connect using VNC and start MATE-Terminal, some env vars are not set correctly:
sh-5.0$ echo $PATH
/usr/local/bin:/bin
missing sbin, so I can’t start any programs, like ifconfig
sh-5.0$ echo $XDG_DATA_DIRS
(nothing)
ALL XDG vars are not set
This is my ~/.vnc/xstartup:
#!/bin/sh
#unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
mate-session &
Any idea what goes wrong here?
vgaetera
(Vladislav Grigoryev)
July 15, 2019, 4:42am
2
ls -l /etc/profile ${HOME}/.bash*
getent passwd ${USER}
cp -v -R -f /etc/skel/. ${HOME}
linutux
(Simon Zöllner)
July 15, 2019, 10:20am
3
Don’t know why, but PATH is now set correctly, but $XDG_DATA_DIRS and $XDG_CONFIG_DIRS are still empty.
[simon@DesktopPC ~]$ echo $PATH
/home/simon/.local/bin:/home/simon/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
[simon@DesktopPC ~]$ echo $XDG_DATA_DIRS
[simon@DesktopPC ~]$ echo $XDG_CONFIG_DIRS
[simon@DesktopPC ~]$ ls -l /etc/profile ${HOME}/.bash*
-rw-r--r--. 1 root root 2105 9. Apr 09:47 /etc/profile
-rw-------. 1 simon simon 5533 15. Jul 02:30 /home/simon/.bash_history
-rw-r--r--. 1 simon simon 18 13. Mai 14:16 /home/simon/.bash_logout
-rw-r--r--. 1 simon simon 141 13. Mai 14:16 /home/simon/.bash_profile
-rw-r--r--. 1 simon simon 376 13. Mai 14:16 /home/simon/.bashrc
[simon@DesktopPC ~]$ getent passwd $HOME
[simon@DesktopPC ~]$ getenv passwd $HOME
-bash: getenv: Kommando nicht gefunden.
[simon@DesktopPC ~]$ cp -v -R -f /etc/skel/. ${HOME}
'/etc/skel/./.cloud-locale-test.skip' -> '/home/simon/./.cloud-locale-test.skip'
'/etc/skel/./.bash_logout' -> '/home/simon/./.bash_logout'
'/etc/skel/./.bash_profile' -> '/home/simon/./.bash_profile'
'/etc/skel/./.bashrc' -> '/home/simon/./.bashrc'
[simon@DesktopPC ~]$ echo $PATH
/home/simon/.local/bin:/home/simon/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
[simon@DesktopPC ~]$ ls -l /etc/profile ${HOME}/.bash*
-rw-r--r--. 1 root root 2105 9. Apr 09:47 /etc/profile
-rw-------. 1 simon simon 5533 15. Jul 02:30 /home/simon/.bash_history
-rw-r--r--. 1 simon simon 18 15. Jul 12:08 /home/simon/.bash_logout
-rw-r--r--. 1 simon simon 141 15. Jul 12:08 /home/simon/.bash_profile
-rw-r--r--. 1 simon simon 376 15. Jul 12:08 /home/simon/.bashrc
[simon@DesktopPC ~]$ echo $XDG_DATA_DIRS
[simon@DesktopPC ~]$
vgaetera
(Vladislav Grigoryev)
July 15, 2019, 11:55am
4
grep -r -e XDG_DATA_DIRS= /etc/profile*
qulogic
(Elliott Sales de Andrade)
July 15, 2019, 9:28pm
5
Neither of those are normally set by default.
linutux
(Simon Zöllner)
July 16, 2019, 1:42am
6
Are you sure? Is it not set by Mate?
vgaetera
(Vladislav Grigoryev)
July 16, 2019, 5:34am
7
# grep -r -e XDG_DATA_DIRS= /etc/profile*
/etc/profile.d/flatpak.sh: XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
# rpm -q -f /etc/profile.d/flatpak.sh
flatpak-1.4.2-2.fc30.x86_64