RHEL 6 No protocol specified, can't open display - rhel6

I got this when I try to open nco_event in RHEL 6.3
[netcool#noi bin64]$ nco_event&
[1] 19962
[netcool#noi bin64]$ No protocol specified
Fatal Error: /opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/bin64/nco_event: can't open display
Any idea to solved that?

When executing the command xhost, you are probably receiving
No protocol specified
xhost: unable to open display ":0"
Issue is your user is not allowed to access the X server.
You can use xhost to limit access for X server for security reasons.
Switch back to default user and execute xhost again. You should see something like
SI:localuser:nuwan
The solution is to add the oracle to access control list
xhost +SI:localuser:youruser
Now switch back to original user "youruser". It should be working now.

Do you use Putty & Xming to connect to this machine?
If not, check the Xorg server on your client.
You can also check the $DISPLAY variable

Follow this while while launching Xming :
Launch Xming and select the style you wish to display the X server output.
Hint:
Select Multiple Windows and your X applications will look like they were launched from Windows.
Leave Display number set to 0 Click Next.
Select Start No Client and click Next.
On Server Options, check the box title Disable Server Control. Leaving the box unchecked can give you an "unspecified protocol error" later down the road.
Click Next and save your configuration.
This will create a quick way to launch Xming later.
This will solve "No protocol specified" error .
Thanks.

Related

WinSCP PUT command errors out with "Unknown switch 'rawtransfersettings'"

We have a job which is located in Windows server and this job is responsible for sending files to a Linux box through WinSCP utility.
We observed that file transfer process failing due to the connection error on an average every alternate day.
We are getting below error message in logs:
Upload of file 'xxx_20190103031754.csv' was successful, but error occurred while setting the permissions and/or timestamp.
If the problem persists, turn off setting permissions or preserving timestamp.
Alternatively you can turn on 'Ignore permission errors' option.
General failure (server should provide error description).
In order to fix the issue I googled to set -rawtransfersettings for put command
open sftp://xxx#xxx.example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx" -timeout=60 -rawsettings SendBuf=0 SshSimple=1
put -rawtransfersettings IgnorePermErrors=0 PreserveTimeDirs=0 "E:\Final\XXX_ASSIGNMENT_20190416200819.csv" "/<Linux Box Folder Name>/"
But I am getting below error
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] xxx#xxx.com
Unknown switch 'rawtransfersettings'.
The -rawtransfersettings switch is supported by the latest WinSCP 5.15 only. You are probably using an older version of WinSCP.
Also, if your goal was to to enable "Ignore permission errors", you need IgnorePermErrors=1 (0 is the default value).
Side notes: PreserveTimeDirs is not related to your problem and is 0 by default anyway. So you can remove that. And the double slash is suspicious, you should probably use one only.
This should do:
put -rawtransfersettings IgnorePermErrors=1 "E:\Final\XXX_ASSIGNMENT_20190416200819.csv" "/"
But if your server actually does not support preserving timestamps, then you should rather use -nopreversetime switch. See the documentation for the error message:
When using scripting, add -nopreservetime and -nopermissions switches to put command.

Remote Desktop Service behavior issue, RemoteApp kept freezing

My issue is while launching the RemoteApp it keeps spinning and says "Configuring remote session". Not all the time, though. It was launching a while ago and signed off. Now again launched the RemoteApp it just spinning.
And when I try to cancel it won't Cancel the RemoteApp I have to kill through the Task manager.
After killing it, I launched again and it just worked as expected
I need to get this fixed. Please suggest a resolution for me.
RDS is on Windows server 2012 R2
Client launching from Windows 10
Could you please let us know the following details.
Is this a recurring issue or 1 time occurred issue?
Please try to telnet the remote machine and check whether it's reachable or not when this problem occurs and share the feedback with us.
And also try the below solutions also, may be it'll fix this RDB freezing issue.
Try to see whether reducing Graphics helps.
This seems to have helped in few cases. This verifies whether you have the correct graphics driver.
Here’s how:
Right click the Windows desktop and choose Personalize.
Click "Display Settings".
Click "Advanced Settings”.
Click on "Troubleshoot" tab.
Click on "Change Settings".
On the resulting Display Adapter Troubleshooter dialog box, drag the slider one notch to the left.
If changing the video hardware acceleration solves the problem, it's a signal that your computer's video driver isn't quite perfect.
In such cases, download the driver from the link below.
http://support.dell.com/support/downloads/driverslist.aspx?c=us&cs=19&l=en&s=dhs&os=WW1&osl=en&catid=&impid=&SystemID=STUDIOXPS8100
Connect and see if there’s any improvement.
Security software could also be one of the reasons.
Temporarily disable them and verify the result.
Try disabling Receive Window Auto-Tuning.
Here is what you need to do:
Go to Start and type cmd.
Right-click on cmd and select “Run as administrator”.
Type: netsh interface tcp set global autotuninglevel=disabled and press Enter.
If you want to to re-enable it:
Type: netsh interface tcp set global autotuninglevel=normal and press Enter.
If this doesn’t help, please post your concerns at Technet forums for further support.
http://social.technet.microsoft.com/Forums/en/w7itpronetworking/threads
Note: Ensure to enable all your security software by now.
If the above steps unsuccess, use below steps and try the same.
Logon to the Remote Desktop Services Session Host computer as an administrator
Start--Run gpedit.msc
In the left pane, under Computer Configuration, navigate to following:
Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment
In the right pane, double-click on Set compression algorithm for RDP data
Select Enabled, and choose Balances memory and network bandwidth
Click OK to save the change

Get Logged On User IBM Personal Communications in VBScript Macro

We Use IBM Personal Communications iSeries Access for Windows version 6.0. When you launch the program you initially get a Log on Prompt that lets you enter a server, user name and password.
It then gives you the log on screen to the server itself and you have to log on a second time. Between the two log ons I'm trying to work out a "Startup Macro"
I don't have anything in it right now because I cannot figure out how to get ONE particular value from the Session, the USER NAME.
I can get the screen title, session name, macro name, but I can NOT for the life of me figure out how to get the user name. I've tried every possible combination of strings and "variable" names I can think of, and nothing.
I've searched the web and all I can ever find is how to record and auto logon to the green screen which is not what I want.
To be clear I just need the Username used to logon to the Personal Communications iSeries Access for Windows program, pre green-screen logon.
It's important to note that IBM i Access for Windows is much more than just the 5250 emulator. There's an ODBC driver, a printer emulator, AFP printer drivers and the graphical Navigator for i. That IBM i signon popup doesn't come from the 5250 emulator. It comes from a lower level IBM i Access for Windows process. Try it yourself. Reboot the PC. Don't start the emulator. DO start IBM i Navigator for Windows. You'll get the signon popup.
It looks like you are trying to automate a 'no signon' signon. The user name is probably stored in the registry, depending on the version of Windows you are using and the version of IBM i Access for Windows. Windows 7: Start > All Programs > IBM i Access for Windows > IBM I Access for Windows Properties Choose the Administration System tab and you'll see the server and user. HKCU > Software > IBM > Client Access Express > CurrentVersion > AS400 Operations Navigator > Application Administration > CurrentAdminSysUser > My Connections
I think, for this, you need to get into the ActiveX Control that comes with iSeries Access. This little code C# snippet should work:
AS400System sys1 = new AS400System();
sys1.Define("mySystemNameHere");
if (sys1.IsConnected(cwbcoServiceEnum.cwbcoServiceAny) != 1)
{
sys1.Connect(cwbcoServiceEnum.cwbcoServiceTelnet);
}
String user = sys1.UserID;
sys1.Disconnect(cwbcoServiceEnum.cwbcoServiceAll);
You'll need to find cwbx.dll and add it as a reference to your project.
If the user is already connected from another application, no dialog will appear. The program will connect, get the connected user id, and then disconnect. If the user has never connected since logging in, then a logon dialog will appear.

fluxbox couldn't connect to XServer - CentOS 6.4

I'm setting up some new VNC servers. I already have this setup working with CentOS 6.3, although I'm not certain that this difference is the real problem.
One of the window managers I'm making available is fluxbox, but when I start it, I always get the following: Error: Couldn't connect to XServer. Here's my setup:
fluxbox: fluxbox-1.1.1-5.el6.x86_64
vnc : tigervnc-server-1.1.0-5.el6_4.1.x86_64
OS : CentOS 6.4
Note that I can start other window managers: Gnome, KDE, openbox, xfce4, etc.
I gutted my ~/.vnc/xstartup script so it only loads an xterm. Then, I tried running startfluxbox &, but still got the error. Obviously, VNC is working, since my xterm opened up OK. I can start firefox, another xterm or other app requiring X, and even fluxbox comes up, but it is worthless in its current state, since it is not connected to the X session.
What is fluxbox looking for? Are there some log files I can look at to give me some clues?
Thanks,
David
CentOS/RHEL 6.4 and up have upgraded libX11 and Xorg.
The $DISPLAY var handling has changed in libX11.
This one in particular is described in this git commit:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=f92e754297ec5fdb81068b56a4435026666224fa
we run our fluxbox with this script in our vnc configs now:
/usr/bin/fluxbox -display "$DISPLAY.0"
OK, I think I've figured out the problem, so I'm answering my own question.
In VNC, I usually specify a display number. (Note, however, that the problem occurs even if vncserver uses the first available display number.) So, I start the vncserver as:
vncserver :17
This should create an X session where my $DISPLAY is set to :17.0, but in CentOS 6.4, the $DISPLAY is set to :17 instead. Apparently, unlike other window managers, fluxbox is unable to handle this inaccuracy. The problem, then, was that fluxbox was trying to connect to :17 and was unable to do so.
My solution, as suggested by someone answering a different problem, was to set $DISPLAY as part of the invocation of fluxbox. So, in my ~/.vnc/xstartup file, I have:
DISPLAY=$DISPLAY.0 startfluxbox &
Note that this may not work for other releases of CentOS, so you might wish to test the release of the box you are using before adding the DISPLAY=... setting to the command.

Error 1219. Multiple connections to a server or shared resource by the same user

I am trying to map network drive, but get error 1219 on Windows XP:
net use z: \\serverA\tests password /user:serverA\alex
I have tried
net use * /del /yes
But it has no effect, and the
net use
shows empty list.
\\serverA\tests is a valid path, as I can open it in Explorer.
What can be done?
EDIT: After reboot it works. But any ideas are still very welcome.
This will usually be caused by a handle left open. Download Process Explorer to find it, and try to close the program that has it open (don't close the handle itself). If it turns out to be explorer.exe, it's probably a buggy preview handler/shell extension.
If you can't find the handle, you can always try using the IP address of ServerA to create a new connection with different credentials, e.g.
net use z: \\10.1.2.3\tests password /user:serverA\alex
Yes, sorry - use Find Handle or DLL with \\ServerA to find the program.
To open it in Explorer it has to be able to logon using your credentials (or the ones you provide when it eventually asks you for credentials).
After that you have a connection and would have to disconnect before you could remap the share with different credentials. (see "Disconnect network share")
You could map it persistently - that way it would always use the credentials you provide.