Installing wine on Jetson Nano

with your sources and with aptitude I have installed the deb packages succesfully. Now I’m going futher.

zi@zi-desktop:/home/ubuntu/build$ sudo cp -a /usr/bin/qemu-i386-static /var/lib/schroot/chroots/focal-amd64/usr/bin/

zi@zi-desktop:/home/ubuntu/build$ ls /var/lib
AccountsService boltd fwupd ispell mysql-files private sudo update-manager
alsa colord gconf libvirt NetworkManager python synaptic update-notifier
app-info containerd gdm3 libxml-sax-perl nfs resolvconf systemd upower
apt dbus gems lightdm nvphs rpm tex-common usb_modeswitch
aptitude dhcp geoclue localechooser nvpmodel samba texmf usbutils
apt-xapian-index dictionaries-common ghostscript locales openbox sbuild ubiquity vim
aspell dkms git logrotate os-prober schroot ubuntu-drivers-common whoopsie
avahi-autoipd docker grub man-db PackageKit sddm ubuntu-fan xfonts
binfmts dpkg hp menu-xdg pam sgml-base ubuntu-release-upgrader xkb
blueman emacsen-common ieee-data misc plymouth snapd ucf xml-core
bluetooth exim4 initramfs-tools mpd polkit-1 snmp udisks2

zi@zi-desktop:/home/ubuntu/build$ ls /var/lib/schroot
chroots session union unpack

zi@zi-desktop:/home/ubuntu/build$ ls /var/lib/schroot/chroots
focal-amd64

zi@zi-desktop:/home/ubuntu/build$ ls /var/lib/schroot/chroots/focal-amd64
bin boot debootstrap dev etc home lib lib32 lib64 libx32 proc root run sbin sys tmp usr var

zi@zi-desktop:/home/ubuntu/build$ nano /etc/schroot/default/fstab

zi@zi-desktop:/home/ubuntu/build$ sudo nano /etc/schroot/default/fstab

zi@zi-desktop:/home/ubuntu/build$ sudo cp ~/.Xauthority /var/lib/schroot/chroots/focal-amd64/root/

zi@zi-desktop:/home/ubuntu/build$ sudo schroot -c source:focal-amd64 --directory=“/root” -u root /bin/bash
E: source:focal-amd64: Chroot not found

In your previous message you mentioned that creating the chroot failed in the middle because qemu was not installed properly yet:

So I suggest to delete broken chroot:

sudo rm -rf /var/lib/schroot/chroots/focal-amd64

And then try again to create it:

mkdir -p ~/ubuntu/build \
&& cd ~/ubuntu/build \
&& mk-sbuild --arch amd64 focal \
&& sudo cp -a /usr/bin/qemu-i386-static /var/lib/schroot/chroots/focal-amd64/usr/bin/

yes man,I did it already even if I didn’t reported because I haven’t got any error. Anyway,I can do it again :

root@zi-desktop:~# sudo rm -rf /var/lib/schroot/chroots/focal-amd64

root@zi-desktop:~# ls /home/ubuntu/build

root@zi-desktop:~#

root@zi-desktop:~# rm -r /home/ubuntu

root@zi-desktop:~# ls /home/
zi

zi@zi-desktop:~$ sudo mkdir -p /home/ubuntu/build
[sudo] password for zi:

zi@zi-desktop:~$ cd /home/ubuntu/build

zi@zi-desktop:/home/ubuntu/build$ mk-sbuild --arch amd64 focal
/usr/local/bin/qemu-debootstrap

I: Running command: debootstrap --arch amd64 --foreign --variant=buildd --components=main,restricted,universe,multiverse focal /var/lib/schroot/chroots/focal-amd64 Index of /ubuntu
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature…

Done building focal-amd64.

 To CHANGE the golden image: sudo schroot -c source:focal-amd64 -u root
 To ENTER an image snapshot: schroot -c focal-amd64
 To BUILD within a snapshot: sbuild -A -d focal-amd64 PACKAGE*.dsc
 To BUILD for : sbuild -A -d focal-amd64 --host  PACKAGE*.dsc

zi@zi-desktop:/home/ubuntu/build$ sudo cp -a /usr/bin/qemu-i386-static /var/lib/schroot/chroots/focal-amd64/usr/bin/
ok

zi@zi-desktop:/home/ubuntu/build$ sudo schroot -c source:focal-amd64 --directory="/root" -u root /bin/bash

(focal-amd64)root@zi-desktop:~#

and now ? it worked ! you are a great teacher.

---> Note: wine-development and wine32-development packages in Ubuntu Focal are broken; wine and wine32 are older

why did u use ubuntu Focal and you didn't use a more updated distro ?

Because it is the latest LTS release. If you want to experiment with newer releases, you can try mk-sbuild --arch amd64 hirsute (21.04) or even mk-sbuild --arch amd64 impish (21.10, but it is still in development). Then in other commands replace focal with the version name you have chosen.

you shouldn’t use mv,but cp and then you do : sudo nano /etc/apt/sources.list

Looks like your sources.list is missing. This is not good but in this case does not matter, just create new one with the content I have provided in Installing wine on Jetson Nano - #38 by Lissanro and run sudo apt update.

After this please reread Installing wine on Jetson Nano - #16 by Lissanro and use updated commands - I improved the tutorial a bit and provided precompiled qemu so you do not have to build it from scratch anymore.

its not missing. he moved it,instead of copying it :D

The idea was to copy and paste provided content to an empty file, this is why in this case mv is better - nano will create new empty file if the file does not exist yet; cp command can also be used, but then you may need to make the file empty before copying and pasting content of my sources.list (if you paste it to non-empty sources.list, there may be duplicates or conflicts).

sure. but he can’t complain that the file is missing if he moved it :) Anyway :

(focal-amd64)root@zi-desktop:~# DISPLAY=:0 winecfg

bash: winecfg: command not found

(focal-amd64)root@zi-desktop:~# winecfg
bash: winecfg: command not found

(focal-amd64)root@zi-desktop:~# wine
bash: wine: command not found

(focal-amd64)root@zi-desktop:~# apt install --install-recommends wget curl nano ssl-cert ca-certificates winbind software-properties-common wine64 wine32

Reading package lists… Done
Building dependency tree
Reading state information… Done
nano is already the newest version (4.8-1ubuntu1).
ssl-cert is already the newest version (1.0.39).
wget is already the newest version (1.20.3-1ubuntu1).
wine64 is already the newest version (5.0-3ubuntu1).
wine32:i386 is already the newest version (5.0-3ubuntu1).
ca-certificates is already the newest version (20210119~20.04.1).
curl is already the newest version (7.68.0-1ubuntu2.5).
software-properties-common is already the newest version (0.98.9.5).
winbind is already the newest version (2:4.11.6+dfsg-0ubuntu1.8).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

(focal-amd64)root@zi-desktop:~# find / -name winecfg
(focal-amd64)root@zi-desktop:~#

(focal-amd64)root@zi-desktop:~# find / -name wine
/usr/lib/wine
/usr/lib/wine/wine
/usr/lib/i386-linux-gnu/wine
/usr/lib/x86_64-linux-gnu/wine
/usr/share/wine
/usr/share/wine/wine

This is strange… For me it is there (I guess at some point I installed it somehow, probably by typing wine instead of wine32):

(focal-amd64)root@jetson:~# find / -name winecfg
/usr/bin/winecfg
/etc/alternatives/winecfg

winecfg is a part of wine package. Please try to run:

apt install wine

I thought it will install automatically as a dependency, but looks like it did not. It seems it is necessary to explicitly install it.

ok. I’m connected to the nano with ssh and this is what happens :

(focal-amd64)root@zi-desktop:~# DISPLAY=:0 winecfg

wine: created the configuration directory ‘/root/.wine’
No protocol specified
No protocol specified
0012:err:ole:marshal_object couldn’t get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0012:err:ole:marshal_object couldn’t get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0012:err:ole:get_local_server_stream Failed: 80004002
0014:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0014:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 87
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0014:err:ole:marshal_object couldn’t get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 14007
0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x800736b7
0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 800736b7
0014:err:ole:get_local_server_stream Failed: 800736b7
000b:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
000b:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0010:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0010:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
Could not find Wine Gecko. HTML rendering will be disabled.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
001a:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
001a:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

isn’t a way to use ssh to have the graphical interface ? I’ve always asked it to myself.

winecfg (or any other GUI application) will not work if you do not have X server running. In my case I have 5" 2560x1440 HDMI display connected to Jetson Nano, and I use x11vnc server on Jetson Nano and xtightvncviewer on my PC if I want to interact with Jetson Nano GUI remotely.

It may be possible to run X server without actual display connected (for example, using x2goserver), but I did not try this myself on Jetson Nano.

Yes, you are right, ssh -Y is another possible way to get it running (but I never used it before). Great to see you got winecfg to work remotely.

I decided to try this too, this is how I set things up (since you already have it working, instructions below are for others who are looking for steps to get GUI working via ssh):

To enable ssh server in the chroot environment:

sudo schroot -c source:focal-amd64 --directory="/root" -u root /bin/bash
apt install openssh-server
nano /etc/ssh/sshd_config

Find # Port 22 and replace it with Port 2222 (assuming port 22 is already used by ssh service in native environment, in the chroot we have to use different port). Also find #PermitRootLogin prohibit-password and replace with PermitRootLogin yes. Make sure X11Forwarding yes is uncommented (without # in front of it) and set to yes. Press Ctrl+O to save and Ctrl+X to exit. Then restart the ssh service:

service ssh restart

If chroot environment is running, you should be able to login to the chroot environment remotely from your PC (replace jetson.local with actual address of your Jetson Nano):

ssh root@jetson.local -p2222

To run GUI applications via ssh, add -Y argument and the name of the executable at the end, for example:

ssh -Y root@jetson.local -p2222 winecfg

there is no need to play with the ports. I followed this tutorial :

it is easy as :

  1. installs open ssh server on the chroot

  2. edit sshd_config on the nano chroot

~$ nano /etc/ssh/sshd_config

If sshd_config includes #X11Forwarding no (or just X11Forwarding no ), change it to X11Forwarding yes

  1. on the host system :
~$ ssh -Y root@192.168.1.3 winecfg




you lost me on mv and cp.