Posts Tagged ‘osx’

Οι φορητές συσκευές της Apple και οι Mac

Posted in Apple, Internet & technology on July 5th, 2010 by atma – Be the first to comment

ipad Οι φορητές συσκευές της Apple και οι Mac

The iPad

Ο Steve Jobs στο τελευταίο WWDC δεν έκανε λόγο για το MacOSX και τα Macs (laptops/desktops) με αποτέλεσμα πολλοί να αναρωτιούνται αν έχει φτάσει το τέλος του MacOSX κι αρχίζει μια εποχή όπου θα δεσπόζουν τα tablets και οι πολυμορφηκές συσκευές οι οποίες θα είναι συνδεδεμένες στο διαδίκτυο.

Μάλιστα ο Steve Jobs έχει αναφέρει σε συνεντεύξεις1 ότι οι σταθεροί υπολογιστές θα πεθάνουν και θα μοιάζουν με δεινόσαυρους κι ότι αυτή η αλλαγή δεν θα αρέσει σε πολλούς, παλιούς, ούτε στον ίδιο που έχει μάθει με τα PC’s αλλά δυστυχώς είναι αναπόφευκτη.

Από μια οπτική γωνία, ο Steve Jobs και οι υποστηρικτές των internet tablets, παλιότερα netbooks κλπ. Έχουν δίκιο και τα στοιχεία τους επιβεβαιώνουν, η Mary Meeker της Morgan Stanley επιβεβαιώνει ότι το internet μέσω κινητών τηλεφώνων2 θα ξεπεράσει το fixed internet3 πριν το 2015.

Αν κρίνω από τον εαυτό μου, η χρήση που κάνω μέσω iPhone είναι περίπου 400 MB internet traffic από 3G/GPRS και το χρησιμοποιώ αρκετά συχνά για υπηρεσίες όπως: FourSquare, Google Maps, Twitter, Facebook, RSS News Reader, Browsing. Παρόλα αυτά σε καμία περίπτωση δεν μπορώ να σκεφτώ το iPhone ή το iPad ως ανεξάρτητες συσκευές. Δυστυχώς ή ίδια η Apple έχοντας ένα τόσο κλειστό μοντέλο ελέγχου δεν αφήνει τις συσκευές να λειτουργήσουν ως ανεξάρτητες διαδικτυακές συσκευές. Δεν μπορείς να περάσεις το content που έχεις στον υπολογιστή σου σε ένα iPad ή σε ένα iPhone χωρίς μετατροπές. Ακόμη και τα έγγραφα, είναι όμορφα να τα βλέπεις στο iPad, προκαλώ τον οποιονδήποτε να δημιουργήσει ένα έγγραφο Pages ή μια επαγγελματική παρουσίαση στο Keynote στο iPad! Αποκλείεται, θα φάει ημέρες. Επίσημα μάλιστα, δεν μπορεί να γράψει Ελληνικά (στο iPad) αφού το Ελληνικό πληκτρολόγιο δεν υποστηρίζεται ακόμη!

Κατά την ταπεινή μου γνώμη η υπεροχή της Apple στηρίζεται κυρίως στο λογισμικό που η εταιρία έχει καταφέρει να δημιουργήσει. Η βάση του λογισμικού της είναι το MacOSX. Είναι κάτι διαφορετικό να δημιουργήσει μια ομάδα ανάπτυξης του συστήματος για φορητές συσκευές iOs και κάτι διαφορετικό το να παρατήσει εντελώς το MacOSX και να ασχολείται αποκλειστικά με το iOs. Πιστεύω πως το MacOSX είναι αυτό που δίνει ιδέες και υλικό στο iOs κι όχι αντίστροφα. Φυσικά το ότι το iOs αποτελεί το ισχυρό όπλο της εταιρίας στην αγορά των φορητών συσκευών που παράγει, δεν μπορεί να παραγνωριστεί αλλά σε καμία περίπτωση δεν πιστεύω ότι η Apple θα σταματήσει την ανάπτυξη του OSX ή των υπολογιστών της.

Με την σημερινή μορφή του το iPad είναι μια συσκευή γεμάτη καινοτομίες, όμως στον χώρο εργασίας, εκτός από παρουσιάσεις λίγα μπορεί να προσφέρει γιατί απλούστατα είναι πολύ δύσκολο να δημιουργήσεις content οποιασδήποτε μορφής σε αυτό! Το touchscreen keyboard είναι άκρως δύσχρηστο ενώ ακόμη και το πως θα το στηρίξεις για να γράψεις με δύο χέρια είναι ένα μεγάλο θέμα. Όσο εύκολη είναι η κατανάλωση content τόσο δύσκολη είναι η δημιουργία του, από ένα απλό blog post έως την δημιουργία ενός αρχείου Number

Έπειτα το iPad σήμερα έχει σοβαρότατες ελλείψεις σε Applications. Η πρώτη και σημαντικότερη είναι το Facebook. Ενώ μπορείς να κάνεις login δεν λειτουργεί το facebook chat, κι ενώ υπάρχουν payware apps γι αυτόν τον λόγο δεν υπάρχει multitasking για να μπορείς να είσαι loged-in στο facebook και να κάνεις chat ταυτόχρονα. Κι ενώ κάποια προγράμματα έχουν ενσωματωμένο browser στο facebook chat application δεν μπορείς να ανοίξεις τις ομάδες που έχεις κλείσει από το chat το υπολογιστή. Όταν μια ομάδα είναι κλειστεί απλά δεν φαίνεται, άρα είναι σαν να μην υπάρχει. Εν ολίγοις μιλάμε για άθλιες υλοποιήσεις του chat. Για το twitter δεν υπάρχει ένα ικανοποιητικό πρόγραμμα, ενώ το multitasking που ποτέ δεν χρειάστηκα στο iPhone εδώ κι ένα χρόνο εντατικής χρήσης, στο iPad λείπει διακαώς! Το iOs λένε ότι θα βγει μετά τον Σεπτέμβριο χωρίς να έχει οριστεί ημερομηνία ακόμη…

Πολλά News Applications είναι απαράδεκτα, π.χ. το Times Magazine σε χρεώνει κάποια χρήματα απλά και μόνο για να κατεβάσεις ένα PDF αρχείο με το νέο τεύχος. Άλλα όπως το Reuters News Pro και το NYT Editor’s choice αξίζουν μια δοκιμή και είναι freeware. Από την εμπειρία μου, κάποια applications crasharoun πολύ συχνά, με αποτέλεσμα να κάνουν την χρήση τους σπαστική το λιγότερο, ενώ το browsing έχει σαφέστατα limitation (δεν αναφέρομαι στο flash φυσικά).

Το iPad είναι μια συσκευή με πολλές δυνατότητες που υποφέρει από την ίδια ασθένεια του AppleTV: Είναι πολύ κλειστεί για να είναι ουσιαστικά χρήσιμη! Χωρίς υπολογιστή οι δυνατότητες παροχής content πέρα από αυτό που έχουν δημιουργήσει οι άλλοι για εσάς διαδικτυακά είναι πολύ δύσκολη. Το iPad για την ώρα δεν ήρθε για να ανταγωνιστεί τα Macbooks απλά για να τα… συμπληρώσει!

  1. Μπορείτε να βρείτε τις συνεντεύξεις του Jobs στο All things Digitial []
  2. Η όπως αποκαλείται mobile data internet που σημαίνει σύνδεση στο διαδίκτυο μέσω GPRS, 3G, HSDPA κλπ. []
  3. Μέσω σταθερών γραμμών DSL, οπτική ίνα, κλπ. []

GnuPG για MacOSX Snow Leopard

Posted in Uncategorized on November 11th, 2009 by atma – Be the first to comment
Τελικά βγήκε ένα bundle για GPGMe support στο Mail.app! Εδώ είναι το MailBundle. Απλά βάλτε το στον φάκελο $HOME/Library/Mail/Bundles/ και θα το δείτε στο Mail.app menu :-)

About Launchd and OSX issues. Is it really that good?

Posted in Apple on October 29th, 2009 by atma – Be the first to comment

MAC OSX Leopard 150x150 About Launchd and OSX issues. Is it really that good?A couple of weeks ago,  while I was trying to solve a problem with dnsmasq not starting at boot, I decided to take a closer look at launchd.  This is Apple’s cheering baby. The Cupertino company brought a new UNIX init system because the ones around were not enough and all the choices at the time were old. Of course there always license issues on top of technical ones. Apparently, System V was too chaotic, the BSD-style init system was too old and too BSDish… Editing manually the files in a TXT-like format? Come on! This is 2009 after all, right? I’m not even going to mention UpstartSystem Management Facility, I don’t even know if most of these were around when Apple started launchd.

Well launchd apparently is excellent until you actually try to make it work. Okay, first – as said above – it was the dnsmasq thing. For a weird reason the launchd script provided by macports came with a 3 level abstraction. I hate ugly hacks and I was reading so many Apple blogs about launchd that made me thought “Why the heck did they put this atrocity in there?“.

It took time and a lot of effort to understand what was going on. First I tried to make it work with another .plist1 that I found on macports bug tracker. That’s because, as stated above, I dislike ugly hacks and the 3-level abstraction seemed to be one of those. Well the tracker plist worked fine, but not at startup. Even though there was a launchd keyword called “NetworkState” there, which – in theory – checks out if the network interface is up according to the manual. In practise though, it did not check anything at all. Launchd was trying to launch dnsmasq before “en0″ was up. Note that eno is the default – first –  network interface under OSX. I went back in the port solution, the 3-level abstraction thing. I’ve read a few comments about dnsmasq on the tracker before leaving my own comments. Launchd was calling a another file, also known as “wrapper” in the UNIX world, which then executes the command. Well this wrapper was calling a (non-existent) shell script. This script should have all the options and – in theory – should be a one-liner. Well it didn’t work, no matter what. I tried any conventional solution but the error was un-comprehensive.

I could not find any help on the forums and/or Google. Apparently everyone knows how to edit and/or modify an already written plist file but no one knows actually how to create one from scratch and mostly why a specific plist does not work. I found a solution for dnsmasq from macosxhints forum, THANK GOD! I can’t tell why macports have not adopted the same approach yet…

Then a second issue came up. I setup mutt,because of it’s threading capabilities, on my server running OSX Tiger. Who’s gonna bring the email? Fetchmail is good for the job I thought! Original? yes I know… it’s not. So I configured $HOME/.fetchmailrc and postfix and procmail and mutt and… no that’s it. I decided to use the good old cron in order to get my fetchmail to… fetch(!).

Well, by default cron does not work under Tiger. I bet that Leopard and Snow Leopard have the same behaviour. What must I do? Get with the times I thought! I’ve start reading (again) the launchd scripts and documentation in order to get a clear idea on how to create a plist for fetchmail, to substitute cron. On macports you can find documentation on how to setup system-wide fetchmail. In my case though, I’d like to keep it clear so I thought that, since this is for just one user, me, there’s no reason to handle this system wide. When I run manually fetchmail I get the email home. I need just to make sure launchd launches fetchmail every 5 minutes.

Launchd is an all-in-one substitute for cron and init, among other things. Well, I wrote a script in a nice human readable syntax like (that’s the final version, keep reading to understand why the plist is pointing to justfetch):

   Label
   local.fetchmail
   Program
   /Users/atma/Progs/bin/justfetch
   ProgramArguments
 
     /Users/atma/Progs/bin/justfetch
 
   StartInterval
   300
   RunAtLoad

As you can probably see the syntax is pretty clear. There’s everything there. Well it does not work. The thing is… There’s not even a way to make it work without a wrapper, because Dave Zarzycki put a nice little limitation into launchd for some weird reason: Every file and/or program that is handled by launchd must live at least 60 seconds! Now, how do we swallow that? And how this thing is going to replace cron exactly? By creating files that point to other files to actually launch a shell script? Is this the beauty of launchd? With Gentoo, Ubuntu, OpenBSD, FreeBSD and probably WindowsXP’s services control panel I would never had to go through all this in order to perform an easy task as running a binary file at a specific time frame. Yes, I’m not trying to write a shell startup script like Gentoo’s 80-lines startups, but just to get a job to run!!!

Okay then. I just followed the lines, clearly frustrated because, I’m not a hacker and I had to go through a long path in order to discover all this magic under the colourful hood! Well okay, I just made a launchd that starts a script (see above), which scripts is something like this:

#!/bin/bash
sleep 61 # in order to not upset launchd...
/usr/bin/fetchmail --fethmailrc=/Users/atma/.fetchmailrc --nodetach

Just to point out everything I’ve found. Quoting the launchd manual:

A daemon or agent launched by launchd MUST NOT do the
following in the process directly launched by launchd:
       o   fork(2) and have the parent process exit(3) or _exit(2).
       o   Call daemon(3)

Fetchmail apparently does that, when launched directly through launchd. Okay I can live with that too. After all we’ve gone so far. But there’s another thing that everyone using launchd should also know: Launchd expects the script or program to exit with status 0. Otherwise it comes up with an error which causes disfunction. So, in my case, fetchmail exits with status 1 when there is no mail, so if you want to run fetchmail periodically from launchd, you probably want to report 1 as 0 in your script, or else launchd will think bad things are happening when bad things aren’t happening.

Now, after loosing a couple of days, I’m quite positive that the people who thought adopting launchd in Ubuntu were on to something (too much weed???)!

Jokes apart, launchd is a nice idea but the way it’s implemented makes it really complicated. The key-words are not much and in theory they can satisfy all kind of requests easily using the same XML syntax. But in practice, launchd has proven to be even more complex than SystemV init. Maybe they (Apple) should think twice before killing features like cron for a piece of software that has so many intricacies under the hood.

I don’t know if I’m going to change opinion anytime. I’ll continue to fight with launchd – yes, it’s a fight – and maybe drop an upgrade on this blog about it.

note: The code above is displayed bad because it does not have tags. HTML probably ate them. Anyway, the .plist file is an addition for the same of understanding so I’m gonna leave it broken.

  1. Launchd uses xml .plist files as configuration files… I consider XML way too ugly!! I know it’s not the best way to judge a config file, but I can’t help it. []

Samhain and rsync issues under MacOSX

Posted in Apple on October 25th, 2009 by atma – Be the first to comment

I like to keep things secure. I have a few monitoring applications running on my OSX Tiger server1. After a little search for a nice IDS, I bypassed the notorious AIDE, for Samhain. I’ve been watching this project since 2007 but never actually used it.

Since MacPorts do not have a port for this, I created a custom directory and made the installation manually. Everything went smoothly, it has passed some time I can’t recall if I needed extra packages, I think not.

Lightly configuring samhainrc, in order to get a first understanding of the program, I’ve changed the directories accordingly to match OSX’s needs and I start running the program. At this point note that my default shell is zsh.

After a couple of days I tried to log in. I noticed – yes, I’m a genius – that the prompt made more than 20 seconds to show up after the motd was displayed. Then I’ve got a broken library message to which zsh relies on, so in the second terminal window I was not able to get a shell.

Since I’m using the MacPorts zsh – yes I know it’s a dangerous thing to use a shell that it’s not sitting at /bin/ and an upgrade could blow you out - I thought hey, that’s the problem. I changed to /bin/zsh. The problem persisted. Then I switched to bash and everything was fine.

At the time I thought about switching shell, it had already passed 30 minutes since I woke up – Sunday morning – so I’ve start thinking!!! Amazing things happen when you start to use your brain, you can try it! I’ve took a look at the logs.

The buffer was full of the following message:

HFS: /rsrc paths are deprecated (..namedfork/rsrc)

Actually – after a google search I’ve found out thatOSX command line utilities use resource forks. Apple has build everything with an additional (-E) extended attribute. So when you use the macports version of rsync, syslog turns crazy and begins to flood the system with error messages. At this point you have to two options. Or switch to the default system-wide rsync which sits at /usr/bin/rsync or mute syslog.

Since muting syslog does not seem to be the right choice I’ve decided to just rename the macports rsync and see how it goes. Nothing changed. At that point, I turned into a wizard and decided(!) to take a look at /var/log/syslog - I know it takes at least 20 years of expertise to realise that you need to look thereFIRST – to realise that samhain was causing the troubles.

Apparently samhain uses some kind of rsync-like build in tool. It does not use the external command apparently. So if you (ever) decide to use a new rsync version or samhain on Tiger, think again.

Another interesting hint regarding rsync backups is that rsync does not copy macosx ACL’s, just the files and the meta that comes with them.

  1. It’s not running the server edition, just the desktop Tiger 10.4.11 system acting as a home server []

ZFS For MacOSX

Posted in Apple, Internet & technology on October 24th, 2009 by atma – 4 Comments

zfs 150x150 ZFS For MacOSXWell, I can’t wait to try this one! The ZFS filesystem, was created by Sun Microsystems and should have been shipped with Snow Leopard. However, Apple was not ready for that - apparently too big - change yet so we got good old HFS+. Well, although the project has been discontinued by Apple as you can see at macosforge, Dustin Sallings created a git repository, continued the project and created an installer after some hacking with the filesystem.

Although this is a step only experienced users ought to take, ZFS is really suited for home users by now. It has been around since 2005 and the only reason it’s not on Linux yet is - wild guess? - the license.

I’m really frustrated from this decision. Apparently ZFS is the future in the complicated sector of file systems and it has got the best possible feedback so far.

As for installing it under Snow Leopard. After – or even before – grabbing the package please consider reading the available wiki1 and – maybe – taking a glimpse at the mailing list.

  1. This one is still under construction []

Convalesco is using WP-Gravatar