Fmstrat / winapps

Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration.
8.52k stars 406 forks source link

Nothing happens when clicking on the application icon or manually start it. #100

Open kxxt opened 3 years ago

kxxt commented 3 years ago

Hi:smile:, winapps is very awesome! While using , I encountered a few problems. When I click on the app icons or manually start them , for example , winapps manual cmd,Nothing happens. even the cpu usage of the virtual machine didn't change.

My setup process of winapps: Before running installer.sh . winapps check runs smoothly and the explorer did show up. When using --system installation , I encountered some permission denied errors,so I switched to --user installation. The --user installation finished without errors.

The cmd window did popup during ./installer.sh , so i think it's not xfreerdp's issue.

Maybe video better describe my problem.

https://drive.google.com/file/d/1jIj6ZC6344c6Lfr1WpcWD-3whvilPlz8/view?usp=sharing

This is my config file(username and password has been hidden)

RDP_USER="<Hidden for Privacy>"
RDP_PASS="<Hidden for Privacy>"
RDP_IP="192.168.122.146"
RDP_SCALE=200

My system environment:

My Virtual Machine xml:

<domain type="kvm">
  <name>RDPWindows</name>
  <uuid>e4330daa-4917-47c2-97b7-3e7781d69105</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">4194304</memory>
  <currentMemory unit="KiB">1048576</currentMemory>
  <vcpu placement="static">2</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-5.1">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
    </hyperv>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model" check="partial"/>
  <clock offset="localtime">
    <timer name="hpet" present="yes"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/RDPWindows.qcow2"/>
      <target dev="vda" bus="virtio"/>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/kxxt/Downloads/virtio-win-0.1.185.iso"/>
      <target dev="sdc" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="2"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:74:cc:b2"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>
Fmstrat commented 3 years ago

Hmm.. Can you edit ~/.local/bin/winapps and add set -x near the top? That will print out a lot of information when you run manually to help debug.

kxxt commented 3 years ago

After modification, the command msedge.exe outputs the following:

➜  ~ msedge.exe             
+ '[' '!' -f /home/kxxt/.config/winapps/winapps.conf ']'
+++ readlink -f /home/kxxt/.local/bin/winapps
++ dirname /home/kxxt/.local/bin/winapps
+ DIR=/home/kxxt/.local/bin
++ date
+ RUN='Thu Dec 24 09:29:24 PM CST 2020-32240'
+ '[' '!' -d /home/kxxt/.local/share/winapps ']'
+ RDP_SCALE=100
+ '[' -f /home/kxxt/.config/winapps/winapps.conf ']'
+ . /home/kxxt/.config/winapps/winapps.conf
++ RDP_USER=kxxt
++ RDP_PASS=<HIDDEN_FOR_PRIVACY>
++ RDP_IP=192.168.122.146
++ RDP_SCALE=200
+ dprint START
+ '[' '' = true ']'
+ '[' -f /home/kxxt/.local/share/winapps/run ']'
++ stat -t -c %Y /home/kxxt/.local/share/winapps/run
+ LAST_RAN=1608816545
+ dprint LAST_RAN:1608816545
+ '[' '' = true ']'
+ touch /home/kxxt/.local/share/winapps/run
++ stat -t -c %Y /home/kxxt/.local/share/winapps/run
+ THIS_RUN=1608816564
+ dprint THIS_RUN:1608816564
+ '[' '' = true ']'
+ ((  1608816564 - 1608816545 < 2  ))
++ which xfreerdp
+ '[' -z /usr/bin/xfreerdp ']'
+ '[' -z 192.168.122.146 ']'
+ dprint 1:msedge.exe
+ '[' '' = true ']'
+ dprint 2:msedge.exe
+ '[' '' = true ']'
+ dprint @:msedge.exe msedge.exe ico
+ '[' '' = true ']'
+ MULTI_FLAG=span
+ '[' '' = true ']'
+ '[' msedge.exe = windows ']'
+ '[' msedge.exe = check ']'
+ '[' msedge.exe = manual ']'
+ '[' msedge.exe '!=' install ']'
+ dprint DIR:/home/kxxt/.local/bin
+ '[' '' = true ']'
+ '[' -e /home/kxxt/.local/bin/../apps/msedge.exe/info ']'
+ '[' -e /home/kxxt/.local/share/winapps/apps/msedge.exe/info ']'
+ . /home/kxxt/.local/share/winapps/apps/msedge.exe/info
++ NAME='Microsoft Edge'
++ FULL_NAME='Microsoft Edge'
++ WIN_EXECUTABLE='C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
++ CATEGORIES=WinApps
++ MIME_TYPES=
+ ICON=/home/kxxt/.local/share/winapps/apps/msedge.exe/icon.svg
+ '[' -n msedge.exe ']'
+ dprint HOME:/home/kxxt
+ '[' '' = true ']'
++ echo msedge.exe
++ sed 's|/home/kxxt|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g'
+ FILE=msedge.exe
+ dprint FILE:msedge.exe
+ '[' '' = true ']'
+ dprint END
+ '[' '' = true ']'
+ xfreerdp /d: /u:kxxt /p:<HIDDEN_FOR_PRIVACY> /v:192.168.122.146 +auto-reconnect +clipboard +home-drive -wallpaper /scale:200 /dynamic-resolution /span '/wm-class:Microsoft Edge' '/app:C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' /app-icon:/home/kxxt/.local/share/winapps/apps/msedge.exe/icon.svg '/app-cmd:"msedge.exe"'

Still, nothing shows up and I can't figure out why. Sorry for the late response.

kxxt commented 3 years ago

.\tasklist.exe | FindStr msedge outputs nothing. So I think the app is not started by winapps.