Mac OSX
introduction
I am no MAC fan, and this chapter will mostly be about the problems i encountered.
losing focus on xterm
I noticed this after a software update, xterm once selected shortly loses focus and turns back after a second or so. See klopt.org for detailed info, but it's my android phone attached as PTP camera. The program grabbing focus is com.apple.PTPCamera.
Set it to MTP !
I debugged this using this little program (watch_activations.py) :
yum/apt like manager
There is fink, and backports. But lately i have mostly use homebrew or 'brew' for short:
'''homebrew installs the stuff you need that Apple didn't '''
Install it with :
| install | |
|---|---|
After that, for instance install wget with :
Mavericks on Virtualbox
In short : use niresh' mavericks : Here
One step back : ia description
Worked like a charm.
quick guide
Get the torrent file from niresh's site, you will need to endure some waiting and advertisements, but just put that in a background window and come back later.
It will unpack into a torrent file, which you than have to download, some more patience.
Please note that you need to comply with a number of issues mentioned in the description. They are :
- Install the newest version of virtualbox, the default version from apt-get will NOT do. If you come here after installing, it's not too late, upgrade now and try to restart the VM.
- Before installing disable the virtualbox option: "System->Enable EFI" this is on by default, it should be off.
- Change the network card from Intel PRO/1000 T Server (82543GC) to Intel PRO/1000 MT Server (82545EM), and choose bridged network for ease.
apache
This seems to be installed from scratch, since i only had to
| restart apache | |
|---|---|
The interwebz assured me that this will automatically take care of start at reboot. In detail :
| restart apache | |
|---|---|
Some information i like to add here, though i yet have to try a restart to see if it works. Also i like to add this line to mock Apple for having a construct where one files says 'Disabled' and another one that negates this again, something only morons would do.
Also to aid in finding the web documents directory : the logical place is of course
| web files | |
|---|---|
And you can only edit that as root, or group member of wheel ... thanks Apple...
chrome
Problems accepting untrusted certificates on chrome ? Do it with safari, they end up in the keychain and chrome will use that as well.
network
auto config
To find out what the auto config is, you can download the .wad file that configures that. You can find the location in "Settings -> Network -> Advanced -> Proxies -> Proxy Configuration File" contained :
This probably has not changed, download and view it, it is a plain text file. The proxy is easily found there.
tools
Automator
This is a way to create custom icons on your desktop. In fact it creates custom apps from commands, and thus you can have them on your desktop and in the sidebar. Run the automator and select "Application". You can then type a shell command to make it act like an application by selecting "Run shell script". You will get a standard command 'cat', which you can replace with
| automator | |
|---|---|
This one will run the script that i use to startup an xterm with specific color for the given host. The last redirect is needed to run the command multiple times. For some reason it will only startup one if you do not redirect error output to /dev/null. Save the script you make as a new app. To have a custom icon for your app see next chapter.
Icons
To change icons for applications, this is the fastest way to get from an svg to a working icon. I use svg to be able to quickly change the color for an xterm picture, but this is not directly supported in osx, you should create a png from it. You can do this by opening the svg in the gimp, and then exporting it as png, all choices can remain default.
Now double click on the png file, it will get opened by preview, so just select "edit"->"copy". Now right click on the application and do "get info", select the icon at the left top, and paste (alt-v).
Even faster, i found out you can just copy the file when it's opened in the gimp. So open svg in gimp, edit->copy, then get info, and paste.
karabiner
The god-awful horrible keys of mac osx can be brought back to within reasonable damage (god i hate mac) by using karabiner. I almost have normal functioning keys now with these settings enabled :
under "Change FN key" : Fn to Control_L
under "Functional keys to F1..F12" : Speaker controls to F10,F11,F12
under "change key", "For pc Users" : Use PC style copy/paste Use PC style undo Use PC style find
Note: this will give problems on browsers doing shell simulation (all in-browser shells such as VNC, KVM and shellinabox) because the ctrl-c won't do a normal 'break'.
Since i use ctrl-c for copy a lot more, i choose this setting, when you need to do in browser shells : open up karabiner and disable the Use PC Style Copy/Paste option.( Leave it open to set it back when you are done)
troubleshooting
Losing focus
I noticed this after a software update, xterm once selected shortly loses focus and turns back after a second or so. See klopt.org for detailed info, but it's my android phone attached as PTP camera. The program grabbing focus is com.apple.PTPCamera.
Set it to MTP !
God i hate Apple.
opening text editor to copy/paste
Very annoying of the X server is that it cannot share it's copy-paste buffer with OSX. But if you open a file with the osx editor (TextEdit) it can copy paste.
Still you need a ridiculous round trip to open up TextEdit :
| text editor | |
|---|---|
God i hate Apple.
repeatedly asking for keychain Access password
This was probably caused by not changing the password in the correct place. For instance changing it on the command line (you bastard....) So my first advise is :
change you password via "System preferences" -> "Users & groups" -> "Change password'
Still this is not your fault if you did "IT IS APPLE'S FAULT" so now how to fix it.. This is a sequence of steps i took to at least lessen the problems :
- change you password again to another password via the System preferences"
- Then back again so you now have done it the way apple wants.
- Open "key chain access" and select "preferences" -> "First Aid"
- i selected all options and closed again
- now select "key chain access" -> "keychain first aid"
- edit you password and hit verify
- if it mentions something run 'repair' otherwise toggle keys in point 4 until it does detect a problem.
- reboot a lot in between
Remember : this is what i DID, so i am not sure which steps are really needed or not. And my all time advise: scrap your mac and buy a real machine.
God i hate Apple...
Workstation
Here are some experiences while working with the iMac workstation at RINIS 2014-2017.
google drive
Do not use google drive for osx, since it stops working after a while and is a complete horror to remove again.
And after that, if you are stubborn here is how to install and remove it again.
installation
You can get your drive mounted on OSX with the google drive app. To get it working behind a proxy however is a different problem. The solution was here :
He solved his own, and my problem. However what is not mentioned is that google drive stay running after the first failed connection attempt and you will have to kill it to retry:
| kill google drive | |
|---|---|
Manually you could now set the proxy and run from the command line :
It should work now, but it is not very convenient. So right click the icon in the top bar and hit the ellipses, you can choose preferences there. Then choose "Advanced" , "System settings" : untick "Start Google drive on system startup"
Then use either platypus or automator to bundle these two commands in a script, or how about just bash ?
remove google drive
Told you...
And lately, i come to the conclusion that it does not work !!, copying files to the drive just does not do anything, and it becomes useless. Especially on OSX !! Deleting is also much of a bother. You could look it up in Applications and trash it. Bit the icon remains even after you empty the trash. It turn out there is another Application directory under your home directory !! Delete it there and finally it is gone.
hanging appstore
Note God i hate apple...
First find the AppStore process id and kill the hanging bastard :
That' one problem out of the way, now we have to kill softwareupdated, but we need to be root for that:
Next we have to delete the appstore cache, you can open up a finder window.
CTRL-SHIFT-r refresh
This is the normal key combination for chrome to do a page refresh and ignoring any cache on the server or client. A VITAL function in development. However osx wants to do it different and has another combination :
CMD-SHIFT-r , on my keyboard settings that becomes : WIN-SHIFT-r
Hit it a couple of times before you give up ..
See this page for more visit
volume osx
| sound volume | |
|---|---|
1.0 is about maximum
exim4 bind problem
First thing you notice is that mail does not work. Second thing you notice about this problem is that /var/log/exim4/main.log prints these lines
Now note that it complains about a ipv6 localhost address : ::1 You can disable it in /etc/exim4/exim4.conf BUT a better solution on the interwebz said you should re-run :
| reconfigure exim4 | |
|---|---|
And wait until the listen option comes along. Just remove the ::1; part there. Maybe also remove the 192.168 .. address if you just want to use it as localhost.