Entry details

Author

SeSam

Date

April 10th, 2009

Comments

No Comments so far.
Add yours.

How to make a linux server appear in Finder

Update 1: Added nss-mdns service and runlevel defaults.

For a while now I’ve been battling with the router my ISP gave me. In the name of user-friendliness it has a Japanese administration interface with a lot of katakana for the IT terms. More importantly it simply doesn’t offer IP issuance over DHCP based on MAC addresses. Which means with the linux box and the MacBook switched on and off randomly they’d get completely different IP addresses and I have nothing to prevent that.

router

(The MAC Address Filtering only works if the wireless extension is installed, not with wired LAN.)

Now that started being a major nuisance after I shared everything via NFS. OS X can connect to NFS shares with the Command+K  ”Connect to Server…” option in Finder but it needs the IP address of the machine. I also set up the NFS server to accept connections only from the IP of the MacBook – I don’t like open doors – but then that had to be changed as well every time the bloody machines swapped IPs after a restart.

Not too sophisticated.

It recently occurred to me that there must be some implementation of the zero configuration networking technology of Apple called Bonjour. The idea behind this is that no matter what their IP is machines broadcast the services they offer and find each other on the network without any user interaction whatsoever.

A prime example is when there are two Macs on a network and you set up file sharing on one of them in matter of seconds it will pop up at the “Shared” section of the other’s Finder. With Leopard this feature has been extended so Windows machines are recognised automatically as well. When I visited home upon connecting to the LAN the public shares of all the Windows PCs in our house appeared almost instantly. After supplying the usernames and passwords of the respective computers I could browse the files without configuring anything. (You need to set up Samba – well not as much set up more like tick a checkbox in the System Preferences – if you want Windows computers to see Mac shares over the network.)

I think we can all agree that the zeroconf approach is pretty cool. But what if you have a linux box?

Surprisingly it didn’t take long at all to figure out a solution. I wonder why I didn’t do it earlier to be honest. Here’s how it should go on a Gentoo box:

Step 1, Set up netatalk, the open source implementation of AFP, Apple’s file sharing protocol. After emerging it needs a few tweaks. In /etc/netatalk/netatalk.conf some protocols are better switched off.

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Now add the last line to /etc/netatalk/afpd.conf to configure the AFP daemon. (Make sure it is one line with no line break.)

- -transall -uamlist uams_randnum.so,uams_dhx.so -nosavepassword -advertise_ssh

Then proceed on configuring the shares. They can be added at /etc/netatalk/AppleVolumes.default but I just went with the default sharing of the home folder.

With the following command add the netatalk daemon to the default runlevel (so it autostarts every time with the machine) and start it.

rc-update add atalk default
/etc/init.d/atalk start

Step 2, Configure Avahi, the open source replacement of Bonjour (zero configuration networking). AFP shares is one thing but if you want them to pop in Finder without any hassle you need Bonjour to advertise their presence on the network. Apple has its own source code available for linux but I found mDNSResponder vastly inferior to Avahi. (i.e. I had no idea how it worked…)

Avahi needs a config file at /etc/avahi/services/afpd.service to contain the following:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

The txt-record entry specifies the type of machine OS X will think your share is on. This will result in OS X machines to display your linux box with a nice Xserve icon. Undefined shares get an Apple monitor icon or a Windows CRT with BSOD on it as far as I know.

Update 1: In order to be able to use machine names instead of IP addresses from the linux box you will need to emerge the nss-mdns package too. In /etc/nssswitch.conf find the line starting with hosts: and add mdns to the end of the line. Mine looks like this now:

hosts: files dns mdns

Finally add to the default runlevel and start Avahi as well.

rc-update add avahi-daemon default
/etc/init.d/avahi-daemon start

Step 3, profit. That’s all to it because after starting Avahi an icon for the linux box will appear in matters of seconds in Finder. Press Shift-Command-K to go directly to the Networks location and wait for your server there. When it pops a double click will result in a can’t connect error but don’t panic. Just use the “Connect As…” button and specify your linux username and password. Congratulations, you can now browse the linux server as if it was any other Mac on the network.

lillemor in osx

If you want to use more types of services the Gentoo Wiki page on Avahi can help with the configurations. If you’d like to use the linux server as a Time Machine backup location Matthias Kertschmann’s guide explains that as well. My post is based upon his guide except I changed the file locations to their Gentoo equivalents.

It is important to mention that if you run any firewalls on the machines they need to be disabled or adjusted to work with Bonjour/AFP. This mainly means you have to allow communications over port 548 and 5353.

Entry details

Author

SeSam

Date

March 9th, 2009

Comments

No Comments so far.
Add yours.

Adium EVE icon

Besides being the cutest thing ever EVE (short for Extra-terrestrial Vegetation Evaluator) is said to be influenced by the latest Mac designs. So it is only appropriate if she appears on the Dock, which is exactly what this EVE icon set for Adium by mxmln offers:

EVE-Adium

Disconnected she is in “plant mode” and upon message reception she gets the smiley eyes. My only woe is that there is no indication whatsoever for the away status. Nevertheless this is a minor issue compared to the sheer awesomeness of the whole thing. Download it here.

What bothers me more is this Adium bug: the dock icon keeps reverting to the default green bird when I quit. I’ve tried everything: restarted the dock, removed and reapplied the icon, reinstalled Adium, to no avail. I opened a ticket on in the trac system, but until now it’s been pretty quiet.

Update: I managed to fix the icon! Apparently I used the wrong approach to remove and re-add. Removing then using Spotlight to start the program then pulling the icon to place would not work. I had to remove the icon then pull the app bundle from the Applications folder to the Dock to fix. Hope this helps.

Entry details

Author

SeSam

Date

May 11th, 2008

Comments

4 Comments so far.
Add yours.

Mac Music Video

Twitt(url)y-n találtam. Szuperötletes.

YouTube Preview Image

150¥ DRM-mentesen, annyit meg is ért.

Entry details

Author

SeSam

Date

April 21st, 2008

Comments

1 Comment so far.
Add yours.

Evernote

Ez így ebben a formában nothing short of zseniális. Nekem kell egy ilyen. Most.
YouTube Preview Image
Mekkora, hogy a képekben lévő szövegekre is keres. Endless possibilities. Itt lehet a bétára jelentkezni. Ja, és mennyivel jobban néz már ki az OS X kliens? Hiába, Core Animation, megnézem azt a seamless méretezőcsúszkát mikor csinálják meg Winen.

Entry details

Author

SeSam

Date

November 7th, 2007

Comments

2 Comments so far.
Add yours.

Nothing changes

A tűz éget. Az ég kék. Az Index FUD-ol. (Megjelent az első trójai Macre)

Hát persze. Legalább a Winesek nyugodtan alhatnak, hogy na hiába verik a nyálukat az újgazdag almások, az ő rendszerüket is nyugodtan zabálja vírus. Ami jelen esetben egy third-party QuickTime plug-innek álcázza magát. Ez már maga gyanúsnak kellene hogy legyen. A plug-in amúgy eredetileg korlátozott videotartalmak megtekintésére szolgál (pr0n): ez sem sikoltja, hogy szivatni akarnak, á.

Telepíteni csak úgy lehet ilyesmiket, ha a felhasználó (igen, van a “júzer”-re magyar szó, amitől az ember nem akarja letépni az arcát…) bepötyögi a jelszavát. Szóval ez kábé annyira trójai, mintha a faló ajándékba adása előtt a görögök hivatalosan is megkérdezték volna a trójaiakat, hogy elfogadják-e.

Azt is elfelejtik megemlíteni, hogy a DNS-átirányítás azért nem formatcé.

Az Intego eredeti memoja szerint:

After the page loads, a disk image (.dmg) file automatically downloads to the user’s Mac. If the user has checked Open “Safe” Files After Downloading in Safari’s General preferences (or similar settings in other browsers), the disk image will mount, and the installer package it contains will launch Installer. If not, and the user wishes to install this codec, they double-click the disk image to mount it, then double-click the package file, named install.pkg.

If the user then proceeds with installation, the Trojan horse installs; installation requires an administrator’s password, which grants the Trojan horse full root privileges. No video codec is installed, and if the user returns to the web site, they will simply come to the same page and receive a new download.

Aki egy kodeknek admin jelszót ad, az meg is érdemli…

A Symantec adatbázisa helyre is rakja a dolgot a “threat assessment“-jében. (Risk Level 1: Very Low)

Entry details

Author

SeSam

Date

October 20th, 2007

Comments

No Comments so far.
Add yours.

closing tabs

Előző postból kimaradt, hogy szerintem már az új háttérkép is telitalálat. Végre nem fű.

Sok helyen írták, hogy a sajátságos francia törvények miatt lesz hálózatfüggetlen iPhone Franciaországban. Ami érdekes, hogy lesz-e emiatt olyan, aki direkt franciahonból vesz majd telefont, valamint hogy az ilyen csak egy országra korlátozott dolgok mennyire felelnek meg az EU versenyjogának.

A Facebookon meg random rátaláltam egy elgondolkodtató írásra, amit épp tíz éve publikáltak: Advice, like youth, probably just wasted on the young.

Entry details

Author

SeSam

Date

October 20th, 2007

Comments

No Comments so far.
Add yours.

Leopard features

Hétvége van, ami korántsem jelenti azt, hogy ne lenne mit csinálnom. Viszont inkább sesamhut írok. Don’t ask.

Kiderítettem, hogy a Leopard 26-án érkezik Japánba is, 14.800 Yenes áron, ami fillérre megegyezik az amerikai Apple Store 129 Dollárával. Ez magyar pénzben körülbelül 22.750 Forintot jelent. Összehasonlításul a BestBuy-nál egy Windows XP Professional $299 (52,640 Ft.), a Vista Ultimate $399 (70,250 Ft.) és a legolcsóbb Vista Home Basic $199 (35,000 Ft.)

Bár nincs rá pénzem, azért megnézegettem a több mint 300 újdonság közül melyik érdekelne (nyilvánvalóan az agyonreklámozott néhány újításon kívül):

UI Recording and Playback
Add even more capabilities to your workflows. Use a new action called Watch Me Do that lets you record a user action (like pressing a button or controlling an application without built-in Automator support) and replay as an action in a workflow.

Ez például kifejezetten izgalmas. Makrózható oprendszer a’la Microsoft Office. Az Automatort eddig is szerettem.

New Automator Actions
Create more useful Automator workflows with actions for RSS feeds, iSight camera video snapshots, PDF manipulation, and much more.

Tökjó, utca felé néző kamerával mondjuk percenként snapshotot venni és feltölteni netre.

.Mac Sync for Dock Items
Make your Dock look the same on all the Macs you use. Change the Dock on one and it will automatically be updated on the others.

Oké, nekem csak egy Macem van, de az csak jó ha minél több beállítást tárolhat az ember szerveren a saját gépe helyett. Például ugye ha lehal a vinyó…

Wikipedia in Dictionary
Harness the power of Wikipedia when you’re connected to the Internet — it’s built right into Dictionary. You get a great Mac OS X user interface with super-fast searching and beautifully laid out-results.

Úgyis mindig wikizek, ez szuperhasznos. Valamint azért figyelemreméltó, hogy a wiki az Oxford szótárai mellé települhet.

Japanese-English Dictionary
Translate English to Japanese and vice versa. This capability is now built into the Leopard Dictionary.

Wow. A JEDict-et valószínűleg nem fogom kidobni, de mindenképpen érdekelne ez a japánszótár. Arról nem is beszélve, hogy plusz érték: már úgy értem, hogy az ember vesz egy operációs rendszert, és digitalizált szótárakat kap bele…

Japanese Language Support
In Leopard, the Dictionary application supports the Japanese language right out of the box, with an industry-leading Japanese dictionary and thesaurus provided by Shogakukan. The dictionary contains over 200,000 words with rich descriptions and examples, and the thesaurus contains 25,000 words covering 6,000 categories.

…nem is egyet. Lassan egy full 電子辞書 lesz a Macekbe építve.

Recording
Save your audio and video chats for posterity with iChat recording. iChat asks your buddies for recording permission before the chat starts, then stores completed audio chats as AAC files and video chats as MPEG-4 files — so you can share with others or sync to your iPod.

Ez csak szimplán fun. :mrgreen:

Multiple Logins
In Leopard, iChat allows you to log in to all your chat accounts simultaneously, whether you use .Mac, AOL, Google Talk, or Jabber.

Na már csak Yahoo, MSN és ICQ kell bele és vetélytársa lesz az Adiumnak.

Expanded Font Set in Japanese
Put updated Japanese fonts to work. The included Japanese font families, Hiragino Gothic and Hiragino Mincho, are considered among the most beautiful of Japanese fonts, and they now support Hyogaiji, the new standard for Japanese character sets defined by the National Language Council and Japan Industry Standards.

Nem is tudtam, hogy ilyenek léteznek. 表外字?

To-Dos
Create to-do items directly from email messages or notes in Mail. Simply highlight text in an email, then click the To Do button to create a to-do from a message.

Ha ez a To-Do rendszer használhatónak bizonyul, lehet hogy kevesebb dolgot felejtenék el. (Tudom, papír, ceruza…)

New AirPort Menu
Get a clearer picture of your surrounding networks in the AirPort menu. Secure wireless networks are identified by a lock icon.

Az biztos, hogy a mostani az nem az igazi. Művészet rájönni, milyen hálózatok vannak a levegőben, jelerősségről nem is szólva.

Video Recording
Use Photo Booth to make movie clips. Capture those precious moments and send them to your friends in an email message. You can even choose a frame from your movie to use as your account picture or iChat buddy icon.

Villámgyorsan készíthető kis videók? Nem hangzik rosszul. Videoblog, anyone? :D

Improved PDF Annotations
Take advantage of new PDF annotations in Preview. Add Stickies-style notes and links to websites or other pages within the PDF. Mark important areas in ovals or rectangles and highlight text. All annotations are saved with the PDF so you can share them with others.

Ez már nagyon kellett. Vagy csak én nem tudtam eddig kihúzótollazni a PDF-ekben… Mások kiemeléseit mutatta persze, szóval nem is igazán értettem, miért nincs beleépítve az, hogy én is csinálhassak ilyesmit.

Dictionary Definitions in Spotlight
Quickly find the definition of any word by entering it in the Spotlight search field.

Meg se kell nyitni a szótárat…

Calculations in Spotlight
Find answers fast. Just activate Spotlight and type in a simple or sophisticated equation, and Spotlight will instantly show you the result. Enjoy support for over 40 functions ranging from simple math to logarithms to trigonometry.

…de tényleg lassan beírja az ember a Spotlightba, hogy pizza, és rendel egyet.

Spotlight Application Launching
Launch applications quicker. The Spotlight default item is now the Top Hit, so if you search for an application, all you have to do is press Return to launch it.

Eddig meg kellett nyomni az Apple gombot. Ez mondjuk tipikus példája a vásárlókra figyelésnek: tuti aki egyszer is próbálta utána mindig a Spotlightból indított mindent.

Web History Search
Search your recently visited web pages with Spotlight. Spotlight indexes the names of the websites you have visited as well as the content in the sites themselves. Search any attribute of a recently visited web page and you can go right back to it in Safari.

Nonplusszultra. Feledékenyeknek, és Safari ablakokat gondatlanul bezáróknak majd a címet elfeljtőknek, mint én.

Live Partition Resizing in Disk Utility
You may be able to gain disk space without losing data. If a volume is running out of space, simply delete the volume that comes after it on the disk and move the volume’s end point into the freed space.

Ez ugye UNIX-világban nem olyan nagy szám, de megnézem mikor lesz valami hasonló beépítve Windowsba.

Guest Log-In Accounts
Allow anyone to surf the web and check email as a guest on your Mac. When they log out of the guest account, Mac OS X purges the account, removing any trace of their activity. So each time someone logs in as a guest, he or she gets a fresh, unused account.

Ez milyen hasznos már. Ki ne utálná amikor mindenféle más emberek buherálják a gépét, és lehet utánuk takarítani.

Grammar Check
Let your grammar set a shining example. A built-in English language grammar checker helps ensure that you don’t make errors in grammar.

“Since the creation of the Internet, the Earth’s rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.” (bash.org)

.Mac Sync for System Preferences
Get yourself a .Mac account and your System Preferences can stay in sync across all your Macs. No matter what Mac you use, you’ll feel right at home.

És még egy kis szinkronizálás.

Improved International Support
Get more out of Terminal. The Core Text API for text layout reduces setup time and makes Terminal behave flawlessly for international users, with an increased character set.

Eddig ugye például a japán filenevek nem igazán működtek a terminálon. Hátha ez változik.

OpenDocument and Word 2007 Formats
Take advantage of TextEdit support for the Word 2007 and OpenDocument formats for reading and writing.

Ó, IGEN. OpenDocument formátum. És lehet bele menteni is. Egyre kompatibilisebb a Mac a linuxommal. Azt mondjuk nem értem, hogy az iWorkben akkor ezt miért nem lehetett megcsinálni.

Restore Your Mac
Restore everything on your Mac. Time Machine will put all the files right back where the originals were — as if nothing ever happened. You can even restore your files to set up a brand-new Mac.

Hát igen, ez egy kicsit előbb kellett volna

Wide Area Bonjour
Access your Macs, at home or on the road, with a single consistent host name. Use this host name whether you’re behind a NAT gateway or hopping across DHCP servers.

Ez vajon valami VPN-féleség? Mert igen jól hangzik…

UNIX® Certification
Mac OS X is now a fully certified UNIX operating system, conforming to both the Single UNIX Specification (SUSv3) and POSIX 1003.1. Deploy Leopard in environments that demand full UNIX conformance and enjoy expanded support for open standards popular in the UNIX community such as the OASIS Open Document Format (ODF) or ECMA’s Office XML.

Szabványok követése. Teccikhallani, Microsoft?

Összefoglalva, szerintem elég impresszív. Főleg hogy ez mindössze szub-verzió váltás, 10.4-ből 10.5 lesz, ellentétben az XP-Vista ugrással. Nameg a fentiek csak azok az újítások amik engem első olvasatra potenciálisan érdekeltek. Van még jó pár. Valamint nyilván érdekes lesz, hogy mennyire sikerült megőrizni a stabilitást és a biztonságot.

Entry details

Author

SeSam

Date

October 17th, 2007

Comments

1 Comment so far.
Add yours.

meow!

Még kilenc nap és jön az új nagymacska: Mac OS X Leopard to ship on October 26. Majd amikor épp nem suliba kell rohannom utánanézek hogy pl. Japánba is akkor érkezik-e, meg hogy mennyibe kerül.

Entry details

Author

SeSam

Date

October 11th, 2007

Comments

7 Comments so far.
Add yours.

Black Thursday

Not quite the day I have imagined having.

I was peacefully reading Prophet Without Honor during a predictably boring kyogen when Preview froze, displaying the notorious cursor of rainbow death. That could have been a minor glitch, however soon the whole OS X followed. Now that was a first. Up until this morning I’ve always been able to just force quit any mischievous application. Not this time…

So I rebooted, or rather I tried to reboot, unsuccessfully. The MacBook never got past the grey boot screen, and the flashing folder with a question mark didn’t bode well either. Neither did the clearly audible click-click sound coming from the hard disk.

This is the moment when all your life data flashes through your mind.

I ran home, and tried to boot from the OS X installer DVD to no avail. I mean it booted up all right but the HDD wasn’t present. So I disassembled the Mac and with shaky hands I tried the drive in the desktop. Click-click. Detecting IDE drives… For minutes…

So much for the glory of Rome.

This is how I spent my afternoon looking for two items: 1) a replace drive 2) a Torx T8 screwdriver. Luckily Apple has a really generous policy about hard drives and memories: the user can replace either of them without losing warranty. Not that my warranty was still valid, but it also means both parts are easily accessible and user serviceable. They are behind the same L-shaped bracket I removed when I installed the extra memory from Crucial. Why the Torx then? Because the HDD is held by a flexible metallic plate that keeps the HDD in place and also protects its circuit-side. And this plate is held by four not-so-ordinary screws. Torx is basically a star with six arms, but try to explain that to a Japanese shop assistant. Well, after about twenty minutes of haggling they managed to find the right one, so it went rather better than I expected. It’s a nasty trick by Apple though, least I don’t think these screwdrivers are in abundance in a common household. Or maybe I’m wrong and they are popular over the New Continent. (If anyone’s curious, the Japanese term’s ヘクスローブドライバー T-8)

I went for the same manufacturer that Apple used, Seagate. The original drive was an ST98823AS (80G), and I got an ST9160821AS (160G). An upgrade I could have lived without to be honest. This guide shows the detailed instructions how to replace a drive in a MacBook. It all went shiny, it’s not quantum physics after all. OS X flew on in less than an hour, took about another thirty minutes to upgrade itself to the latest version, and violá, freshly installed Mac.

Also, apparently other people had similar issues.

If only I hadn’t lost nearly fifty gigabytes of music.

My entire music collection.

But hey, if you’re an idiot you surely deserve to die. And I was a prize one for I never even thought about backing up such important data. Why would the hard drive fail in the notebook I bring to classes every day, with which I travel and move around while switched on… The universe is vast but human (my) ignorance is the true infinity.

Only thing I’m left with is the 7.5G of the iPod. Which is a funny thing, because you can’t transfer music from the iPod to the computer, only the other way around. You can only sync with one iTunes application at a time. So I had to use YamiPod to first copy all the music from the iPod to a temporary folder, then import it all back to the new iTunes and then sync back the songs to the iPod. Well, least I have those, although it’s heartbreaking to look at all the broken albums from which one or two tracks were saved by some playlist…

Luckily I had all my music I actually paid for on the iPod as well, or else I’d be looking for sharp things already…

(What does data loss teach you? Buy your music.)

Funny I can get so worked up on a simple hard drive failure you could say. And yes maybe I’m overreacting… but music was what really got me through the days here. And, like TV shows, it’s an integral part of my life. So I’m now all emo, thanks for asking.

I hate being the person who gets so sad for losing an iTunes library.