Wednesday, 29 January 2020

Configure X11 Forwarding with PuTTY and Xming for turned on Graphical mode in Linux.

Configure-X11-Forwarding-PuTTY-to-Xming-on-Windows


Usually, Graphical mode is turned off in Linux servers due to Security and Resource optimization.
In such environments running a GUI application is not a trivial task. However, we can use putty
and Xming to forward X11 display to a windows client over SSH protocol.

In this article, we will first install required packages on our Linux Server, then we will configure 
XMing and PuTTY for X11 forwarding on Windows.

This Article Provides:

System Specification:
One Microsoft Windows client and a Linux server.

Required Software:
Download and Install following two software on Windows client.
PuTTY
XMing X Server for Windows
Install required packages on Linux server:
Connect to Linux machine and install necessary packages for X11 forwarding.


[root@junit-01 ~]# yum install -y xauth
...
Installed:
  xorg-x11-xauth.x86_64 1:1.0.9-1.el7

Dependency Installed:
  libXmu.x86_64 0:1.1.2-2.el7        libXt.x86_64 0:1.1.5-3.el7

Complete!

We will require a Linux GUI application to test X11 forwarding configurations.
Therefore, we are installing xclock to test the configuration.

[root@junit-01 ~]# yum install -y xclock
...
Installed:
  xorg-x11-apps.x86_64 0:7.7-7.el7

Dependency Installed:
  libXaw.x86_64 0:1.0.13-4.el7         libXcursor.x86_64 0:1.1.15-1.el7
  libXfixes.x86_64 0:5.0.3-1.el7       libXft.x86_64 0:2.3.2-2.el7
  libXpm.x86_64 0:3.5.12-1.el7         libXxf86vm.x86_64 0:1.1.4-1.el7
  libxkbfile.x86_64 0:1.0.9-3.el7

Complete!

Configure XMing:
After installing Xming on Windows run xlaunch application.

[putty-configure-x11-forwarding-on-windows-01%5B2%5D]

Click on OK

[putty-configure-x11-forwarding-on-windows-02%5B2%5D]

Default configuration will work for us. Therefore, click on Next.

[putty-configure-x11-forwarding-on-windows-03%5B2%5D]

Click on Next.

[putty-configure-x11-forwarding-on-windows-04%5B2%5D]

Click on Next.

[putty-configure-x11-forwarding-on-windows-05%5B2%5D]

Click on Finish.

XMing application has been started and it is placed in System Tray of Windows.

Configure PuTTY:
Once installed, run PuTTY application.

[putty-configure-x11-forwarding-on-windows-06%5B2%5D]

Add a session of our Linux machine therein.





















Besides other configuration, we are also required to configure X11 forwarding as follows:

[putty-configure-x11-forwarding-on-windows-08%5B2%5D]

Save and open the session.

login as: root
Authenticating with public key "rsa-key-20190101"
Last login: Thu Jan  23 16:16:23 2020 from 10.24.248.38
/usr/bin/xauth:  file /root/.Xauthority does not exist
[root@erpclnapx ~]# xclock

Xming will capture the Display open a window to run xclock application.

[putty-configure-x11-forwarding-on-windows-09%5B2%5D]

We have successfully configured X11 forwarding using PuTTY and XMing.

Thursday, 19 September 2019

How To Remove Error Notifications From The Worklist (Doc ID 357904.1)


Oracle Workflow - Version 11.5.10.2 to 12.2 [Release 11.5.10 to 12.2]
Oracle Order Management - Version 12.2.4 to 12.2.4 [Release 12.2]
Information in this document applies to any platform.
GOAL
Failure in a certain workflows, many error notifications can be sent to end users or to SYSADMIN notifying them about the error.
After fixing the problem of the failed workflow, all error notifications still stayed in users worklists waiting to be closed, and it is required to remove them all to save the overhead done by end user if they close them one by one.
End users or sysadmin have many Error notifications in the worklist and that are required to be closed. This document explains the steps
involved in achieving the goal.
SOLUTION
1. Use one of the error notifications to get an item_type from the following select:
SQL>select message_type from wf_notifications where notification_id = <NID>;
1-1 prevent cursor from closing recent records:
SQL>select act.item_type , act.item_key
              from wf_item_activity_statuses act
             ,wf_notifications n
             ,wf_items itm
             where act.notification_id = n.notification_id
             and act.item_type = itm.item_type
             and act.item_key = itm.item_key
             and itm.end_date is null
             and n.begin_date< '[specify a date]' --to prevent recent items from being closed/removed.***
             and act.item_type = '<message_type>' -- value returned in step 1
             and act.activity_status in ('ERROR','NOTIFIED')
             and n.status = 'OPEN'
             and act.assigned_user = 'SYSADMIN';

 2. Use the following script to abort all error workflows that has currently notifications with status OPEN:
Declare
         cursor c_item_keys is
         select act.item_type , act.item_key
              from wf_item_activity_statuses act
             ,wf_notifications n
             ,wf_items itm
             where act.notification_id = n.notification_id
             and act.item_type = itm.item_type
             and act.item_key = itm.item_key
             and itm.end_date is null
             and n.begin_date< '[specify a date]' --to prevent recent items from being closed/removed.***
             and act.item_type = '<message_type>' -- value returned in step 1
             and act.activity_status in ('ERROR','NOTIFIED')
             and n.status = 'OPEN'
             and act.assigned_user = 'SYSADMIN';
             counter number; 
  Begin
    counter := 1 ;
    for item in c_item_keys loop
         wf_engine.abortprocess (item.item_type, item.item_key);
         counter := counter + 1 ;
         if counter > 1000 then
                counter := 1 ;
                commit;
         end if;
     end loop;
     commit;
End;     

 NOTE:  - Replace the <message_type> by the message_type value returned in step 1.
  - This script will remove error notifications from sysadmin.  Replace sysadmin by the end user needed or comment the line to run the script for all end users.
 3. Run the concurrent request:   "Purge Obsolete Workflow Runtime Data".
NOTE:  - In some cases the error workflow may have a child workflow, for example, POERROR workflow may fail to send a notification to a certain user, so that it will generate a WFERROR notification to sysadmin.  In that case one has to run the script in step 2 first for WFERROR workflow.

An item key is not required to run the Purge Obsolete Workflow Runtime Data request.  Running it without use of an item key, all eligible data will be purged.