Convert text file to UTF-8 encoding from the shell
1 | for f in *.txt; do iconv -f mac -t utf-8 "$f" >"$f.utf8"; done |
Note:
-f Input file encoding type
-t Output file encoding type
Reference: http://manual.macromates.com/en/saving_files.html
Cannot join OpenSolaris CIFS service to Windows 2008 Domain
By default, our redirector uses NTLMv2 authentication. Prior to joining
your system to a Windows 2008 domain, please run the following command
on your Solaris system such that NTLM authentication will be used instead:
sharectl set -p lmauth_level=2 smb
This is a known issue with Windows Server 2008 which by default
disallows NTLMv2 authentication if the client doesn't support extended
security. Microsoft is working on a hot fix for this issue. Once it
becomes available, the above workaround will no longer be needed.
Reference: http://www.mail-archive.com/cifs-discuss@opensolaris.org/msg00170.html
Setting up public key authentication over SSH
Generate key on local machine
1 | ssh-keygen -t rsa |
It will ask you for a password but you can leave it blank.
Note you could also pick -t dsa if you prefer.
Ensure that the remote server has a .ssh directory
Make sure the server your connecting to has a .ssh directory in your home directory. If it doesn't exist you can run the ssh-keygen command above, and it will create one with the correct permissions.
Copy your local public key to the remote server
If your remote server doesn't have a file called ~/.ssh/authorized_keys2 then we can create it. If that file already exists, you need to append to it instead of overwriting it, which the command below would do:
1 | scp ~/.ssh/id_rsa.pub remote.server.com:.ssh/authorized_keys2 |
Now ssh to the remote server
Now you can ssh to the remote server without entering your password.
Security
If you are unable to login without being prompted for a password it is likely the result of improper permissions being set on .ssh/ and its children. SSH is picky about permissions; to fix the problem, ssh to the remote server and issue the following command:
1 | chmod -R 700 .ssh/ |
Now keep in mind that all someone needs to login to the remote server, is the file on your local machine ~/.ssh/id_rsa, so make sure it is secure.
Reference: http://www.petefreitag.com/item/532.a
When you start a Windows Vista-based computer, the system may stop responding (hang) at a black screen
Issue:
When you start a Windows Vista-based computer, the system may stop responding (hang) at a black screen.
Additionally, you may experience the following symptoms when you try to recover from this problem:
- If you restart the computer, press F8 before the Windows Vista progress indicator appears, and then click the Safe Mode option, the same problem occurs.
- If you start Windows Recovery Environment (WinRE) to restore the Windows Vista-based computer, WinRE stops responding.If you try to use Windows Vista installation media to repair the system, the system stops responding.
Cause:
This problem may occur because of file system corruption within the $Txf directory. This corruption causes a deadlock condition between the Transactional NTFS (TxF) process and the Autocheck process.
Resolution:
To work around this problem, perform a clean installation or a parallel installation of Windows Vista.
Status:
Microsoft has confirmed that this is a problem in Windows Vista RTM. This problem was corrected in Windows Vista Service Pack 1.
Reference: http://support.microsoft.com/kb/946532
Dual Monitor Support in Remote Desktop Connections Client v6
Dual Monitor Support in Remote Desktop Connections Client v6
Declining hardware prices and increasing demands for productivity
improvements have influenced business investment in multiple monitors
for the desks of executives, power users, and administrative staff.
LCD display units have decreased the desktop footprint compared to CRT
monitors, and since the launch of Windows XP back in October of 2001,
laptop manufacturers have been improving on adapter and driver support
for multiple monitor on portable equipment. Today, it is rare to find
a laptop that will not support extended Windows Desktop on an external
display.
Another emerging trend is the growing familiarity and reliance upon
remote desktop technologies. Increasingly, IT Professionals and power
users count on remote desktop services to connect efficiently to
remote networks to perform business related functions, from support to
day-to-day job functions. It's not uncommon for a remote worker to
rely exclusively upon remote desktops to connect from a home office or
remote location to their business Terminal Server or even to their
work desktop via Remote Web Workplace if their network core is Small
Business Server 2003.
Microsoft recently released an updated Remote Desktop Connection
client (Terminal Services Client 6.0) for Windows XP and Windows
Server 2003 products. Download links and related information about
this product update is available at:
http://support.microsoft.com/kb/925876.
One of the interesting new features in the updated Remote Desktop
Connection client is support for spanning multiple monitors!
If you have multiple monitors on the system you are running the Remote
Desktop Connection client from, you can stretch the virtual desktop of
the host system to span your monitors. It's important to note that
only rectangular shapes are supported – dual monitors with different
resolutions will not work with multiple monitor spanning.
If you know the resolution you want for the virtual desktop (great for
when you wish to have a less-than-full screen window span monitors),
you can now state explicitly the dimensions you desire:
1 | mstsc /w:2048 /h:768 /v:"server" |
The above example would create a full screen spanned virtual desktop
on two 1024x768 resolution displays.
Or, if preferred, the Remote Desktop Connection client can figure out
the size automatically (great for full screen view):
1 | mstsc /span /v:"server" |
The above example would create a full screen spanned virtual desktop
to match the rectangle size of your dual displays.
There are some limitations of dual monitors and the updated Remote
Desktop Connection client:
The total resolution on all monitors must be less than or equal to 4096 x 2048.
All monitors must be aligned side-by-side, and have to be the same
resolutions. Vertical alignment is not supported.
The remote session sees the virtual desktop as one very large virtual
desktop. It doesn't know you are using two monitors.
In order to make the most of the dual monitor support, a very nice
little tool to have installed on the Remote Desktop host system is
SplitView (www.splitview.com). This inexpensive tool adds two buttons
to the top right corner of system windows in the title bar area. By
pressing the left arrow, the active window is directed to move to the
left and use 50% of the screen width. By pressing the right arrow, the
active window is sent to the rightmost 50% of the screen. As the
virtual desktop is split equally, the consequence of these actions in
a Remote Desktop Connection is to move the window to the left or right
display on your desk.
And you don't necessarily need to have dual monitors on the host
system! The host might have only one monitor, but you can still span
the single virtual desktop across your dual physical displays on the
Remote Client PC system. For people who use remote desktop connections
on a regular basis, you can get more out of your remote sessions and
your investment in dual displays with the updated client and the /span
switch! Adding the third party application to assist in managing the
windows in your virtual desktop will only improve your overall
experience.