VMware Horizon Community
Juhana1
Enthusiast
Enthusiast
Jump to solution

MATE Terminal incorrect CWD at launch in Horizon Agent version 8.8.0-21071111

Horizon Agent version 8.8.0-21071111, host OS is Ubuntu 22.04, desktop is MATE. When MATE Terminal (version 1.26.0) is launched, the current working directory opens as "/usr/lib/vmware/viewagent/java". Should naturally be the home folder (/home/USERNAME) of the user. Home folders are available on the host VM. A screenshot of MATE Terminal is attached.

Which config file we need to tweak to change this?

Kind regards,

Juhana K

University of Helsinki

Finland

0 Kudos
1 Solution

Accepted Solutions
Juhana1
Enthusiast
Enthusiast
Jump to solution

 

Hi @Hangl 

We became aware of and tested the new version 8.9.0-21434177 of Horizon Agent for Linux. This issue is resolved there.

Thanks for help!

-Juhana K

View solution in original post

0 Kudos
16 Replies
Hangl
VMware Employee
VMware Employee
Jump to solution

Hello Juhana K,

Can you provide the output of the "set" command?

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

Hi @Hangl 

Thanks for the reply. The output of 'set' seems to contain a lot of information that I suspect is partly sensitive, e.g. the FQDN of host, miscellaneous IDs, the user's email address, directory paths containing the username etc. Is there a particular section of the output you're interested in so that I could extract that for you? An extract would probably be easier to screen for sensitive info.

-Juhana K

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Hi @Juhana1,

I cannot reproduce in my lab with the same version.

It might be related to the user's shell prompt setting. So you can extract the PS1, PS2 and PWD by the following command,

 

 

set | egrep '(PS.*|PWD)'

 

 

 

- Hang Li

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

Hi,

Thanks for help. Here:

vdi-host:/usr/lib/vmware/viewagent/java$ set | egrep '(PS.*|PWD)'
GROUPS=()
OLDPWD=/
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS2='> '
PS4='+ '
PWD=/usr/lib/vmware/viewagent/java

 -Juhana K

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Hi @Juhana1,

Seems PWD hasn't been set properly. What is the output of the following command?

getent passwd $USER

 

Thanks,

- Hang Li

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

Hi,

I anonymized the output to reasonable extent, hope it still makes sense:

vdi-host:/usr/lib/vmware/viewagent/java$ getent passwd $USER
USERNAME:*:1056777:3000000:FAMILYNAME FIRSTNAME:/home/USERNAME:/bin/bash

 

-Juhana K

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Hi @Juhana1,

Can you provide the log bundle generated by /usr/lib/vmware/viewagent/bin/dct-debug.sh?

- Hang Li

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

 

Hi,

I can and I'd prefer to send it via email, are these still valid:

hangl(at)vmware(dot)com and linux-agent-bj-dev(at)vmware(dot)com

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Yes, they are.

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

Hi,

Great, thank you. Please stand by. I need to check with my team that the output bundle doesn't contain sensitive information.

Will send email to the above when confirmed. Got another task in my hands here right now so it may take a while. Will let you know here when sent.

-Juhana K 

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

 

Hi,

Thanks for your patience. I have now sent the bundle file via email to the addresses above.

-Juhana K

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Hi @Juhana1

Got it and will investigate it and get back to you as soon as possible.

- Hang Li

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Hi @Juhana1 ,

According to the log, it cannot "chdir" to the user's home directory even if it has root user privileges.

The user's home directory seems a link created by /etc/cubbli/hyad-pam-session.sh

 

Mar 24 09:42:04 vdi-cubic-016 /etc/cubbli/hyad-pam-session.sh: [3455] User <user> home directory is ./ad/lxhome/j/<user>/Linux
Mar 24 09:42:04 vdi-cubic-016 /etc/cubbli/hyad-pam-session.sh: [3455] Symlink /home/<user> -> ./ad/lxhome/j/<user>/Linux created.

 

 

Can you check the user's home directory permission mode by commands 'stat', 'getfacl', etc? And check if user root can access it?

BTW, seems the distribution is Cubbli Linux, please understand that we haven't officially tested on it and supported it.

Thanks,

- Hang Li

 

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

 

Hi @Hangl 

Thanks for your trouble. We will check the folder permissions according to your instructions. The Cubbli Linux is the centrally administered Linux distro of our organization, it is essentially a Ubuntu 22.04 LTS. One of the features of our distro is that the home directories are NFS mounts from a network server, that might be causing the issue. Will let you know how it goes.

-Juhana K

0 Kudos
Juhana1
Enthusiast
Enthusiast
Jump to solution

 

Hi @Hangl 

We became aware of and tested the new version 8.9.0-21434177 of Horizon Agent for Linux. This issue is resolved there.

Thanks for help!

-Juhana K

0 Kudos
Hangl
VMware Employee
VMware Employee
Jump to solution

Glad to hear that.