https://www.funtoo.org/api.php?action=feedcontributions&user=Stamasd&feedformat=atomFuntoo - User contributions [en]2024-03-29T15:10:56ZUser contributionsMediaWiki 1.36.2https://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=43300NordVPN connection setup HOWTO2023-09-06T14:45:53Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
1a. Verify that you have the necessary network devices installed. Just installing openvpn does not automatically activate the tunnel device.<br />
<br />
{{console|body=<br />
$##i## sudo ls /dev/net/<br />
tun<br />
}}<br />
<br />
If you don't see "tun" listed or get an error "ls: cannot access '/dev/net': No such file or directory" it means you don't have the <b>tun</b> module loaded. You can load it momentarily by issuing <br />
<br />
{{console|body=<br />
$##i## sudo modprobe tun }}<br />
<br />
...and to get it to autoload at boot the next time, create (as root) a file /etc/modules-load.d/tun.conf with the contents<br />
<br />
{{file|name=/etc/modules-load.d/tun.conf|body=<br />
tun }}<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates as individual files for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
Update 2023: the username/password that you must use to connect using the method above are no longer the same username/password that you use to log into your NordVPN account on their website, or into the desktop app. Instead they are autogenerated hashes. To obtain them you have to request them from your account dashboard (at the bottom, click "setup NordVPN manually", and you will have to go through a 2FA process then they will be shown in your dashboard).<br />
<br />
<br />
One further note, if you want to avoid having to type in the terminal your username and password every time, you can edit the configuration file (such as us3642.nordvpn.com.tcp.ovpn in the example above) and change the line that says<br />
{{console|body=<br />
auth-user-pass<br />
}}<br />
to read <br />
{{console|body=<br />
auth-user-pass passfile<br />
}}<br />
<br />
and also create a text file "passfile" in the same directory that contains your username and password on 2 separate lines (see man openvpn, section "client")<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29737NordVPN connection setup HOWTO2019-10-27T16:07:32Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
1a. Verify that you have the necessary network devices installed. Just installing openvpn does not automatically activate the tunnel device.<br />
<br />
{{console|body=<br />
$##i## sudo ls /dev/net/<br />
tun<br />
}}<br />
<br />
If you don't see "tun" listed or get an error "ls: cannot access '/dev/net': No such file or directory" it means you don't have the <b>tun</b> module loaded. You can load it momentarily by issuing <br />
<br />
{{console|body=<br />
$##i## sudo modprobe tun }}<br />
<br />
...and to get it to autoload at boot the next time, create (as root) a file /etc/modules-load.d/tun.conf with the contents<br />
<br />
{{file|name=/etc/modules-load.d/tun.conf|body=<br />
tun }}<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates as individual files for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29736NordVPN connection setup HOWTO2019-10-27T13:16:11Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
1a. Verify that you have the necessary network devices installed. Just installing openvpn does not automatically activate the necessary tunnel device.<br />
<br />
{{console|body=<br />
$##i## sudo ls /dev/net/<br />
tun<br />
}}<br />
<br />
If you don't see "tun" listed or get an error "ls: cannot access '/dev/net': No such file or directory" it means you don't have the <b>tun</b> module loaded. You can load it momentarily by issuing <br />
<br />
{{console|body=<br />
$##i## sudo modprobe tun }}<br />
<br />
...and to get it to autoload at boot the next time, create (as root) a file /etc/modules-load.d/tun.conf with the contents<br />
<br />
{{file|name=/etc/modules-load.d/tun.conf|body=<br />
tun }}<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates as individual files for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29735NordVPN connection setup HOWTO2019-10-27T13:05:42Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
1a. Verify that you have the necessary network devices installed. Just installing openvpn does not automatically activate the necessary tunnel device.<br />
<br />
{{console|body=<br />
$##i## sudo ls /dev/net/<br />
tun<br />
}}<br />
<br />
If instead you get an error "ls: cannot access '/dev/net': No such file or directory" it means you don't have the <b>tun</b> module loaded. You can load it momentarily by issuing <br />
<br />
{{console|body=<br />
$##i## sudo modprobe tun }}<br />
<br />
...and to get it to autoload at boot the next time, create (as root) a file /etc/modules-load.d/tun.conf with the contents<br />
<br />
{{file|name=/etc/modules-load.d/tun.conf|body=<br />
tun }}<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates as individual files for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29714NordVPN connection setup HOWTO2019-10-25T16:52:32Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates as individual files for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29713NordVPN connection setup HOWTO2019-10-25T12:57:13Z<p>Stamasd: </p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=NordVPN_connection_setup_HOWTO&diff=29712NordVPN connection setup HOWTO2019-10-25T12:56:42Z<p>Stamasd: Created page with "NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide...."</p>
<hr />
<div>NordVPN provides apps for Linux, but only for .deb and .rpm-based distributions. To use your NordVPN account in Funtoo, openvpn can be used in CLI mode. Here is a quick guide.<br />
<br />
1. If you don't have it already, install openvpn.<br />
<br />
{{console|body=<br />
$##i## sudo emerge net-vpn/openvpn }}<br />
<br />
<br />
<br />
2. Download the NordVPN connection certificates into a directory of your choice. I keep them in my home folder into a ~/vpn directory.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/vpn<br />
$##i## cd ~/vpn<br />
$##i## wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip<br />
$##i## unzip ovpn.zip<br />
}}<br />
<br />
The above will create 2 subfolders inside ~/vpn, ovpn_tcp and ovpn_udp. Each holds the CA certificates for all NordVPN servers, for using the TCP and UDP protocols respectively.<br />
<br />
<br />
<br />
3. Open in your browser https://nordvpn.com/servers/tools/ - this will give you the name of the server NordVPN recommends that you connect to at the moment based on load, your geographic location, etc. Note that the recommended server may change from minute to minute.<br />
<br />
Also note that on the right side of the page you can select an alternate country, as well as advanced options such as server type, protocol, security etc.<br />
<br />
Assume for the following that the recommended server is, for instance, us3642.nordvpn.com <br />
<br />
<br />
<br />
4. Navigate to the folder containing the certificates for the protocol you want, TCP or UDP (I mostly use TCP) and start the VPN session. You will be prompted 3 times: first for your Funtoo user password (for sudo), next for your NordVPN username, and last for your NordVPN password. The VPN will be then established after you authenticate.<br />
<br />
{{console|body=<br />
$##i## cd ~/vpn/ovpn_tcp<br />
$##i## sudo openvpn us3642.nordvpn.com.tcp.ovpn<br />
Password: <br />
Fri Oct 25 07:57:19 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 24 2019<br />
Fri Oct 25 07:57:19 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10<br />
Enter Auth Username:<br />
Enter Auth Password:<br />
}}<br />
<br />
(using above the certificate file corresponding to the server recommended in step 3; change as needed)<br />
<br />
<br />
<br />
5. To end the VPN connection, use CTRL-C in the terminal to terminate the openvpn process.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2955432 bit chroot environment for Wine2019-10-13T14:07:15Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
<br />
And a final trick. Once you have everything setup, if you know how to use shell scripts you can automate the process of setting the cookie and entering the chroot. For instance I use a script that I put in ~/gentoo:<br />
<br />
{{file|name=/home/<username>/gentoo/chr.sh|body=<br />
rm /home/<username>/gentoo/root/.Xauthority<br />
xauth extract /home/<username>/root/.Xauthority <hostname>/unix:0<br />
mount -t proc none proc<br />
mount --rbind /sys sys<br />
mount --rbind /dev dev<br />
env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}<br />
<br />
Replace <username> with your user name, and <hostname> with your machine's name. <br />
By executing that script as root from the ~/gentoo directory it automatically sets the cookie and enters the chroot. <br />
<br />
To get the (chroot)# prompt, you can add the line <br />
<br />
<b>export PS1="(chroot) $PS1"</b><br />
<br />
at the end of your /home/<username>/gentoo/etc/profile file.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Official Documentation]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2955332 bit chroot environment for Wine2019-10-12T17:21:42Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
<br />
And a final trick. Once you have everything setup, if you know how to use shell scripts you can automate the process of setting the cookie and entering the chroot. For instance I use a script that I put in ~/gentoo:<br />
<br />
{{file|name=/home/<username>/gentoo/chr.sh|body=<br />
rm /home/<username>/gentoo/root/.Xauthority<br />
xauth extract /home/<username>/root/.Xauthority <hostname>/unix:0<br />
mount -t proc none proc<br />
mount --rbind /sys sys<br />
mount --rbind /dev dev<br />
env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}<br />
<br />
Replace <username> with your user name, and <hostname> with your machine's name. <br />
By executing that script as root from the ~/gentoo directory it automatically sets the cookie and enters the chroot. <br />
<br />
To get the (chroot)# prompt, you can add the line <br />
<br />
<b>export PS1="(chroot) $PS1"</b><br />
<br />
at the end of your /home/<username>/gentoo/etc/profile file.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2955232 bit chroot environment for Wine2019-10-12T17:19:57Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
<br />
And a final trick. Once you have everything setup, if you know how to use shell scripts you can automate the process of setting the cookie and entering the chroot. For instance I use a script that I put in ~/gentoo:<br />
<br />
{{file|name=/home/<username>/gentoo/chr.sh|body=<br />
rm /home/<username>/gentoo/root/.Xauthority<br />
xauth extract /home/<username>/root/.Xauthority <hostname>/unix:0<br />
mount -t proc none proc<br />
mount --rbind /sys sys<br />
mount --rbind /dev dev<br />
env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}<br />
<br />
Replace <username> with your user name, and <hostname> with your machine's name. <br />
By executing that script as root from the ~/gentoo directory it automatically sets the cookie and enters the chroot. <br />
<br />
To get the (chroot)# prompt, you can add the line <br />
<br />
<b>export PS1="(chroot) $PS1"</b><br />
<br />
at the end of your /home/<username>/gentoo/etc/profile file.<br />
<br />
You're ready to go!<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2955132 bit chroot environment for Wine2019-10-12T17:18:17Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
<br />
And a final trick. Once you have everything setup, if you know how to use shell scripts you can automate the process of setting the cookie and entering the chroot. For instance I use a script that I put in ~/gentoo:<br />
<br />
{{file|name=/home/<username>/gentoo/chr.sh|body=<br />
rm /home/<username>/gentoo/root/.Xauthority<br />
xauth extract /home/<username>/root/.Xauthority <hostname>/unix:0<br />
mount -t proc none proc<br />
mount --rbind /sys sys<br />
mount --rbind /dev dev<br />
env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}<br />
<br />
Replace <username> with your user name, and <hostname> with your machine's name. <br />
<br />
By executing that as root from the ~/gentoo directory it automatically sets the cookie and enters the chroot. <br />
<br />
To get the (chroot)# prompt, you can add the line <br />
<br />
<b>export PS1="(chroot) $PS1"</b><br />
<br />
at the end of your /home/<username>/gentoo/etc/profile file.<br />
<br />
You're ready to go!<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2955032 bit chroot environment for Wine2019-10-12T17:10:47Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
<br />
And a final trick. Once you have everything setup, if you know how to use shell scripts you can automate the process of setting the cookie and entering the chroot. For instance I use a script that I put in ~/gentoo:<br />
<br />
{{file|name=/home/<username>/gentoo/chr.sh|body=<br />
rm /home/<username>/gentoo/root/.Xauthority<br />
xauth extract /home/<username>/root/.Xauthority <hostname>/unix:0<br />
mount -t proc none proc<br />
mount --rbind /sys sys<br />
mount --rbind /dev dev<br />
env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}<br />
<br />
Replace <username> with your user name, and <hostname> with your machine's name. <br />
<br />
By executing that as root from the ~/gentoo directory it automatically sets the cookie and enters the chroot. You're ready to go!<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954932 bit chroot environment for Wine2019-10-12T16:41:40Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
<br />
<b>NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working.</b> <br />
<br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954832 bit chroot environment for Wine2019-10-12T16:38:34Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo/Funtoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954732 bit chroot environment for Wine2019-10-12T16:31:27Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)##bl#####i## emerge-webrsync<br />
\##r####b##(chroot)##bl#####i## emerge --sync<br />
\##r####b##(chroot)##bl#####i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)##bl#####i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954632 bit chroot environment for Wine2019-10-12T16:29:15Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r####b##(chroot)###i## emerge-webrsync<br />
\##r####b##(chroot)###i## emerge --sync<br />
\##r####b##(chroot)###i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r####b##(chroot)###i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954532 bit chroot environment for Wine2019-10-12T16:22:36Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
\##r##(chroot)###i## emerge-webrsync<br />
\##r##(chroot)###i## emerge --sync<br />
\##r##(chroot)###i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
\##r##(chroot)###i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
\##r##(chroot)###i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
\##r##(chroot)###i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
\##r##(chroot)###i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
\##r##(chroot)###i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
\##r##(chroot)###i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954432 bit chroot environment for Wine2019-10-12T15:59:15Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{console|body=<br />
$##i## mkdir ~/gentoo<br />
$##i## cd ~/gentoo<br />
$##i## wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{console|body=<br />
$##i## sudo su<br />
###i## tar xpf <stage3><br />
###i## cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
###i## mount -t proc none proc<br />
###i## mount --rbind /sys sys<br />
###i## mount --rbind /dev dev<br />
###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
###i## export PS1="(chroot) $PS1"<br />
(chroot)###i## emerge-webrsync<br />
(chroot)###i## emerge --sync<br />
(chroot)###i## eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{console|body=<br />
(chroot)###i## eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{console|body=<br />
(chroot)###i## emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{console|body=<br />
$##i## xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{console|body=<br />
$##i## sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{console|body=<br />
(chroot)###i## xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{console|body=<br />
$##i## echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{console|body=<br />
(chroot)###i## export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{console|body=<br />
(chroot)###i## xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{console|body=<br />
(chroot)###i## emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954332 bit chroot environment for Wine2019-10-12T15:42:59Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at <b>{{c|X redirection}}</b>.<br />
<br />
{{file|body=<br />
$ mkdir ~/gentoo<br />
$ cd ~/gentoo<br />
$ wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{file|body=<br />
$ sudo su<br />
# tar xpf <stage3><br />
# cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
# mount -t proc none proc<br />
# mount --rbind /sys sys<br />
# mount --rbind /dev dev<br />
# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
# export PS1="(chroot) $PS1"<br />
(chroot)# emerge-webrsync<br />
(chroot)# emerge --sync<br />
(chroot)# eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{file|body=<br />
(chroot)# eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{file|body=<br />
(chroot)# emerge -avuDN @world }}<br />
<br />
Once done, set up <b>{{c|X redirection}}</b> in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{file|body=<br />
hostname:$ xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{file|body=<br />
hostname:$ sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{file|body=<br />
(chroot)# xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{file|body=<br />
hostname:$ echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{file|body=<br />
(chroot)# export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{file|body=<br />
(chroot)# xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{file|body=<br />
(chroot)# emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954232 bit chroot environment for Wine2019-10-12T15:29:58Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
Alternatively, you can use a Funtoo 1.4 x86 stage3, either a generic 32-bit from https://www.funtoo.org/Generic_32 or a i686 one https://www.funtoo.org/I686 then follow standard installation instructions in the Funtoo installation guide then resume below at X redirection.<br />
<br />
{{file|body=<br />
$ mkdir ~/gentoo<br />
$ cd ~/gentoo<br />
$ wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{file|body=<br />
$ sudo su<br />
# tar xpf <stage3><br />
# cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
# mount -t proc none proc<br />
# mount --rbind /sys sys<br />
# mount --rbind /dev dev<br />
# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
# export PS1="(chroot) $PS1"<br />
(chroot)# emerge-webrsync<br />
(chroot)# emerge --sync<br />
(chroot)# eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{file|body=<br />
(chroot)# eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{file|body=<br />
(chroot)# emerge -avuDN @world }}<br />
<br />
Once done, set up Xserver redirection in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{file|body=<br />
hostname:$ xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{file|body=<br />
hostname:$ sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{file|body=<br />
(chroot)# xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{file|body=<br />
hostname:$ echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{file|body=<br />
(chroot)# export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{file|body=<br />
(chroot)# xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{file|body=<br />
(chroot)# emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954132 bit chroot environment for Wine2019-10-11T11:22:45Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
{{file|body=<br />
$ mkdir ~/gentoo<br />
$ cd ~/gentoo<br />
$ wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{file|body=<br />
$ sudo su<br />
# tar xpf <stage3><br />
# cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
# mount -t proc none proc<br />
# mount --rbind /sys sys<br />
# mount --rbind /dev dev<br />
# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
# export PS1="(chroot) $PS1"<br />
(chroot)# emerge-webrsync<br />
(chroot)# emerge --sync<br />
(chroot)# eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{file|body=<br />
(chroot)# eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{file|body=<br />
(chroot)# emerge -avuDN @world }}<br />
<br />
Once done, set up Xserver redirection in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{file|body=<br />
hostname:$ xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{file|body=<br />
hostname:$ sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
NB: when you log out of your host then log back in, the cookie changes so you will have to redo the line above, or X redirection will stop working. <br />
<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{file|body=<br />
(chroot)# xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{file|body=<br />
hostname:$ echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{file|body=<br />
(chroot)# export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{file|body=<br />
(chroot)# xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{file|body=<br />
(chroot)# emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2954032 bit chroot environment for Wine2019-10-11T00:20:35Z<p>Stamasd: </p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
{{file|body=<br />
$ mkdir ~/gentoo<br />
$ cd ~/gentoo<br />
$ wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{file|body=<br />
$ sudo su<br />
# tar xpf <stage3><br />
# cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
# mount -t proc none proc<br />
# mount --rbind /sys sys<br />
# mount --rbind /dev dev<br />
# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
# export PS1="(chroot) $PS1"<br />
(chroot)# emerge-webrsync<br />
(chroot)# emerge --sync<br />
(chroot)# eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{file|body=<br />
(chroot)# eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{file|body=<br />
(chroot)# emerge -avuDN @world }}<br />
<br />
Once done, set up Xserver redirection in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{file|body=<br />
hostname:$ xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{file|body=<br />
hostname:$ sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{file|body=<br />
(chroot)# xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{file|body=<br />
hostname:$ echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{file|body=<br />
(chroot)# export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{file|body=<br />
(chroot)# xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{file|body=<br />
(chroot)# emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.<br />
<br />
[[Category:HOWTO]]</div>Stamasdhttps://www.funtoo.org/index.php?title=32_bit_chroot_environment_for_Wine&diff=2953932 bit chroot environment for Wine2019-10-10T23:58:33Z<p>Stamasd: Created page with "In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods f..."</p>
<hr />
<div>In Funtoo 1.4, 32-bit applications cannot run directly, including 32-bit Wine. However, 32-bit Wine is required to run legacy Windows applications. There are several methods for using x86 applications on a "pure" 64-bit system such as Funtoo 1.4. You can use containers like LXD for instance. Here is another method, which I have tested and works. <br />
<br />
The idea is to install a 32-bit Linux distribution in a chroot-ed environment, and redirect its graphical output to the host system. You can use the distribution of your choice, but in this example I use 32-bit Gentoo as it's quite similar to install and use to Funtoo. <br />
<br />
You can put the chroot folder anywhere you want, but I think it's a good idea to put it in your regular user's home directory. Download in that folder a x86 Gentoo stage3 tarball from http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/ (at the time of this article's creation, http://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686/stage3-i686-20191008T214502Z.tar.xz )<br />
<br />
{{file|body=<br />
$ mkdir ~/gentoo<br />
$ cd ~/gentoo<br />
$ wget <stage3_URL>}}<br />
<br />
Become root from now on, or else the stage3 won't decompress properly. Then follow the installation procedure according to the Gentoo manual.<br />
<br />
{{file|body=<br />
$ sudo su<br />
# tar xpf <stage3><br />
# cp /etc/resolv.conf /home/<username>/gentoo/etc<br />
# mount -t proc none proc<br />
# mount --rbind /sys sys<br />
# mount --rbind /dev dev<br />
# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l<br />
# export PS1="(chroot) $PS1"<br />
(chroot)# emerge-webrsync<br />
(chroot)# emerge --sync<br />
(chroot)# eselect profile list}}<br />
<br />
and select a desktop profile. For me it was #5, default/linux/x86/17.0/desktop (stable). The desktop profile brings in Xorg which will be needed later for wine anyway.<br />
<br />
{{file|body=<br />
(chroot)# eselect profile set 5 }}<br />
<br />
Edit make.conf to add the correct MAKEOPTS ("-j7" worked for me) then do a world update, and go do something else for a couple of hours. <br />
<br />
{{file|body=<br />
(chroot)# emerge -avuDN @world }}<br />
<br />
Once done, set up Xserver redirection in chroot so it displays the image on the host.<br />
<br />
On the host in another terminal: <br />
<br />
{{file|body=<br />
hostname:$ xauth list }}<br />
<br />
will show you the "magic" cookie of your host display. Put it into .Xauthority on the chroot: <br />
<br />
{{file|body=<br />
hostname:$ sudo xauth extract <path_to_chroot>/root/.Xauthority <hostname>/unix:0 }}<br />
<br />
...where <hostname> is the name of your host machine.<br />
Back to the chroot, and verify that the cookie is set correctly: <br />
<br />
{{file|body=<br />
(chroot)# xauth list }}<br />
<br />
should show the same cookie as on the host.<br />
<br />
Next set the DISPLAY variable in chroot:<br />
<br />
{{file|body=<br />
hostname:$ echo $DISPLAY }}<br />
<br />
should show ":0.0" <br />
<br />
{{file|body=<br />
(chroot)# export DISPLAY=":0.0" }}<br />
<br />
You can add the above line to /etc/profile in Gentoo so it gets automatically set every time you enter the chroot.<br />
<br />
Verify that it works. In chroot run xcalc (you may have to install xcalc first), and it should display on the host. <br />
<br />
{{file|body=<br />
(chroot)# xcalc }}<br />
<br />
If no errors, emerge wine in the chroot and configure it. You should have a 32-bit wine now, ready to run 32-bit Windows binaries (minus configuring, figuring out missing libs etc - but this is beyond the scope of this writeup) <br />
<br />
{{file|body=<br />
(chroot)# emerge wine }}<br />
<br />
Final size of the chroot Gentoo on my disk was close to 4.5GB. Of course you can use the chroot x86 Gentoo for other things that require a 32-bit environment, not only Wine.</div>Stamasd