Skip to main content

Build Wine rpm with 32 bit application support

Wine is a software to allow running Windows applications in Linux, MAC etc. platforms. It is available for installation from package managers like yum (RHEL, CentOS) and apt (Ubuntu). You can find more details on how it works in Wine wiki . But the default Wine package available from package manager does not have support for 32 bit Windows applications. This was the case for me. In Redhat Enterprise Linux 7.3, the wine package did not contain support for 32 bit windows applications. So the only option was to build a separate rpm of wine which will include this support. All the steps are executed on a RHEL 7.3 VM (x86_64). Step 1 Download and run shell script which will make wine 64 and 32 support for RHEL: https://github.com/zma/usefulscripts/blob/master/script/install-wine-i686-centos7.sh It accepts a version no. as CLI parameter e.g. 2.0.3 The script installs wine in /usr/local/ directory by default. We can verify the files that are being copied for wine using "

jQuery UI dialog without any close option

We use jQuery UI for designing web pages in out project. Some times back we had a scenario where the user log in to a dashboard was implemented using jQuery UI dialog (modal) component. Requirement was that the dashboard page should not be reached without passing the authentication process. But the dialog component of jQuery UI library provides a default X icon at the top left corner of the element which provides an option to close the dialog.

In our case, we wanted to reload the same page on click of the X icon. So that the user can not escape the login dialog by using the X icon. We achieved this by writing the page reload code inside dialog's close handler.  Everything worked fine until we had to handle the successful log in. Once user login succeeds we need to call dialog widget's close handler which reloads the page in turn. Because of this, even after a successful login, user gets the login dialog again.

The only way to stop this was, to remove the page reload code from the widget's close handler. Then it would require to remove the X icon from the dialog widget so that the close handler can not be invoked by clicking the X icon. But jQuery UI gives no option to build a dialog without close icon.

Thanks to Deepti Sharma for finding out a easy solution to the problem. Here is how it looks after the modification -


Below is the HTML code for creation of the dialog box.
The JavaScript part of code is doing the actual business. First we create the login dialog using jQuery UI API, then we hide the X icon by setting its display property. Here is the code The important part is the aria-labelledby attribute. It will contain the original div id of the dialog. So, we can find out the correct X icon to hide (there are multiple dialog boxes in the page). Though the code looks dirty, it works.
Once the close icon is removed, user can only submit the login page but can't close/cancel the login.

Comments