How to enable/disable Remote Desktop via Command Line

Some days ago I had the need to work via RDP on a workstation with “Remote Desktop” disabled.

The quickest way is to use psexec and run this command on remote workstation:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

To disable again the “Remote Desktop”:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

Keep in mind that reboot or logoff is not necessary :-)

Posted in Computers and Internet | Tagged , , | Leave a comment

How to check Windows Local Groups from command line

To check/manage your client/server local groups, an old command line tool still surviving.

If you want to check the member of “Administrators” group on your workstation:

net localgroup administrators

This command work also for AD groups… just add “/domain”

Posted in Computers and Internet | Tagged , | Leave a comment

How to install CRS (Carta Regionale dei Servizi) on FEDORA

This is the “translated” post you find here , for Fedora.

Install opensc:

yum install opensc

My smart card (Alcor Micro AU9520) work fine with pcsc-lite-ccid.

Then configure Firefox to use smart card reader. On Firefox Preferences/Advanced click on Security Devices and load this lib:

/usr/lib64/opensc-pkcs11.so

Enjoy e-gov.

Posted in Computers and Internet | Tagged , | Leave a comment

How to Burn DVDs with Brasero on Fedora

On Fedora the /tmp folder is mounted on tmpfs and quoted to 2Gb.

By default Brasero use /tmp for store temporary CD/DVD images.
The correct folder for that is: /var/tmp

Bracero_tmp

Posted in Computers and Internet | Tagged | Leave a comment

How to improve Fedora’s Font Rendering

I recently switched from UBUNTU GNOME to FEDORA, and one think that I noticed it’s that fonts rendering is ugly compared to Ubuntu.

I compared the Ubuntu and Fedora configuration:

xrdb -query

and make Fedora’s settings the same:

gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "hinting" "slight"
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "antialiasing" "rgba"

By the way, You can change these settings also with “Gnome Tweak Tool”

su -c "yum install gnome-tweak-tool"

You can also enable font sub-pixel rendering:

echo "Xft.lcdfilter: lcddefault" > ~/.Xresources

Update: MS Calibri font look very bad… Create/add these settings on /etc/fonts/local.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font" >
        <edit name="embeddedbitmap" mode="assign">
            <bool>false</bool>
	</edit>
</match>
</fontconfig>
Posted in Computers and Internet | Tagged | Leave a comment

How to pipe “find” to “rm” in bash

rm, like many other programs, takes its arguments from the command line but ignores standard input. You can pipe anything to it you like; it’ll just throw that data away.

So use xarg..this command clean Evolution data:

find ~/ -iname "*evolution*" | xargs rm -R

If filenames contain newlines or spaces:

find . -name ".txt" -print0 | xargs -0 rm
Posted in Computers and Internet | Tagged , | Leave a comment

Problem: Unable to sign Powershell Script

I tried to sign an old Powershell script with this command:

Set-AuthenticodeSignature 'C:\MyScript.ps1' -cert (get-childitem cert:\currentuser\my\ -codesigningcert)

..but the output was: Unknown Error

This was not the only one that I’ve signed but it’s the only one that I was not able to sign!

After some investigation I discover the problem: the script encoding was “Unicode big endian”. Changed it to UTF-8 I was able to sign it (you can use notepad to change encoding).

Posted in Computers and Internet | Tagged | Leave a comment