Affichage des articles dont le libellé est macosx. Afficher tous les articles
Affichage des articles dont le libellé est macosx. Afficher tous les articles

mardi 2 mars 2021

mac os X daily apps

 Context


as I recently had to switch computer, I see that I forgot to save some settings from the previous one, and of course, I don't have it anymore...


Useful apps I'm using :

Homebrew

Package manager for mac os x : https://brew.sh/

Day-0

https://shauninman.com/day-o/datetime.html

EEE h:mm a (z), dd MMM y (w)

Copy-clip

https://apps.apple.com/us/app/copyclip-clipboard-history/id595191960?mt=12

iterm2

https://iterm2.com/

  • background color : #efface
  • screen color : #decede
  • foreground color : black

emacs

I had been using aquamacs recently, 

this time lets try https://emacsformacosx.com/


rambox

NB: I'm looking for an alternative to this one...)

lundi 12 octobre 2020

Mac Os X - mount issues on /Users after upgrade to mac os X 10.15 / error 77

 fixing /Users defined partition after an upgrade of mac os X.

The Mac I was using was configured before I got it, and I needed to upgrade it to use some more recent applications, but I ran into some issues due to a specific configuration of the /Users partition being located on a different partition than the OS data.

I could not mount it properly, due to 2 errors (might have been possible to mount it directly in HFS, but I also fixed it during the debug, just publishing my fix here with both steps).

Error :

sudo mount -uw /Users

Password:

mount_apfs: volume could not be mounted: Operation not permitted

mount: /Users failed with 77


Step 1 : convert from HFS to APFS

with Disk Utility tool > menu "Edit" > "Convert to APFS"...


Step 2 : edit mount description

/etc/fstab, edited with (sudo) vifs 

was :

UUID=12QW345E-1234-5678-123QWE123QWE /Users hfs auto

changed to :

UUID=12QW345E-1234-5678-123QWE123QWE /Users apfs rw 1 2


Step 3 : grant mount on /Users


Boot in recovery mode ( mac + R )

Launch (menu Utilities) > Terminal

csrutil status
csrutil enable --without fs

reboot

mardi 9 avril 2019

Mac OS X : show (hidden) .files in the finder.

Finder options:
  1.  CMD + Shift + .
Terminal options + restart finder:
  1. Open Terminal found in Finder > Applications > Utilities.
  2. In Terminal, paste the following:
      defaults write com.apple.finder AppleShowAllFiles YES.
  3. Press return.
  4. Hold the 'Option/alt' key, then right click on the Finder icon in the dock and click Relaunch.


from :
https://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/



lundi 4 juillet 2016

Dimming screen / "night mode" for android or mac

Applications I used to dim my screen, reduce the amount of "blue color" that is supposed to make you awake :



lundi 29 février 2016

VirtualBox install / config de base

 * Config Clavier Mac sous Debian :
https://lokan.fr/2013/12/11/configurer-correctement-son-clavier-mac-sous-debian/
XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="mac"
XKBOPTIONS="lv3:switch,compose:lwin”
* Config redimensionner fenêtre VirtualBox
(non testé ) : https://forums.virtualbox.org/viewtopic.php?f=2&t=68966
* http://download.virtualbox.org/virtualbox/5.0.14/
* http://download.virtualbox.org/virtualbox/5.0.14/UserManual.pdf
* Be sure to have the kernel headers, gcc and other basic build-tools installed
apt-cache search/apt-get install build-essential linux-headers-$(uname -r) dkms

* If present, it should be in /media/cdrom (or /media/cdrom0)
cd /media/cdrom0
sh VBoxLinuxAdditions.run

* NB : you might need to reboot the host.
* You can now add some shared folders (for example). They will be owned by root with drwxrwx--- root vboxsf (group)
* Add user in group vboxsf :
sudo usermod cm -a -G vboxsf


mercredi 29 octobre 2014

port install error "checksum does not exist" : clean and reinstall



I had an error with the Mac Ports (https://www.macports.org/) on the dbus-glib install while trying to install some other packages. It was just saying that it did not exist in /opt/local/var/macports/distfiles/dbus-glib . It's not clear what broke this package for now, but the way to solve the issue was simple as found here : https://trac.macports.org/ticket/45534


        sudo port clean


and then, reinstall...
        sudo port install


And check, I could upgrade all the other packages and install some other new ones :-)



---
(For "google" parse purpose, here are the errors I was getting)
---
[...]
--->  Found 5 broken port(s), determining rebuild order
--->  Rebuilding in order
     libgnomeui @2.24.5 +x11
     net-snmp @5.7.2
     webkit-gtk @2.0.4 +video
     gimp2 @2.8.6 +help_browser+python27
     xsane @0.998
--->  Computing dependencies for dbus-glib
--->  Verifying checksums for dbus-glib
Error: org.macports.checksum for port dbus-glib returned: dbus-glib-0.102.tar.gz does not exist in /opt/local/var/macports/distfiles/dbus-glib
Please see the log file for port dbus-glib for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus-glib/dbus-glib/main.log
Error: Unable to upgrade port: 1
Error rebuilding libgnomeui
    while executing
"error "Error rebuilding $portname""
    (procedure "revupgrade_scanandrebuild" line 395)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 93)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5254)

dimanche 20 octobre 2013

Disque dur externe NTFS sous Mac OS X

 Utiliser un disque dur externe NTFS sous Mac OS X

Il existe plusieurs solution. Ayant déjà configuré les macports puisque je développe un peu, j'ai choisi celle ci, qui consiste, une fois installé fuxe4x et ntfs-3g

sudo port update
sudo port install fuse4x ntfs-3g

Fuse4x + NTFS-3G

sauver le fichier :
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig

changer les droits d'exécution sur le script que l'on va créer :
sudo touch /sbin/mount_ntfs
sudo chmod 0755 /sbin/mount_ntfs
sudo chown 0:0 /sbin/mount_ntfs
sudo emacs /sbin/mount_ntfs
  
créer le nouveau script ainsi :
#!/bin/bash
VOLUME_NAME="${@:$#}"
VOLUME_NAME=${VOLUME_NAME#/Volumes/}
USER_ID=501
GROUP_ID=20
TIMEOUT=20
if [ `/usr/bin/stat -f "%u" /dev/console` -eq 0 ]; then
        USERNAME=`/usr/bin/defaults read /library/preferences/com.apple.loginwindow | /usr/bin/grep autoLoginUser | /usr/bin/awk '{ print $3 }' | /usr/bin/sed 's/;//'`
        if [ "$USERNAME" = "" ]; then
                until [ `stat -f "%u" /dev/console` -ne 0 ] || [ $TIMEOUT -eq 0 ]; do
                        sleep 1
                        let TIMEOUT--
                done
                if [ $TIMEOUT -ne 0 ]; then
                        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
                        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
                fi
        else
                USER_ID=`/usr/bin/id -u $USERNAME`
                GROUP_ID=`/usr/bin/id -g $USERNAME`
        fi
else
        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
fi

/opt/local/bin/ntfs-3g \
         -o volname="${VOLUME_NAME}" \
         -o local \
         -o negative_vncache \
         -o auto_xattr \
         -o auto_cache \
         -o noatime \
         -o windows_names \
         -o user_xattr \
         -o inherit \
         -o uid=$USER_ID \
         -o gid=$GROUP_ID \
         -o allow_other \
         "$@" &> /var/log/ntfsmnt.log

exit $?;
 
 
 
Ca fonctionne plutôt bien. Mais vous noterez en particulier le problème posé par ce script en cas de multi-users sur la mac.
 Je n'ai pas encore eu le temps de voir si un `id -u` et `id -g` résolvait la question, mais il y a des chances que ce soit exécuté par root donc ça ne changerait rien ... :-/



Source : Description des autres solutions & original de celle-ci : http://fernandofig.wordpress.com/2011/08/08/ntfs-write-support-on-osx-lion-with-ntfs-3g-f/


Etape d'après : faire la même chose pour mes disques ext4 & ext3.


samedi 11 mai 2013

mac scanner



Perso, j'utilise "xsane" installé via macports.

Il y a une version MacOSX précompilée ici :
http://www.sane-project.org/source.html
Il semble que tu puisses également en installer une version alternative :
http://www.macupdate.com/app/mac/27505/twain-sane

Perso, j'avais déjà installé les macports :
http://www.macports.org/
donc j'ai simplement utlisé la procédure d'installation standard pour ces adaptations de paquets linux pour mac:
ports install xsane

lundi 4 février 2013

Ext4 (non crypté) macosx

 sudo fuse-ext2 /dev/disk2s1 /Volumes/elem/ -o force



Avec :
http://osxfuse.github.com/

samedi 29 décembre 2012

Emacs encoding pb w/ macosx

Using : GNU Emacs 22.1.1 I had a utf-8 file, opened by default in iso-latin-1.
C-x  r utf-8 
(via : https://discussions.apple.com/message/6319077#6319077 )

mercredi 28 novembre 2012

Show full path in Finder

In the Terminal.app (default cmd line in macosx) :
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES 
(Source : http://www.tuaw.com/2008/12/05/terminal-tips-enable-path-view-in-finder/ )