2018年4月16日 星期一

Redhat & CentOS Setting Display Manager Default:

How to set the default display manager and configure it for remote XDMCP desktop display.

Display Manager Default:

The default display manager for Red Had based systems can be set in /etc/sysconfig/desktop 
Desktop choices: GNOME, KDE 
Display Manager choices: GNOME, XDM, KDE
Example /etc/sysconfig/desktop
DESKTOP="GNOME"
DISPLAYMANAGER="GNOME"
Specifying GNOME as a display manager will invoke GDM.
Upon boot, the system will run /etc/init/prefdm.conf which will in turn call the "Preferred Display Manager" (prefdm) script /etc/X11/prefdmwhich will utilize the settings in /etc/sysconfig/desktop if available.

2018年4月8日 星期日

Out of memory exception in PowerShell


以 "2" 引數呼叫 "Connect" 時發生例外狀況: "已發生類型 'System.OutOfMemoryException' 的例外狀況。"
位於 C:\PS1\010.ps1:27 字元:19
+ $UDPclient.Connect <<<< (([System.Net.IPAddress]::Broadcast),4000)
   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
   + FullyQualifiedErrorId : DotNetMethodException
以 "2" 引數呼叫 "Send" 時發生例外狀況: "作業不能用於未連接的通訊端。"
位於 C:\PS1\010.ps1:28 字元:16
已發生類型 'System.OutOfMemoryException' 的例外狀況。
   + CategoryInfo          : NotSpecified: (:) [out-lineoutput], OutOfMemoryException
   + FullyQualifiedErrorId : System.OutOfMemoryException,Microsoft.PowerShell.Commands.OutLineOutputCommand


Get-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB







Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 2048