<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Harish's Blog]]></title><description><![CDATA[Ramblings of an IT bod]]></description><link>https://marar.net/</link><image><url>https://marar.net/favicon.png</url><title>Harish&apos;s Blog</title><link>https://marar.net/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Sun, 19 Apr 2026 20:08:54 GMT</lastBuildDate><atom:link href="https://marar.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[A reusable Robocopy script]]></title><description><![CDATA[<p>I needed a simple PowerShell script that would keep a bunch of folders in sync. So I wrote this reusable script.</p><p>Parameters are defined in the script itself, and it takes source and destination information from an input CSV file.</p><!--kg-card-begin: markdown--><pre><code class="language-powershell"># =========================================================================================
# Reusable Robocopy script that takes folder source and destination pairs</code></pre>]]></description><link>https://marar.net/a-reusable-robocopy-script/</link><guid isPermaLink="false">5bc261b7f9232136811ab3a3</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Sat, 13 Oct 2018 21:26:27 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1461360228754-6e81c478b882?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1461360228754-6e81c478b882?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" alt="A reusable Robocopy script"><p>I needed a simple PowerShell script that would keep a bunch of folders in sync. So I wrote this reusable script.</p><p>Parameters are defined in the script itself, and it takes source and destination information from an input CSV file.</p><!--kg-card-begin: markdown--><pre><code class="language-powershell"># =========================================================================================
# Reusable Robocopy script that takes folder source and destination pairs from a CSV file
# Adjust CSV file, flags, options, log file and folder exclusions to suit your requirements
# Encrypted files (EFS) are excluded; include with /EFSRAW but remove the /MT flag
# Script checks if the import CSV file exists, and also checks source/dest folder pairs
# Harish Karayadath, 05 February 2018
# =========================================================================================

$logfile = &quot;C:\Scripts\Robocopy\CopyLog_$(Get-Date -Format yyyyMMdd-HHmm).log&quot;
$flags = @{R=1;W=1;MT=64;XA=&quot;E&quot;;&apos;LOG+&apos;=$logfile}

# &quot;What If&quot; mode. Set the below to &quot;Yes&quot; if you would like Robocopy to list only (no copy/delete)
$whatifmode = &quot;No&quot;

if($whatifmode -eq &quot;Yes&quot;) {
    $options = @(&quot;/MIR&quot;,&quot;/B&quot;,&quot;/COPYALL&quot;,&quot;/NP&quot;,&quot;/NFL&quot;,&quot;/NDL&quot;,&quot;/NC&quot;,&quot;/NS&quot;,&quot;/L&quot;)
}
else {
    $options = @(&quot;/MIR&quot;,&quot;/B&quot;,&quot;/COPYALL&quot;,&quot;/NP&quot;,&quot;/NFL&quot;,&quot;/NDL&quot;,&quot;/NC&quot;,&quot;/NS&quot;)
}

# Folder exclusions. Special characters must be escaped properly.
$exclude = @(&quot;DfsrPrivate&quot;,&quot;`$RECYCLE.BIN&quot;,&quot;System Volume Information&quot;)

# Specify import file. CSV must be in the below format.
# Name,Enabled,Source,Destination
# Folder1,TRUE,C:\Source1,C:\Dest1
# Folder2,FALSE,C:\Source2,C:\Dest2

$importfile = &quot;C:\Scripts\Robocopy\folderlist.csv&quot;

if(Test-Path $importfile) {
    $folders = Import-Csv $importfile
}
else {
    Add-Content $logfile -Value &quot;=======================================================&quot;
    Add-Content $logfile -Value &quot;The import CSV file does not exist. Script terminating.&quot;
    Add-Content $logfile -Value &quot;Import CSV: $($importfile)&quot;
    Add-Content $logfile -Value &quot;=======================================================&quot;
    exit
}

foreach($folder in $folders) {
    if ($folder.Enabled -eq &quot;TRUE&quot;) {
        if((Test-Path $folder.Source) -and (Test-Path $folder.Destination)) {
            # Write-Host &quot;Source and Destination folders exist. Invoking robocopy.&quot;
            Add-Content $logfile -Value &quot;========================================================&quot;
            Add-Content $logfile -Value &quot;Source and Destination folders exist. Invoking robocopy.&quot;
            Add-Content $logfile -Value &quot;Source: $($folder.Source)&quot;
            Add-Content $logfile -Value &quot;Destination: $($folder.Destination)&quot;
            Add-Content $logfile -Value &quot;========================================================&quot;
            &amp; robocopy.exe $folder.Source $folder.Destination @flags @options /XD @exclude
        }
        else {
            Add-Content $logfile -Value &quot;==============================================================&quot;
            Add-Content $logfile -Value &quot;One or both folders do not exist. Skipping the copy operation.&quot;
            Add-Content $logfile -Value &quot;Source: $($folder.Source)&quot;
            Add-Content $logfile -Value &quot;Destination: $($folder.Destination)&quot;
            Add-Content $logfile -Value &quot;==============================================================&quot;
        }
    }
    else {
        Add-Content $logfile -Value &quot;==============================================================&quot;
        Add-Content $logfile -Value &quot;Skipping. Copy of the below folders disabled in the input file&quot;
        Add-Content $logfile -Value &quot;Source: $($folder.Source)&quot;
        Add-Content $logfile -Value &quot;Destination: $($folder.Destination)&quot;
        Add-Content $logfile -Value &quot;==============================================================&quot;
    }
}

Add-Content $logfile -Value &quot;================================================&quot;
Add-Content $logfile -Value &quot;Script execution finished at $(Get-Date -Format &quot;dd/MM/yyyy HH:mm:ss&quot;)&quot;
Add-Content $logfile -Value &quot;================================================&quot;
</code></pre>
<!--kg-card-end: markdown--><p></p><p>It expects an input CSV file called <code>folderlist.csv</code> in this format:</p><pre><code>Name,Enabled,Source,Destination
DeptData1,TRUE,D:\Source1,\\remote1\e$\Dest1
DeptData2,TRUE,\\remote2\f$\Source2,H:\Dest2
DeptData3,TRUE,\\remote3\g$\Source3,G:\Dest3</code></pre><p>Set column 2 to <code>FALSE</code> if you want the script to skip that row.</p>]]></content:encoded></item><item><title><![CDATA[VPS Benchmarks]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>How do the various VPS vendors compare? I decided to find out. I&apos;m going to run a series of benchmark tests on VPSes provided by a bunch of different cloud providers. Also included are results from my Raspberry Pi 3.</p>
<p>I will update this post as I run</p>]]></description><link>https://marar.net/vps-benchmarks/</link><guid isPermaLink="false">5a4acae60e67ca2e863604c4</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Sun, 20 Nov 2016 22:08:42 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1431499012454-31a9601150c9?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=72d8404b24804d8d5643b3fa4a0681de" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1431499012454-31a9601150c9?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=72d8404b24804d8d5643b3fa4a0681de" alt="VPS Benchmarks"><p>How do the various VPS vendors compare? I decided to find out. I&apos;m going to run a series of benchmark tests on VPSes provided by a bunch of different cloud providers. Also included are results from my Raspberry Pi 3.</p>
<p>I will update this post as I run more benchmark tests.</p>
<h3 id="opensslspeedtestsrsa">OpenSSL Speed Tests (RSA)</h3>
<p>Command: <code>openssl speed rsa</code></p>
<h6 id="azure">Azure</h6>
<p>Spec: Standard A1 (1 core, 1.75 GB memory)</p>
<pre><code>                  sign    verify    sign/s verify/s
rsa  512 bits 0.000127s 0.000009s   7864.4 106226.3
rsa 1024 bits 0.000417s 0.000025s   2397.6  39664.3
rsa 2048 bits 0.002855s 0.000081s    350.3  12282.8
rsa 4096 bits 0.019681s 0.000304s     50.8   3292.4
</code></pre>
<h6 id="digitalocean">DigitalOcean</h6>
<p>Spec: $5 Droplet (1 core, 512 MB memory)</p>
<pre><code>                  sign    verify    sign/s verify/s
rsa  512 bits 0.000079s 0.000006s  12660.4 177734.0
rsa 1024 bits 0.000232s 0.000018s   4316.9  55457.6
rsa 2048 bits 0.001531s 0.000047s    653.3  21220.3
rsa 4096 bits 0.010604s 0.000166s     94.3   6022.0
</code></pre>
<h6 id="scaleway">Scaleway</h6>
<p>Spec: VC1S (2 cores, 2 GB memory)</p>
<pre><code>                  sign    verify    sign/s verify/s
rsa  512 bits 0.000202s 0.000015s   4944.4  66974.1
rsa 1024 bits 0.000694s 0.000043s   1441.2  23023.3
rsa 2048 bits 0.005071s 0.000148s    197.2   6752.7
rsa 4096 bits 0.036268s 0.000556s     27.6   1798.1
</code></pre>
<h6 id="bandwagonhost">Bandwagon Host</h6>
<p>Spec: 5G Promo V2 (1 core, 512 MB memory)</p>
<pre><code>                  sign    verify    sign/s verify/s
rsa  512 bits 0.000139s 0.000009s   7201.2 111387.3
rsa 1024 bits 0.000406s 0.000025s   2465.1  40161.1
rsa 2048 bits 0.002881s 0.000086s    347.1  11575.8
rsa 4096 bits 0.020938s 0.000322s     47.8   3104.0
</code></pre>
<h6 id="raspberrypi3">Raspberry Pi 3</h6>
<p>Spec: Pi 3 Model B (4 cores, 1 GB memory)</p>
<pre><code>                  sign    verify    sign/s verify/s
rsa  512 bits 0.000769s 0.000066s   1300.3  15056.3
rsa 1024 bits 0.003927s 0.000198s    254.7   5041.6
rsa 2048 bits 0.025000s 0.000705s     40.0   1418.7
rsa 4096 bits 0.172203s 0.002684s      5.8    372.6
</code></pre>
<h3 id="opensslspeedtestsaes256cbc">OpenSSL Speed Tests (AES-256-CBC)</h3>
<p>Command: <code>openssl speed -evp aes-256-cbc</code></p>
<h6 id="azure">Azure</h6>
<pre><code>Doing aes-256-cbc for 3s on 16 size blocks: 7035747 aes-256-cbc&apos;s in 2.99s
Doing aes-256-cbc for 3s on 64 size blocks: 1914087 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 488292 aes-256-cbc&apos;s in 2.99s
Doing aes-256-cbc for 3s on 1024 size blocks: 310851 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 38127 aes-256-cbc&apos;s in 2.99s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
The &apos;numbers&apos; are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc      37649.48k    40833.86k    41806.94k   106103.81k   104460.33k
</code></pre>
<h6 id="digitalocean">DigitalOcean</h6>
<pre><code>Doing aes-256-cbc for 3s on 16 size blocks: 56063358 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 12943502 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 4071276 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 905658 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 126984 aes-256-cbc&apos;s in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
The &apos;numbers&apos; are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc     299004.58k   276128.04k   347415.55k   309131.26k   346750.98k
</code></pre>
<h6 id="scaleway">Scaleway</h6>
<pre><code>Doing aes-256-cbc for 3s on 16 size blocks: 33162225 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 11397585 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 3302439 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 857138 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 108679 aes-256-cbc&apos;s in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fdebug-prefix-map=/build/openssl-wIGtVG/openssl-1.0.2g=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
The &apos;numbers&apos; are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc     176865.20k   243148.48k   281808.13k   292569.77k   296766.12k
</code></pre>
<h6 id="bandwagonhost">Bandwagon Host</h6>
<pre><code>Doing aes-256-cbc for 3s on 16 size blocks: 64041849 aes-256-cbc&apos;s in 2.93s
Doing aes-256-cbc for 3s on 64 size blocks: 17847712 aes-256-cbc&apos;s in 2.94s
Doing aes-256-cbc for 3s on 256 size blocks: 4568741 aes-256-cbc&apos;s in 2.95s
Doing aes-256-cbc for 3s on 1024 size blocks: 1137072 aes-256-cbc&apos;s in 2.94s
Doing aes-256-cbc for 3s on 8192 size blocks: 143645 aes-256-cbc&apos;s in 2.94s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
The &apos;numbers&apos; are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc     349716.58k   388521.62k   396473.80k   396041.40k   400251.65k
</code></pre>
<h6 id="raspberrypi3">Raspberry Pi 3</h6>
<pre><code>Doing aes-256-cbc for 3s on 16 size blocks: 5547024 aes-256-cbc&apos;s in 2.96s
Doing aes-256-cbc for 3s on 64 size blocks: 1609019 aes-256-cbc&apos;s in 2.96s
Doing aes-256-cbc for 3s on 256 size blocks: 426448 aes-256-cbc&apos;s in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 107881 aes-256-cbc&apos;s in 2.99s
Doing aes-256-cbc for 3s on 8192 size blocks: 13519 aes-256-cbc&apos;s in 3.00s
OpenSSL 1.0.1t  3 May 2016
built on: Fri Sep 23 22:38:09 2016
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) blowfish(ptr)
compiler: gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM
The &apos;numbers&apos; are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc      29983.91k    34789.60k    36390.23k    36946.54k    36915.88k
</code></pre>
<h3 id="vpsbench">VPSBench</h3>
<p>Command: <code>bash &lt;(wget --no-check-certificate -O - https://raw.github.com/mgutz/vpsbench/master/vpsbench)</code></p>
<h6 id="azure">Azure</h6>
<pre><code>CPU model:  AMD Opteron(tm) Processor 4171 HE
Number of cores: 1
CPU frequency:  2094.674 MHz
Total amount of RAM: 1675 MB
Total amount of swap:  MB
System uptime:   8 days, 5:50,
I/O speed:  40.9 MB/s
Bzip 25MB: 12.74s
Download 100MB file: 31.3MB/s
</code></pre>
<h6 id="digitalocean">DigitalOcean</h6>
<pre><code>CPU model:  Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
Number of cores: 1
CPU frequency:  2399.998 MHz
Total amount of RAM: 488 MB
Total amount of swap:  MB
System uptime:   22:51,
I/O speed:  185 MB/s
Bzip 25MB: 6.30s
Download 100MB file: 94.7MB/s
</code></pre>
<h6 id="scaleway">Scaleway</h6>
<pre><code>CPU model:  Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz
Number of cores: 2
CPU frequency:  2393.902 MHz
Total amount of RAM: 2002 MB
Total amount of swap:  MB
System uptime:   1:25,
I/O speed:  124 MB/s
Bzip 25MB: 13.71s
Download 100MB file: 87.6MB/s
</code></pre>
<h6 id="bandwagonhost">Bandwagon Host</h6>
<pre><code>CPU model:  Intel(R) Xeon(R) CPU           L5639  @ 2.13GHz
Number of cores: 1
CPU frequency:  2133.382 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   28 days, 4:01,
I/O speed:  134 MB/s
Bzip 25MB: 9.23s
Download 100MB file: 20.7MB/s
</code></pre>
<h6 id="raspberrypi3">Raspberry Pi 3</h6>
<p><strong>Note</strong>: Download speed is limited by the speed of my home internet connection</p>
<pre><code>CPU model:  ARMv7 Processor rev 4 (v7l)
Number of cores: 4
CPU frequency:  MHz
Total amount of RAM: 925 MB
Total amount of swap: 99 MB
System uptime:   7 days, 7:52,
I/O speed:  9.2 MB/s
Bzip 25MB: 30.49s
Download 100MB file: 8.45MB/s
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Transferring images from DPP to 64-bit Photoshop]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>My image processing workflow involves opening RAW images in Canon DPP (Digital Photo Professional), making the necessary adjustments to the RAW file, and then transferring them to Adobe Photoshop using the <code>Tools &gt; Transfer to Photoshop (Alt+P)</code> option in DPP for further processing.</p>
<p>Because DPP is a 32-bit application,</p>]]></description><link>https://marar.net/transferring-images-from-dpp-to-64-bit-photoshop/</link><guid isPermaLink="false">5a4acae60e67ca2e863604c2</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Fri, 29 May 2015 20:18:07 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1466553359530-7387151ec321?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=6b508e43449952f7bfc7d8f4da4033d3" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1466553359530-7387151ec321?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=6b508e43449952f7bfc7d8f4da4033d3" alt="Transferring images from DPP to 64-bit Photoshop"><p>My image processing workflow involves opening RAW images in Canon DPP (Digital Photo Professional), making the necessary adjustments to the RAW file, and then transferring them to Adobe Photoshop using the <code>Tools &gt; Transfer to Photoshop (Alt+P)</code> option in DPP for further processing.</p>
<p>Because DPP is a 32-bit application, this only works if the 32-bit version of Photoshop is installed on the computer. For years, I&apos;ve installed both the 32 and 64-bit versions of Photoshop on the same computer just so I can use this option for transferring TIFF files to Photoshop.</p>
<p>I only ever use the 64-bit version of Photoshop so if you use that option in DPP while Photoshop was not running, it would fire up the 32-bit version. To get around that, I fire up the 64-bit version of Photoshop first before hitting the transfer button. This fools DPP into transferring the image to the (already running) 64-bit instance of Photoshop.</p>
<p>A bit clunky, but it worked.</p>
<p>All that changed recently when I installed Adobe Photoshop CC (2014) using the Adobe Creative Cloud installer program. That thing only installed the 64-bit version of Photoshop which (as expected) broke the Transfer to Photoshop option in DPP.</p>
<p>If I hit that button, I get this dialog:</p>
<p><img src="https://marar.net/content/images/2015/05/transfertops.png" alt="Transferring images from DPP to 64-bit Photoshop" loading="lazy"></p>
<p>To fix this, you need to add some Photoshop registry entries in the <code>HKLM\SOFTWARE\Wow6432Node</code> part of the registry that fools DPP into thinking that the 32-bit version of Photoshop is installed on the machine.</p>
<p><strong>Warning</strong>: Please don&apos;t attempt the instructions below if you are not comfortable editing the registry of your computer. If you get it wrong, you can do some serious damage. You have been warned!</p>
<p>To do that:</p>
<ol>
<li>Open up Registry Editor</li>
<li>Navigate to <code>HKLM\SOFTWARE\Adobe\Photoshop</code></li>
<li>Right click the Photoshop key, click &apos;Export&apos;</li>
<li>Save the reg file to somewhere convenient</li>
<li>Open the exported reg file for editing (right click, &apos;Edit&apos;)</li>
<li>Edit all lines (4 in my file) that contain <code>SOFTWARE\Adobe</code> and replace them with <code>SOFTWARE\Wow6432Node\Adobe</code></li>
<li>You are basically inserting the word <code>Wow6432Node</code> between <code>SOFTWARE</code> and <code>Adobe</code> on all lines that contain the registry path in the exported reg file. Don&apos;t forget the trailing <code>\</code></li>
<li>After all replacements have been made, save the file</li>
<li>Double click on the file, say yes to the UAC prompt and yes again to registry editor</li>
<li>And you&apos;re done!</li>
</ol>
<p>These are the reg files (for my computer of course, don&apos;t use these as they may not apply to your environment!):</p>
<h6 id="before">Before</h6>
<pre><code>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop]

[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\80.0]
&quot;ApplicationPath&quot;=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\&quot;
&quot;PluginPath&quot;=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\Plug-Ins\\&quot;

[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\80.0\ApplicationPath]
@=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\&quot;

[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\80.0\PluginPath]
@=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\Plug-Ins\\&quot;
</code></pre>
<h6 id="after">After</h6>
<pre><code>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Photoshop]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Photoshop\80.0]
&quot;ApplicationPath&quot;=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\&quot;
&quot;PluginPath&quot;=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\Plug-Ins\\&quot;

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Photoshop\80.0\ApplicationPath]
@=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\&quot;

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Photoshop\80.0\PluginPath]
@=&quot;C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014\\Plug-Ins\\&quot;
</code></pre>
<p>Hope this helps!</p>
<h6 id="edit31may2015">Edit (31 May 2015)</h6>
<p>The original solution worked, but after a while, the option &apos;Transfer to Photoshop&apos; got completely greyed out. Follow the below steps to restore the option (from: <a href="http://digitol.free.fr/forum/viewtopic.php?f=2&amp;t=22">http://digitol.free.fr/forum/viewtopic.php?f=2&amp;t=22</a>).</p>
<ol>
<li>Open up Registry Editor</li>
<li>Navigate to <code>HKEY_CLASSES_ROOT\CLSID</code></li>
<li>Create a new key called <code>{6DECC242-87EF-11cf-86B4-444553540000}</code></li>
<li>Under the key <code>{6DECC242-87EF-11cf-86B4-444553540000}</code>, create a new key called <code>ProgID</code></li>
<li>Double click <code>(Default)</code> under <code>ProgID</code> and add the value <code>Photoshop.Application.80.1</code></li>
</ol>
<p>Restart DPP and the option Transfer to Photoshop should now be available again.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[File sharing using SMB on Linux Mint]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h4 id="aquickhowtoonfilesharingusingsmbonlinuxmint">A quick how-to on file sharing using SMB on Linux Mint</h4>
<p>A friend of mine was having trouble setting up file sharing between his two Linux workstations. So I decided to give it a go myself and do a quick how-to guide.</p>
<p>He runs Mint on one of his machines</p>]]></description><link>https://marar.net/file-sharing-using-smb-on-linux-mint/</link><guid isPermaLink="false">5a4acae60e67ca2e863604c1</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Mon, 23 Jun 2014 13:13:31 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1504639725590-34d0984388bd?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=a2c64b46cd380a3cb8fe6acda35d735d" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h4 id="aquickhowtoonfilesharingusingsmbonlinuxmint">A quick how-to on file sharing using SMB on Linux Mint</h4>
<img src="https://images.unsplash.com/photo-1504639725590-34d0984388bd?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=a2c64b46cd380a3cb8fe6acda35d735d" alt="File sharing using SMB on Linux Mint"><p>A friend of mine was having trouble setting up file sharing between his two Linux workstations. So I decided to give it a go myself and do a quick how-to guide.</p>
<p>He runs Mint on one of his machines and PinguyOS on the other. Both machines are configured to dual-boot Linux and Windows.</p>
<p>I created a Linux Mint VM (17 &quot;Qiana&quot;, Cinnamon, 64-bit) on VMware ESXi (1 GB RAM, 1 vCPU, 16 GB Thin Provisioned disk, PCSCSI, vmxnet3 adapter). Very straight-forward install, basically selected all the defaults. Disk encryption was not enabled. Gave it the hostname &apos;castor&apos; and enabled DHCP. It picked up the IP address 192.168.1.84. Created an account called &apos;harish&apos; during the install.</p>
<p>Once it was up and running, I installed VMware Tools, and updated the system.</p>
<h4 id="sharingafolder">Sharing a folder</h4>
<p>Created a folder called &apos;shared&apos; on the desktop. Then right click, select &apos;Sharing Options&apos;.</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint01.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p>Gave it a share name, added a commment, and selected &apos;Allow others to create and delete files in this folder&apos;.</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint02.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p>Because I had selected the &apos;Allow others...&apos; option, upon hitting the &apos;Create Share&apos; button, I got another prompt telling me that Nemo needed to add some permissions to the folder to allow write permission by others.</p>
<p>I selected &apos;Add the permissions automatically&apos; and it did its thing.</p>
<p>At this point, from a Windows machine, I tried pinging the Linux machine using its name &apos;castor&apos;. It was able to resolve it.</p>
<p>On the Windows machine, from a run prompt, I typed &quot;\castor\shared&quot; and hit enter.</p>
<p>On the security dialog, I tried entering my credentials (the username and password of the Linux account on Mint).</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint03.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p>It didn&apos;t work. I then remembered that I had to create an SMB account on the Linux machine.</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint05.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p>The <code>-a</code> option tells it to add the new user to the local smbpasswd file and prompt for a new password.</p>
<p>Tried again, and this time, it worked.</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint06.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p><img src="https://marar.net/content/images/2014/Jun/mint07.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p>Created a new file in that folder from the Windows machine to confirm that I had &apos;write&apos; access.</p>
<p><img src="https://marar.net/content/images/2014/Jun/mint08.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<p><img src="https://marar.net/content/images/2014/Jun/mint09.png" alt="File sharing using SMB on Linux Mint" loading="lazy"></p>
<h4 id="mountingtheshareonalinuxmachine">Mounting the share on a Linux machine</h4>
<p>This was really simple. On one of my other machines (Ubuntu Server 14.04 LTS, hostname &apos;bellatrix&apos;), I mounted the SMB share.</p>
<pre><code>harish@bellatrix:~$ sudo apt-get update
harish@bellatrix:~$ sudo apt-get upgrade
harish@bellatrix:~$ sudo apt-get install cifs-utils
harish@bellatrix:~$ cd /mnt
harish@bellatrix:/mnt$ sudo mkdir mint
harish@bellatrix:/mnt$ smbclient -L 192.168.1.84
Enter harish&apos;s password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (castor server (Samba, Linux Mint))
        print$          Disk      Printer Drivers
        shared          Disk      Shared folder on Mint
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]

        Server               Comment
        ---------            -------
        CALLISTO
        CASTOR               castor server (Samba, Linux Mint)

        Workgroup            Master
        ---------            -------
        WORKGROUP            CALLISTO

harish@bellatrix:/mnt$ sudo mount -t cifs -o sec=ntlm,username=harish,password=Password1,rw //192.168.1.84/shared /mnt/mint/
harish@bellatrix:/mnt/mint$ ls -al
total 16
drwxrwxrwx  2 harish harish     0 Jun 22 17:01 .
drwxr-xr-x  6 root   root    4096 Jun 22 17:04 ..
-rw-r--r--  1 harish harish     0 Jun 22 16:59 TestFile1
-rw-r--r--  1 harish harish     0 Jun 22 16:59 TestFile2
-rwxrwxr--+ 1 harish harish 11284 Jun 22 17:01 Test Word Doc.docx
</code></pre>
<p>In the &apos;mount&apos; command, the username and password you provide must match the username and password of the account you added to smbpasswd.</p>
<p>That was it!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Download and Install Patches for ESXi]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Just a quick guide on how to download and install patches for VMware ESXi (free version).</p>
<p>Go to the VMware Patch Portal, select the product and version to view and download available patches:</p>
<p><a href="https://www.vmware.com/patchmgr/findPatch.portal" target="_blank">https://www.vmware.com/patchmgr/findPatch.portal</a></p>
<p>In this example, I&apos;m going from ESXi 5.</p>]]></description><link>https://marar.net/download-and-install-patches-for-esxi/</link><guid isPermaLink="false">5a4acae60e67ca2e863604c0</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Sat, 05 Apr 2014 10:03:14 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1493953522814-88c4f52f6509?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=9258fdfcf95079fd488c8661d5e0a288" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1493953522814-88c4f52f6509?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=9258fdfcf95079fd488c8661d5e0a288" alt="Download and Install Patches for ESXi"><p>Just a quick guide on how to download and install patches for VMware ESXi (free version).</p>
<p>Go to the VMware Patch Portal, select the product and version to view and download available patches:</p>
<p><a href="https://www.vmware.com/patchmgr/findPatch.portal" target="_blank">https://www.vmware.com/patchmgr/findPatch.portal</a></p>
<p>In this example, I&apos;m going from ESXi 5.5.0 build 1474528 to 5.5.0 build 1623387 (Update 1).</p>
<p>When the download is complete, upload the entire zip file to a datastore on your ESXi host.</p>
<p><img src="https://marar.net/content/images/2014/Apr/vmware_patches.png" alt="Download and Install Patches for ESXi" loading="lazy"></p>
<p>SSH to your host.</p>
<p>Enter maintenance mode.</p>
<pre><code class="language-language-bash"># vim-cmd hostsvc/maintenance_mode_enter
</code></pre>
<p>Verify the patch file.</p>
<pre><code class="language-language-bash"># cd /vmfs/volumes/datastore1/Patches/
/vmfs/volumes/52ed3575-a67d75d2-17ab-001cc4d54e5f/Patches # ls
ESXi550-201312001.zip                 update-from-esxi5.5-5.5_update01.zip
</code></pre>
<p>Run the update.</p>
<pre><code class="language-language-bash"># esxcli software vib update -d /vmfs/volumes/datastore1/Patches/update-from-esxi5.5-5.5_update01.zip
</code></pre>
<p>Verify.</p>
<pre><code class="language-language-bash"># esxcli software vib list
</code></pre>
<p>Reboot.</p>
<pre><code class="language-language-bash"># reboot
</code></pre>
<p>Exit maintenance mode.</p>
<pre><code class="language-language-bash"># vim-cmd hostsvc/maintenance_mode_exit
</code></pre>
<p>Done.</p>
<p><img src="https://marar.net/content/images/2014/Apr/esxi_version.png" alt="Download and Install Patches for ESXi" loading="lazy"></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Citrix Receiver 4.1 Installation]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>The default installation routine of Receiver does not give you a &apos;Custom&apos; install option which makes it quite difficult to select all the bits you need.</p>
<p>This is the command line I use for installing Receiver that works pretty well for me.</p>
<p><strong>Note</strong>: The below command must be</p>]]></description><link>https://marar.net/citrix-receiver-4-1-installation/</link><guid isPermaLink="false">5a4acae60e67ca2e863604bf</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Wed, 02 Apr 2014 12:30:37 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=278085b2f7e71c40d0bd45a0e1fc06df" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=278085b2f7e71c40d0bd45a0e1fc06df" alt="Citrix Receiver 4.1 Installation"><p>The default installation routine of Receiver does not give you a &apos;Custom&apos; install option which makes it quite difficult to select all the bits you need.</p>
<p>This is the command line I use for installing Receiver that works pretty well for me.</p>
<p><strong>Note</strong>: The below command must be run on an elevated command prompt. Otherwise some components will fail to install.</p>
<pre><code class="language-language-batch">CitrixReceiver.exe /includeSSON ADDLOCAL=&quot;ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d&quot; ENABLE_DYNAMIC_CLIENT_NAME=&quot;Yes&quot; ALLOWADDSTORE=&quot;A&quot; ALLOWSAVEPWD=&quot;A&quot; ENABLE_SSON=&quot;Yes&quot;
</code></pre>
<p>The various options are explained in detail on the Citrix support site so I&apos;m not going to repeat them here:</p>
<p><a href="http://support.citrix.com/proddocs/topic/receiver-windows-40/receiver-windows-cfg-command-line-40.html">http://support.citrix.com/proddocs/topic/receiver-windows-40/receiver-windows-cfg-command-line-40.html</a></p>
<p>After installation, I follow it up with this tweak:</p>
<p><a href="http://support.citrix.com/article/CTX136339">http://support.citrix.com/article/CTX136339</a></p>
<p>I use a XenDesktop VDI at work and the first time I fire up a published application using Receiver, it disconnects my VDI session!</p>
<p>This happens because, as explained in the article, Receiver installation defaults to &quot;Reconnect apps when I start or refresh apps&quot;. Since my VDI is also an &quot;app&quot;, it tries to reconnect to itself within itself. Yeah.</p>
<p>You have to kill Receiver and restart it for the change to take effect.</p>
<p><strong>Edit</strong>: I&apos;ve slightly modified the command line parameters I use for Receiver 4.2.</p>
<pre><code class="language-language-batch">CitrixReceiver.exe /includeSSON ADDLOCAL=&quot;ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d&quot; ENABLE_DYNAMIC_CLIENT_NAME=&quot;Yes&quot; ALLOWADDSTORE=&quot;A&quot; ALLOWSAVEPWD=&quot;A&quot; ENABLE_SSON=&quot;Yes&quot; ENABLE_KERBEROS=&quot;Yes&quot; AM_CERTIFICATESELECTIONMODE=&quot;Prompt&quot; STARTMENUDIR=\Receiver\
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Filter Published Applications on a XenApp Services (PNAgent) Site]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Filtering the list of published applications on a XenApp Web Site is something we&apos;ve done for many years now. Recently we had a request to set up a XenApp Services Site where the list of displayed applications is controlled by an &quot;allowed&quot; list.</p>
<p>There is a</p>]]></description><link>https://marar.net/filter-published-applications-on-a-xenapp-services-pnagent-site/</link><guid isPermaLink="false">5a4acae60e67ca2e863604bc</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Thu, 23 Jan 2014 23:18:32 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1510511459019-5dda7724fd87?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=b0d7a7c54b02fffe04a0e974e75bcc78" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1510511459019-5dda7724fd87?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=b0d7a7c54b02fffe04a0e974e75bcc78" alt="Filter Published Applications on a XenApp Services (PNAgent) Site"><p>Filtering the list of published applications on a XenApp Web Site is something we&apos;ve done for many years now. Recently we had a request to set up a XenApp Services Site where the list of displayed applications is controlled by an &quot;allowed&quot; list.</p>
<p>There is a Citrix Knowledge Center that helpfully tells you how to achieve exactly that:</p>
<p><a href="http://support.citrix.com/article/CTX123969">http://support.citrix.com/article/CTX123969</a></p>
<p>This approach involves putting a &quot;#&quot; as the first character in the Application Description field on a published application that you wish to hide. It works perfectly, but it was not suitable in our environment for two main reasons:</p>
<ul>
<li>We have already used the Application Description field for something else (involves NetScaler policies - long story)</li>
<li>We have over 400 published applications split across multiple farms so amending pretty much all of them was going to be rather painful</li>
</ul>
<p>We wanted to list just a small, specific list of apps to users connected to that Services site. So a few people pitched in and we came up with some modified Java code.</p>
<p>This was tested on Web Interface version 5.4 but <em>should</em> work on all 5.x variants (<s>but we have not tested on anything other than v5.4</s>).</p>
<p><strong>Edit</strong>: Tested successfully on CWI v5.3 as well.</p>
<h3 id="steps">Steps</h3>
<p>Create a new XenApp Services Site (or use one you already have). On our server, we created the website in the path <code>C:\inetpub\FilteredPN</code>.</p>
<p>Locate the file <code>Enumeration.java</code> in the path <code>C:\inetpub\FilteredPN\Citrix\PNAgent\app_code\PagesJava\com\citrix\wi\pna</code>. You might want to take a backup of this file before you start messing with it.</p>
<p>Locate the line <code>import java.io.IOException;</code> at the beginning of the file and alter it.</p>
<p>Before: <code>import java.io.IOException;</code><br>
After: <code>import java.io.*;</code></p>
<p>Next, locate the following line in the same file (nearly at the very end of the file):</p>
<p><code>ResourceInfo[] resources = enumRequest.getAllResources();</code></p>
<p>Just below that line, insert the following block of code:</p>
<pre><code class="language-java">java.util.ArrayList listofapps = new java.util.ArrayList();
java.util.ArrayList filteredapps = new java.util.ArrayList();

FileInputStream in = new FileInputStream(&quot;C:\\inetpub\\FilteredPN\\AllowedApps.txt&quot;);
BufferedReader br = new BufferedReader ( new InputStreamReader(in));
String line;
while ((line = br.readLine()) != null)
	listofapps.add(line);
		for (int i=0; i&lt;resources.length; i++) {
			for (int j=0; j&lt;listofapps.size(); j++){
				String checkapp = (String)listofapps.get(j);
				checkapp = checkapp.trim();
				if(resources[i].getDisplayName().equals (checkapp)){
					filteredapps.add(resources[i]);
				}
			}
		}
resources = (ResourceInfo[]) filteredapps.toArray( new ResourceInfo[0] );
</code></pre>
<p>Create a text file called <code>C:\inetpub\FilteredPN\AllowedApps.txt</code>.</p>
<p>Edit the text file and add the apps you want <em>displayed</em>, one per line.<br>
For example, something like this:</p>
<pre><code>Notepad
Microsoft Word
My Corporate App
Helpdesk App
</code></pre>
<p>That&apos;s pretty much it! You should now have a working Services site that only displays an explicitly defined list of applications.</p>
<p>If you want to <em>hide</em> specific apps and display everything else, use this block of code instead.</p>
<pre><code class="language-java">java.util.ArrayList listofapps = new java.util.ArrayList();
java.util.ArrayList filteredapps = new java.util.ArrayList();

FileInputStream in = new FileInputStream(&quot;C:\\inetpub\\FilteredPN\\HiddenApps.txt&quot;);
BufferedReader br = new BufferedReader ( new InputStreamReader(in));
String line;
while ((line = br.readLine()) != null)
		listofapps.add(line);

		for (int i=0; i&lt;resources.length; i++) {
					boolean inlist = false;
					for (int j=0; j&lt;listofapps.size(); j++){
								String checkapp = (String)listofapps.get(j);
								checkapp = checkapp.trim();
								if(resources[i].getDisplayName().equals (checkapp)){
											inlist = true;
								}
					}
		  if (!inlist) {
				filteredapps.add(resources[i]);
		 }           
		}
		resources = (ResourceInfo[]) filteredapps.toArray( new ResourceInfo[0] );
</code></pre>
<p>Create a text file called <code>C:\inetpub\FilteredPN\HiddenApps.txt</code>.</p>
<p>Edit the text file and add the apps you want <em>hidden</em>, one per line.<br>
For example, something like this:</p>
<pre><code>Notepad
Microsoft Word
My Corporate App
Helpdesk App
</code></pre>
<p>That&apos;s it. Hope that was useful.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Session Reliability (CGP) Issue]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>For some reason, Session Reliability was not working on a bunch of 32-bit Windows Server 2003 servers running XenApp 5.0. When you tried to connect to a published desktop with Session Reliability switched on, you would get a generic 1030 error.</p>
<p>The &apos;Citrix XTE Server&apos; service was</p>]]></description><link>https://marar.net/session-reliability-cgp-issue/</link><guid isPermaLink="false">5a4acae60e67ca2e863604bb</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Fri, 17 Jan 2014 00:09:52 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1485856407642-7f9ba0268b51?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=b27ede7021bcf9eff1ad9157fd96b9ec" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1485856407642-7f9ba0268b51?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=b27ede7021bcf9eff1ad9157fd96b9ec" alt="Session Reliability (CGP) Issue"><p>For some reason, Session Reliability was not working on a bunch of 32-bit Windows Server 2003 servers running XenApp 5.0. When you tried to connect to a published desktop with Session Reliability switched on, you would get a generic 1030 error.</p>
<p>The &apos;Citrix XTE Server&apos; service was started and running correctly and it was listening as expected on port 2598.</p>
<p><img src="https://marar.net/content/images/2014/Jan/cgp_listen.png" alt="Session Reliability (CGP) Issue" loading="lazy"></p>
<p>So what gives? Upon digging deeper, found some interesting information in the XTE error log file. The log file is located at: <code>C:\Program Files\Citrix\XTE\logs\error.log</code></p>
<pre><code>[Tue Jan 14 14:55:33 2014] [error] [client 10.2.2.25] client denied by server configuration: 127.0.0.1:1494
[Tue Jan 14 14:55:33 2014] [error] CH 0: ACCESS DENIED to destination address 127.0.0.1:1494
</code></pre>
<p>Why was access denied? A bit more digging revealed this Citrix article:</p>
<p><a href="http://support.citrix.com/article/ctx106531">http://support.citrix.com/article/ctx106531</a></p>
<p>Cracked open: <code>C:\Program Files\Citrix\XTE\conf\httpd.conf</code></p>
<p>In the <code>CGP Configuration</code> section, I noticed the line <code>Allow to 10.8.2.135:1494</code>. Full section below.</p>
<pre><code class="language-#CGP">&lt;VirtualHost *:2598&gt;

      #CGP Protocol State
      CgpProtocol  On

      #Max TCP Channels Per Session
      CgpTcpChannelsPerSession 50

      #Disconnected Sessions Timeout (msec)
      CgpInterruptedSessionTimeout 180000
      CgpHandshakeTimeout 100000
      CgpInterruptedSessionsThreadWakeupInterval 60000
      &lt;Location /destination/cgp&gt;
      Order Allow,Deny
      Allow to 10.8.2.135:1494
      &lt;/Location&gt;

&lt;/VirtualHost&gt;
</code></pre>
<p>On a working server, that line read <code>Allow to 127.0.0.1:1494</code>. It was quite clear that this was causing the Access Denied error. The next step was to find out why this line was different on some servers and not others.</p>
<p>After a bit of digging, we figured out that this was caused by the Network Adapter binding in the ICA-tcp Terminal Services Connection.</p>
<p><img src="https://marar.net/content/images/2014/Jan/ICA_tcp.png" alt="Session Reliability (CGP) Issue" loading="lazy"></p>
<p>As you can see in the screenshot, the protocol is bound to the adapter &apos;vmxnet3 Ethernet Adapter&apos;. On the working server, this was set to &apos;All network adapters configured with this protocol&apos;.</p>
<p>Switched it back and a reboot later, the <code>httpd.conf</code> file was looking as it should.</p>
<pre><code class="language-#CGP">&lt;VirtualHost *:2598&gt;

      #CGP Protocol State
      CgpProtocol  On

      #Max TCP Channels Per Session
      CgpTcpChannelsPerSession 50

      #Disconnected Sessions Timeout (msec)
      CgpInterruptedSessionTimeout 180000
      CgpHandshakeTimeout 100000
      CgpInterruptedSessionsThreadWakeupInterval 60000
      &lt;Location /destination/cgp&gt;
      Order Allow,Deny
      Allow to 127.0.0.1:1494
      &lt;/Location&gt;

&lt;/VirtualHost&gt;
</code></pre>
<p>And CGP was working again!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[SSL Issue on Windows Server 2003]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Hit an interesting problem recently where certain SSL enabled websites would not load up on a Windows Server 2003 published desktop.</p>
<p>The browser used was Internet Explorer 8 and it didn&apos;t give us a meaningful error message. Just a generic and thoroughly unhelpful &quot;Internet Explorer cannot display</p>]]></description><link>https://marar.net/ssl-issue-on-windows-server-2003/</link><guid isPermaLink="false">5a4acae60e67ca2e863604ba</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Mon, 13 Jan 2014 15:27:54 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1484043937869-a468066a4fbd?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=ca50ed13a1c9c824c3bcfe06881b79d3" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1484043937869-a468066a4fbd?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=ca50ed13a1c9c824c3bcfe06881b79d3" alt="SSL Issue on Windows Server 2003"><p>Hit an interesting problem recently where certain SSL enabled websites would not load up on a Windows Server 2003 published desktop.</p>
<p>The browser used was Internet Explorer 8 and it didn&apos;t give us a meaningful error message. Just a generic and thoroughly unhelpful &quot;Internet Explorer cannot display the webpage&quot; error.</p>
<p><img src="https://marar.net/content/images/2014/Jan/ssl_error.png" alt="SSL Issue on Windows Server 2003" loading="lazy"></p>
<p>The website our users were trying to reach was the login page for Websense Secure Email.</p>
<p><a href="https://voltage-pp-0000.secure-mailcontrol.com/login">https://voltage-pp-0000.secure-mailcontrol.com/login</a></p>
<p>To troubleshoot the issue, I installed Google Chrome on an affected server and visited the same website. Chrome was a lot more helpful and it told me that the SSL certificate was &quot;corrupt&quot;. Hmm... Curious.</p>
<p>I was able to visit the website without any problems on my Windows 7 machine so I had a closer look at the certificate. On my Windows 7 machine, I could see that the Digest Algorithm was one from the SHA2 family (specifically SHA-256).</p>
<p><img src="https://marar.net/content/images/2014/Jan/ssl_sha2.png" alt="SSL Issue on Windows Server 2003" loading="lazy"></p>
<p>When the same fields on the certificate were viewed using the affected Windows Server 2003 machine, it was displaying something else - the OID instead of &apos;sha256RSA&apos; and &apos;sha256&apos; respectively for fields &apos;Signature algorithm&apos; and &apos;Signature hash algorithm&apos; that was displayed on my Windows 7 machine.</p>
<p>It was fairly evident by that point that the issue was down to lack of support for the SHA2 family of hash algorithms on Windows Server 2003.</p>
<h3 id="thefix">The Fix</h3>
<p>A quick bit of Google-fu led me to this KB article:</p>
<p><a href="http://support.microsoft.com/kb/938397">http://support.microsoft.com/kb/938397</a></p>
<p>However, instead of installing this update, I installed a later update (which includes a newer version of crypt32.dll):</p>
<p><a href="http://support.microsoft.com/kb/2868626">http://support.microsoft.com/kb/2868626</a></p>
<p>Problem solved!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Upload images larger than 1 MB]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>After installing Ghost, I discovered that I couldn&apos;t upload images larger than 1 MB. The problem is not with Ghost itself but with a configuration setting on the reverse proxy Nginx.</p>
<p>To fix this, edit nginx.conf.</p>
<pre><code class="language-language-bash">sudo nano /etc/nginx/nginx.conf
</code></pre>
<p>Add this line to the</p>]]></description><link>https://marar.net/upload-images-larger-than-1-mb/</link><guid isPermaLink="false">5a4acae60e67ca2e863604bd</guid><dc:creator><![CDATA[Harish Karayadath]]></dc:creator><pubDate>Sun, 12 Jan 2014 23:52:04 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1493690283958-32df2c86326e?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=550292134fabba64961d2d61d3d1bb2d" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://images.unsplash.com/photo-1493690283958-32df2c86326e?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;s=550292134fabba64961d2d61d3d1bb2d" alt="Upload images larger than 1 MB"><p>After installing Ghost, I discovered that I couldn&apos;t upload images larger than 1 MB. The problem is not with Ghost itself but with a configuration setting on the reverse proxy Nginx.</p>
<p>To fix this, edit nginx.conf.</p>
<pre><code class="language-language-bash">sudo nano /etc/nginx/nginx.conf
</code></pre>
<p>Add this line to the <code>http</code> section.</p>
<pre><code class="language-language-nginx">client_max_body_size 5m;
</code></pre>
<p>I chose 5 MB but you can choose whatever you feel is appropriate for your environment. Setting it to <code>0</code> disables the limit.</p>
<p>Then...</p>
<pre><code class="language-language-bash">sudo service nginx stop
sudo service nginx start
</code></pre>
<p>Done!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>