Latest Lion update broke a simple Geeklet osascript that used System Events to lookup of Background picture names.  Running the associated command from the terminal returns the same name, every time, even though the picture is changing every minute.  The code below worked for the primary display on my two headed Mac until this last update:  osascript -e 'tell application "System Events" to get value of (property list item "LastName" of property list item "default" of property list item "Background" of property list file ((path to preferences as Unicode text) &amp; "com.apple.desktop.plist"))'   The secondary display has a hard-coded id where "default" goes;  I've used the numeric IDs, everything I can think of.  What is particularly annoying is a dump using just 'property list item "Background' in the above script shows the new file names with the appropriate "LastName".  But running the script above always returns the same two names, the initial files shown in the Desktop/Screen Saver preferences.  I'm not an AppleScript or System Events/plist guru, and any help would be appreciated.  --UPDATE--   and some experimentation with the "defaults" command led to the following (less than ideal due to the embedded ids, but...) workaround:  osascript -e 'tell application "System Events" to get value of (property list item "LastName" of property list item "722492885" of property list item "" of property list item "spaces" of property list item "Background" of property list file ((path to preferences as Unicode text) &amp;amp; "com.apple.desktop.plist"))'   I'm certainly open to more elegant solutions but they must reflect the changing filename with "Random" set in Desktop Preferences.  I'd even like to see a more readable version of what is posted above - all one line.  I'm sure there's better ways to lay this out!
101818
Where does OS X store your current desktop picture? I read somewhere else that it was in /Library/Caches/com.apple.Desktop. But I don't have that directory.
120787
I know that a similar question has been asked in:        although I didn't really understand the answer and couldn't really make it work.  However, I have tried something different. I decided to read the manual page for ls and it mentions different environment variables that can be set when dealing with the ls command. If one goes to the -G option it says to look at the CLICOLOR environment variables. I did and that one links you to documentation for the LSCOLORS environment variable. I went to it and it mentions:     "The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color. "   It also mentions that the default value of LSCOLORS is "exfxcxdxbxegedabagacad" and that each part specifies the color of some specific thing in the ls command. For example, the first pair ex in example specifies the color of directories. the second fx the color of symbolic links etc... e means blue and x means default "foreground".  1) First what does this mean: "when colors are enabled with CLICOLOR"?  2) What does "foreground" mean?  What must environment variables be for the ls command to color the output however I desire?    I also tried:  ls --color   But it threw me the following error:  ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]   The same error happened when I did ls --color=auto: it alone also throws an error. I have no idea why, and am not sure if it was due to iTerm2 or OS X or why that happened. It seems it works on other systems...
17320
My computer name in System Preferences &gt; Sharing is set to &quot;archos&quot;, but is showing as &quot;iphone&quot; on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?
23846
I am trying to create a script that will allow me to generate a list and store it in the blend file. The list starts out blank and then strings get added to the list, resulting in: [&quot;test1&quot;,&quot;test2&quot;,&quot;test3&quot;] I create a PropertyGroup Class for the enum, define a new scene property as a CollectionProperty type with access to that enum Class, before appending a new item into the enum: import bpy  class item_set(bpy.types.PropertyGroup):     myItems = []     enums = bpy.props.EnumProperty(name=&quot;My Items&quot;, items=myItems) bpy.utils.register_class(item_set)  bpy.types.Scene.myItemSet = bpy.props.CollectionProperty(type=item_set)      newItem = bpy.context.scene.myItemSet.add() newItem.myItems.append(&quot;test&quot;)    I need to be able to add items to the list, save the blend file, re-open the file, run the script again and retrieve the list from the scene. However, the  states:  One thing to keep in mind is that after saving and reloading your blend-file, your new property will have disappeared...    ...To make the values you assigned in a previous session available again, you need to redefine the property. So after reopening the blend-file you need to rerun: bpy.types.Object.myProperty = bpy.props.StringProperty()   I can do the appending into and retrieval of the property values absolutely fine upon an initial run, but as the documentation states, the property is unavailable when trying to view it's contents on a reload of the file (after having run the script, saved and re-opened the file), but I am unsure how to redefine it without clearing all it's values. If I redefined the scene property, it would presumably also need the enum Class to be available, which would currently set myItems back to [] (empty). Do I need to change the way I am initially setting the items in the class or am I on entirely the wrong track with all of this? All I need to do is store a list in the blend file, so if there is a better way please let me know. Thanks. (I would hope, eventually, to be able to store sub lists [[&quot;a&quot;,&quot;b&quot;],[&quot;c&quot;,&quot;d&quot;],[&quot;e&quot;,&quot;f&quot;]], I'm just trying to get normal lists to work first.)
43318
Update: The link below does not have a complete answer. Having to set the path or variable in two places (one for GUI and one for shell) is lame.  Not Duplicate of:     Coming from a Windows background where it's very easy to set and modify environment variables (just go to System Properties > Advanced > Environment Variables), it does not seem to be that straight forward on Mac OS 10.5. Most references say I should update /etc/profile or ~/.profile. Are those the equivalent of System Variables and User Variables? For example, where should I set my JAVA_HOME variable?    EDIT:  I want to be able to access the variable from the terminal as well as an app like Eclipse. Also, I hope I don't have to restart/logout to make this take effect.
14159
What's wrong: I hit CMD+SPACE to open up spotlight, typically type in the name of the application I want to start, hit enter and either the wrong app or no app at all will start, because the app name is missing the first character. "Learn to type" I hear you say but wait: as I enter the first character in the search bar, the cursor jumps to the beginning of the line and my second character input overrides the first one. So entering for example "ever", in order to start Evernote, will result in "ver". "php" to start PHPStorm will result in "hp" and start my damn HP printer app and so on.   This cursor jump to the beginning of the line will not happen in any other application and even if I accept the fact that my cursor jumps from time to time, I don't get why the second character overrides the first one. I'm not even sure if you can configure your Mac to always override the character at current position, but I surely haven't.  So this keeps on happening quite regularly and I cannot reproduce it. It just happens and when I try it again (close Spotlight, CMD+SHIFT again), it won't happen again, even if I give it like 5 tries or so.  It won't kill me but I am a software developer myself and this kind of bugs just leave me frustrated plus I can not imagine that this is the desired behavior. I have seen some talk about this issue on the internet but I did not come across a solution..  I have 3 MacBooks, different ages, all with German keyboard layouts and German set as system language and they all do this. Just mentioning this, because after that fact, I can barely imagine this isn't affecting at least a lot, if not all, MacBook (Pro?) users.   13" Pro 2010 or so 15" Pro Retina 2013 13" Pro Retina 2015   They all run El Capitan but I already encountered this before. I don't know the OS X version I had installed when I first stumbled across it.
69008
I want to know all keys (property list) which available on certain domain application, as example I could list available key for com.apple.dock by entering this command:  $ defaults read com.apple.dock   but somehow the output of this command only showed the active property list key, and yet not all available key for com.apple.dock listed there.  Anyone can help me on this?
84252
I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write.  Is there a built-in command or a third-party library I can use from either an AppleScript or shell script?  Ideally the type and icon of the notification could be controlled, but even just the ability to trigger a basic banner with a stock icon (but custom text) would be appreciated.
100483
I'm trying to register a custom protocol to an application on the Mac, i.e:   User clicks on link with "abcdef://some/url/here" An installed application is launched with the above string passed as the first param   I've done this successfully on Windows using the information from this question:    I would prefer to find something that is browser-independent, in other words at the OS level. I would also like to automate this registration through a shell script, so hopefully there is a way to do this that doesn't involve the GUI.  Thanks!
67062
In Windows it is possible to right-click on a file. Then select "properties". In "properties" the file-system path is shown. Can then be copied by marking and storing (into the clipboard).  I couldn't figure out a way to do that in Mac.   Therefore my question:  Can I retrieve the file-system path of a directory or file via the GUI of the Mac Finder?
47887
On X Windows I had a cool 'silent-alarm" reminder script that would change my root window (background) color to solid red, just for a few seconds a few moments before changing it back. Is there a way to do this for Windows XP?  I'm thinking some kind of scheduled task that uses cscript to set registry keys (HKEY_CURRENT_USER\Control Panel\Desktop) . However my attempts don't seem to have any effect. What do I have to signal to read those registry entries and re-draw the desktop?
4184
I just updated to macOS Mojave, and immediately noticed a couple of things:   My custom login screen wallpaper is gone. When you click on a user's name in the login screen, it switches to their personal background (their usual wallpaper for the first space on the primary monitor).   I assumed it had just overwritten my cached image file. But when I went to replace it, nothing happened. It turns out that com.apple.desktop.admin.png is gone entirely!    Right after taking that screenshot, I decided to poke into Desktop Pictures and found my personal login screen background, which looks promising. It contains one other folder, which  probably  (edit: confirmed) contains the login screen background of my administrator account.
67209
Recieved the error:  'Your screenshot could not be saved. You don't have permission to save files in the location where screenshots are stored.' with OS X Yosemite.  I opened terminal and tried directing the screenshots to save on my desktop:  Brigittes-Air:~ eggsalad$ defaults read com.apple.screencapture location 2017-01-06 03:04:47.765 defaults[17729:1947540]  The domain/default pair of (com.apple.screencapture, location) does not exist  So I tried writing and:  Brigittes-Air:~ eggsalad$ defaults write com.apple.screencapture location ~/Desktop 2017-01-06 03:05:08.652 defaults[17742:1948451] Could not write domain com.apple.screencapture; exiting  I'm not sure where the screenshots are being stored if the location does not exist. Ideas?  EDIT  I ran something else and got a different response, but defaults are still unchanged.   Brigittes-Air:~ eggsalad$ defaults write com.apple.screencapture location/Users/eggsalad/Desktop killall SystemUIServer  2017-01-06 03:22:35.444 defaults[18265:2001767] Unexpected argument SystemUIServer; leaving defaults unchanged.  2nd EDIT  Result of:  ls -l ~/Library/Preferences/com.apple.screencapture.plist  was:   ls: /Users/eggsalad/Library/Preferences/com.apple.screencapture.plist: No such file or directory
111946
For a presentation I am making, I want to find my Mac's system's default "Spinning Wait Cursor" resources.  I was  that  are in here:     /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HiServices.framework/Versions/A/Resources/cursors  and :     /System/Library/Frameworks/WebKit.framework/Versions/Current/Frameworks/WebCore.framework/Resources/  Indeed, one can find some large and vectorized versions of most cursors in the first folder, and some other, smaller ones in the second.  But, there seems to be no beach ball in there.   I know one can find the graphics in high resolution online easily, but for my project I would need to get the original system files.  A screenshot or animated screenshot also wouldn't be what I'm looking for. I couldn't find the info anywhere.  Note 1: From the GUI, a user can see the spinning wait cursor in various different sizes depending on the settings in System Preferences > Accessibility > Display > Cursor size, and then proceeding to crash their computer.  Note2: I am not trying to change my OS' appearance.  Can anyone help me find where the resource is?  Is it ?
113339
I'm new to Mac usage.  It seems that most commands trip over options given after the file names. In linux, which I've used for years, it doesn't matter.  On Apple, it does.  Is there some setting somewhere or some hack to make commands like ls behave "normal"?  dwilson 0====&gt; ls -l p* -rw-r--r--@ 1 dwilson  owner  184 Jul 29 13:57 poo.c -rw-r--r--@ 1 dwilson  owner  133 Jul 29 13:57 poo.h  dwilson 0====&gt; ls p* -l ls: -l: No such file or directory poo.c        poo.h  dwilson 1====&gt;
111777
When I try to load a LaunchAgent plist from launchctl I can't find out how to run a script in the home directory.  My code is:  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt;     &lt;key&gt;ProgramArguments&lt;/key&gt;     &lt;array&gt;         &lt;string&gt;bash&lt;/string&gt;         &lt;string&gt;~/script.sh&lt;/string&gt;     &lt;/array&gt;     &lt;key&gt;RunAtLoad&lt;/key&gt;     &lt;true/&gt;     &lt;key&gt;Label&lt;/key&gt;     &lt;string&gt;com.tyilo.test&lt;/string&gt; &lt;/dict&gt; &lt;/plist&gt;   I have tried both with and without bash and also replacing ~ with $HOME. I have also tried using bash -c without it working.  The error code is:   `com.tyilo.test: bash: ~/script.sh: No such file or directory`
54495
We are trying to have a simple drive mapping script start up for ALL users on a Mac Mini. What's the simplest way of going by doing this? I've tried creating a .plist in Lingon and adding it to the Library LauncherDaemons and LauncherAgents folders, but it's not starting up. Any ideas? Is there a way to do this in the Terminal? The script by itself works fine and works if we add it to the Startup Items in System Preferences, but we want this to be automatic and for all users.  Thanks.