winapps-org / winapps

The winapps main project, forked from https://github.com/Fmstrat/winapps/
Other
998 stars 45 forks source link

installer.sh errors #103

Closed plyoung closed 4 months ago

plyoung commented 4 months ago

System: Fedora Linux 40 (Kinoite) x86_64 (Bazzite)

installer.sh does not seem to work right. I do see some flashes which I assume is from the VM since I saw the Windows lock screen background for a moment.

I've set up and started the VM via virt-manager. bin/winapps check did run and Explorer came up.

installer output

leslie@fedora:/var/home/leslie/Apps/winapps$ ./installer.sh
? Would you like to install for the current user or the whole system? User
Removing any old configurations...
./installer.sh: line 297: : command not found
./installer.sh: line 298: : command not found
Installing...
  Checking for installed apps in RDP machine (this may take a while)..../installer.sh: line 50: /var/home/leslie/Apps/winapps/apps//var/home/leslie/Apps/winapps/apps/info: No such file or directory
 Finished.

The RDP connection failed to connect or run. Please confirm FreeRDP can connect with:
  bin/winapps check

If it cannot connect, this is most likely due to:
  - You need to accept the security cert the first time you connect (with 'check')
  - Not enabling RDP in the Windows VM
  - Not being able to connect to the IP of the VM
  - Incorrect user credentials in winapps.conf
  - Not merging install/RDPApps.reg into the VM

winapps check output

leslie@fedora:/var/home/leslie/Apps/winapps$ bin/winapps check
[18:42:12:735] [12646:00003167] [INFO][com.freerdp.client.x11] - [xf_setup_x11]: Enabling X11 debug mode.
[18:42:13:80] [12646:00003167] [WARN][com.freerdp.crypto] - [verify_cb]: Certificate verification failure 'self-signed certificate (18)' at stack position 0
[18:42:13:80] [12646:00003167] [WARN][com.freerdp.crypto] - [verify_cb]: CN = RDPWindows
[18:42:13:80] [12646:00003167] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[18:42:13:80] [12646:00003167] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[18:42:13:82] [12646:00003167] [INFO][com.winpr.timezone] - [winpr_detect_windows_time_zone]: tzid: Africa/Johannesburg
[18:42:13:84] [12646:00003167] [WARN][com.freerdp.core.license] - [license_read_binary_blob_data]: license binary blob::type BB_ERROR_BLOB, length=0, skipping.
[18:42:13:102] [12646:00003167] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Local framebuffer format  PIXEL_FORMAT_BGRA32
[18:42:13:102] [12646:00003167] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Remote framebuffer format PIXEL_FORMAT_BGRA32
[18:42:13:104] [12646:000031ab] [INFO][com.freerdp.channels.rdpdr.client] - [devman_load_device_service]: Loading device service drive [home] (static)
[18:42:13:104] [12646:00003167] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [static] Loaded fake backend for rdpsnd
[18:42:13:104] [12646:00003167] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel ainput
[18:42:13:104] [12646:00003167] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpgfx
[18:42:13:104] [12646:00003167] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel disp
[18:42:13:104] [12646:00003167] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpsnd
[18:42:13:191] [12646:000031b0] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded fake backend for rdpsnd
[18:42:13:209] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:214] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:215] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:215] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:217] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:217] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:358] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:358] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:363] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:363] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:367] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:367] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:602] [12646:000031b0] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded fake backend for rdpsnd
[18:42:13:608] [12646:000031ab] [INFO][com.freerdp.channels.rdpdr.client] - [device_announce]: registered [    drive] device #1: home (type=8 id=1)
[18:42:13:635] [12646:000031b0] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:17} OnOpen=(nil), OnClose=0x7f3f478f57b0
[18:42:13:646] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:649] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:649] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:722] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:722] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:722] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:790] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:790] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[18:42:13:797] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[18:42:13:797] [12646:00003167] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
^C[18:43:10:190] [12646:00003166] [ERROR][com.freerdp.utils.signal] - [term_handler]: Caught signal 'Interrupt' [2]
[18:43:10:190] [12646:00003166] [INFO][com.freerdp.core] - [sig_abort_connect]: Signal Interrupt [2], terminating session 0x55c6fe720a20
[18:43:10:190] [12646:00003166] [ERROR][com.freerdp.core] - [freerdp_abort_connect_context]: ERRCONNECT_CONNECT_CANCELLED [0x0002000B]
[18:43:10:190] [12646:00003166] [INFO][com.freerdp.client.common.cliprdr.file] - [fuse_abort]: signal Interrupt [2] aborting session
[18:43:10:190] [12646:00003167] [INFO][com.freerdp.client.common] - [client_auto_reconnect_ex]: Network disconnect!
[18:43:10:190] [12646:00003167] [WARN][com.freerdp.client.common] - [client_auto_reconnect_ex]: Connection aborted by user
fuse: writing device: Bad file descriptor
[18:43:10:204] [12646:000031b0] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:17} OnOpen=(nil), OnClose=0x7f3f478f57b0
oskardotglobal commented 4 months ago

Are you running freerdp version 3? Also, we do not officially support virt-manager anymore, please use docker

plyoung commented 4 months ago

ah I see. I'll try figure out how to do the docker thing. FreeRDP reports this when I query version This is FreeRDP version 3.5.1 (n/a)

oskardotglobal commented 4 months ago

3.5.1 should work perfectly

plyoung commented 4 months ago

I got the docker installed and see Windows 11 in the browser but when I run bin/winapps check I just get a black fullscreen window now. Added, I removed name: "winapps" from the compose.yalm since docker-compose threw errors. (rest I kept as is).

Maybe it is just cause of my docker version and I need to switch to a distro that allows me to install the latest version. docker compose command does not work for example so I had to revert to docker-compose and have no idea how to update to "latest".

Sorry, very little experience with Linux and Docker so not sure what might I might be doing wrong.

Also, still getting the reported errors lines with installer.sh. Like the lines on 297 & 298 saying "command not found" and line 50 with no directory error. In this case I also get the fullscreen black window now. But again.. maybe just my distro. I'm gonna try install something else tomorrow and try all this again.

Btw, how does one access the shared "volume"? The one defined as data:/storage in the compose file? I can access it on Windows but no idea where it is on Linux side.

LDprg commented 4 months ago

@plyoung you could try podman instead. It normally just works and the cli usage is the same as docker. You just need the enable the podman socket.

Why cant you just update docker using dnf?

For folder sharing just mount a folder to /shared int the docker container.

oskardotglobal commented 4 months ago

@plyoung You should install Docker from the official engine installation guide linked in the docker setup docs They have their own RPM repository you need to add

(You can do this without having to recreate the VM, just make sure to run docker-compose down before reinstalling docker)

oskardotglobal commented 4 months ago

For folder sharing just mount a folder to /shared int the docker container.

If they mount the folder now they will have to reinstall the VM, which is why I said we should opt for bind mounts by default @LDprg

plyoung commented 4 months ago

I am on Bazzite, it is a Fedora atomic desktop using an ostree. The first step in Docker guide for example did not even work. I could not add the dnf-plugins-core to add their repo. I can not even do dnf search on this distro and I am too new to Linux to figure out how to deal with all this. So I'll rather try a distro that is bit more "normal" than wasting your time further with questions here.

DesNZ commented 4 months ago

I am having the same issues on Fedora Silverblue, using podman. Using the same freerdp version as @plyoung and setup with podman.

Please see attached terminal output:

Maybe an issue with immutable systems? I'll attempt to do some more digging see if I can find the issue.

DesNZ commented 4 months ago

Looking at the installer.sh script the first issue with no such file or directory, it looks like the $DIR and $F are calling the same thing.

In regards to the installer.sh not working, I'm thinking it's definitely an issue with immutable OS's, like Fedora Silverblue and others as /usr are read only filesystems etc.

I could see putting winapps in an e.g. distrobox but I'm not sure how well that would work in regards to the rdp connection port and graphics. Might look into it.

@plyoung In the meantime calling the application manually with ./bin/winapps manual "C:\my\directory\executableNotInPath.exe" works. from which I should be able to make a .desktop file to start these apps.

More manual than installer.sh but it works.

oskardotglobal commented 4 months ago

Did you try running the installer with --user?

DesNZ commented 4 months ago

Did you try running the installer with --user?

Yep, just did it now with a fresh git clone:

The output is: Removing any old configurations... ./installer.sh: line 297: : command not found Looking at the installer.sh line 297 there's no missing commands on my distro. I'm thinking something is silently failing and bash is calling a function as a regular command?

oskardotglobal commented 4 months ago

@Firelfy Can you try removing the double quotes around $SUDO on that line?

Xarishark commented 4 months ago

NOTICE: I AM USING DOCKER

I am having the same problems. Here is the check results: image

Here is the installer results: image

Reg is working and I can rdp fine with remmina and novnc. Check is also working as you can see. I will be happy to try anything you tell me to make it work. office 365 is already activated and installed and I have a full win11 install from your yaml

running the "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" manually works but I have the top bar cut(minimize close etc)

Edit: Another bug I have is the window is freaking out when maximized or I try to resize it but I count that as an nvidia wayland weirdness with KDE

EDIT2: Removing the quotes on sudo and forcing the user flag returns this error for line 50: image

DesNZ commented 4 months ago

@oskardotglobal

@Firelfy Can you try removing the double quotes around $SUDO on that line?

I get the following in response: Checking for installed apps in RDP machine (this may take a while)..../installer.sh: line 50: /var/home/cameron/winapps/apps//var/home/cameronvuleta/winapps/apps/info: No such file or directory

Looks like $DIR is being called twice in the for loop, I tried changing the code to:

     for F in $DIR/apps/*/ ; do
        [[ -e "$F" ]] || break
        # shellcheck disable=SC1090
        . "$F/info"
        printf "IF EXIST \"%s\" ECHO %s >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp" "$WIN_EXECUTABLE" "$F" >>"$HOME/.local/share/winapps/>
    done

Which gets me through, but I seem to fail elsewhere, a terminal window flashes at: Checking for installed apps in RDP machine (this may take a while)... At which point I get the RDP connection failed to connect or run error message.

oskardotglobal commented 4 months ago

@Xarishark @Firelfy there were some errors in installer.sh, this will be fixed with #107