Useful tools and tricks for using a Mac in the Enterprise environment (was Adventures in running FreeBSD 6.1 on a Dell Latitude C400)
Dual Screen Remote Desktop
Get link
Facebook
X
Pinterest
Email
Other Apps
rdesktop is pretty cool. Check out an rdp session between a machine running Ubuntu remoting to a windows box. rdesktop is using both monitors for the remote windows desktop. Pics below:
I work for a company that uses and Active Directory domain for the internal network. Therefore, kerberos authentication is supported. MacOS also supports kerberos authentication, so I can replicate most of the single sign-on experience on my Mac. I wrote a simple shell script to get a kerberos ticket-granting ticket and mount the network drives: #! /bin/bash # get the local IP address theIP = ` /sbin/ifconfig | /usr/bin/grep "inet 10" | /usr/bin/grep -v inet6 | /usr/bin/cut -d " " -f2 | /usr/bin/cut -d . -f1` # if IP address starts with 10 then I am probably on work's internal network if [ $theIP -eq 10 ] ; then /usr/bin/kinit -f --enterprise --canonicalize username@company . com@COMPANY . COM /usr/bin/open 'smb://server.company.com/share' fi To make this script really useful, I save my password securely in MacOS's keychain so that kinit can grab it automatically. I use the following command in the terminal: ...
long story.. Disk Utility partition lead to second container disk that looked wrong, so went into terminal and used diskutil eraseDisk to erase the whole disk and use APFS. That looked fine. Had troubles with the network recovery. Important content could not be downloaded so I wanted to boot from USB installer for Mojave, but I could not. tried to use startup security utility, but since I had erased the drive, there was no admin password and so startup security utility would not run. I plugged in the USB drive and disk utility recognized it. In terminal, I navigated to /Volumes/Install Mojave..../Contents/MacOS and ran InstallAssistant in the background. That seems to have worked so far. After restart, everything was fine.
I needed to combine all the files in two different directories. The challenge was that in two different directories, two different files had the same name. So I wrote a merge script to rename the file from the source directory if the name already existed in the target directory. It appears below: #!/bin/bash # Merge the contents of two directories, renaming duplicate files so that no files are overwritten # usage merge.sh destdir SRC1="$1" DEST="$2" for FILE in $( ls "$SRC1" ); do let "i = 0" FN="$DEST/${FILE/%.jpg/-$i.jpg}" while [[ -e "$FN" ]]; do let "i += 1" FN="$DEST/${FILE/%.jpg/-$i.jpg}" done ln -v "$SRC1/$FILE" "$FN" done It worked for my purposes.
Comments