Top

Check Maintenance Scripts On Your Mac

March 15, 2010 by admin · Leave a Comment 

Hey

Sorry for the lack of posts over the last couple of days University has been really busy. Anyway today I am going to take to you about the maintenance scripts that your Mac runs. Every day, week and month your Mac runs a script to keep it healthy and hopefully running. These scripts are quite easy to locate and I am going to take to you about how they run, and if needs be if you need to change the time in which they run.

There are three main scripts that you Mac runs, daily, weekly and monthly. They take care of cleaning out log files, junk files and scratch files. The weekly script takes care of log files which don’t need to be deleted daily. The monthly files runs along the same lines. To check that they have run open up Terminal and type:

ls -al /var/log/*.out

You should see an output similar to the one below.

-rw-r--r--  1 root  wheel  271239 15 Mar 04:30 /var/log/daily.out
-rw-r–r–  1 root  wheel     906  1 Mar 06:50 /var/log/monthly.out
-rw-r–r–  1 root  wheel    4200 13 Mar 06:50 /var/log/weekly.out

If you have found that they haven’t run you can type (again in Terminal) the following:

sudo periodic daily weekly monthly

or

sudo periodic daily

were you can replace daily with weekly or monthly.

Normally these scripts run at round 3:15 in the morning. However if your Mac is shut down or asleep it wont run. So it may be worth changing this time. To do this you need to edit the LaunchDaemon which is responsible for running the scripts. These are located in /System/Library/LaunchDaemons and are called com.apple.periodic-daily.plist, com.apple.periodic-weekly.plist and com.apple.periodic-monthly.plist if you open up the file you will notice there is a couple of lines or specific code, such as the following found in the daily file.

<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>15</integer>

This sets the daily file to run at 3:15am. You could change this file to something like 17:20, so it runs in the evening. I do however have reason to believe that the LaunchDaemon protocol counter only runs when your Mac is awake. So you may find that the script runs at random time and setting the values differently may cause them not to run at all. A solution to this is to keep your Mac awake (using an app such as Caffeine) on the first day of the month and every Saturday.

Hopefully you have understood the way the maintenance scripts work. The only variable in this little experiment is when they run as the LaunchDaemon process doesn’t run off system time, rather its own time. I will try and do a bit more testing in this area over the next couple of days and if I have anything conclusive i’ll update this post.

If you have any questions or comments, please leave one below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Check Maintenance Scripts On Your Mac

Related posts:

  1. MainMenu – Tasks From The MenuBar
  2. Location Of Your Words File
  3. Hide The MenuBar or Dock In Specific Apps

Deleting Firefox Preferences On Your Mac

March 12, 2010 by admin · Leave a Comment 

Hey

If you have ever played around with the preferences setting in Firefox (by typing about:config into the address bar), you may find out that you can quickly and easily add them to the list. Deleting them, however seems to be a lot harder. Basic commands such as pressing delete (or any such combination) don’t seem to work, neither is a delete menu present. To combat this you have to go down a different route. Since the preference options are simply saved in a file, we can edit this file and adjust the results as needed. You may need to delete preferences if you know (for certain) that something is wrong, or you have added an incorrect preference file and want to remove it. Most incorrect preference files usually get removed after a while, however its worth making sure.

To delete the preference file open up Finder and find the following path:

/Users/[name]/Library/Application Support/Firefox/Profiles/[random letters].default

This stores a lot of your preferences and related files that Firefox uses. Within this list find a file called “pref.js” and open it in TextEdit or your favourite text editor.

Within this file you will find all of the user preferences that you set (not ones by the application itself, these are stored elsewhere). They take the format of:

user_pref(”preference.name”, value);

Look through the list and find the preference file you have added. To remove it, simply remove the line that the preference occupies. Save the file and restart Firefox. The changes should take effect and not be present when you type about:config in the address bar.

Its a simple tip, however I have used it once or twice when I want to delete a preference that I have added. If you have any more Firefox tips, please leave a comment below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Deleting Firefox Preferences On Your Mac

Related posts:

  1. Hidden Firefox Settings
  2. Deleting Custom Made Services
  3. Deleting Big Unused Files To Save Disk Space

Changing Mail’s Copy Address Behaviour

March 6, 2010 by admin · Leave a Comment 

Hey

This is a quick post about Mail. If you have ever copied an email address from any address field you will realise that if comes in the format of Name <email>. Although these two parts are quite useful in certain situations, it may be more useful to change the format so you just get the email address. This way you can copy and paste it anywhere without the need to do any special formatting.

To change Mail’s copy format, open up Terminal and copy and paste the following.

defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO

Restart Mail, and test to see if the command worked. Simply copy any address. Instead of being the name and email, only the email address will be present. I find this far more useful, especially when I need the address in certain situations.

To revert the process copy and paste the following into to Terminal.

defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool YES

Restart Mail again, and the format should be back to normal.

A simple tip, however I think it is very useful. If you have anything similar please leave a comment below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Changing Mail’s Copy Address Behaviour

Related posts:

  1. Changing Your MAC Address (Wireless)
  2. Disable Data Detectors In Mail
  3. Address Book Tips

Find The Location Of Recent Items

March 2, 2010 by admin · Leave a Comment 

Hey

This is a quick tip that I would like to share with you. Its a handy short cut that can add a little bit more functionality to the recent items menu under the Apple menu item. If you have used this function before, every time you click on any of the items in the list it will load the item. For instance if you click on an application in the list, it will start the app, click on a file and the file will load and so on. If you press the Command key with this menu open, it will alter the menu state so it will take you to the menu item. This means when you click on the menu item a Finder window will open instead showing you the location of the recent item.

recent items

This can be useful if you want to open the containing folder of the item rather than loading it again. I use this option if a file loads and I can’t remember the original source.

There are hundreds of little tricks like this within the Mac operating system. Go around menu items and press Command, Control and Shift keys and see what happens. If you have any similar tricks, please leave a comment below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Find The Location Of Recent Items

Related posts:

  1. How To Use Login Items
  2. Change Recent Saved Places In Open/Save Windows
  3. Location Of Your Words File

Tracking Down System and Hidden Login Items

March 1, 2010 by admin · Leave a Comment 

Hey

This post is going to be a continuation of a couple of old posts I wrote a while ago, How To Use Login Items and Speeding Up Login. They featured some basic and simple ways to remove login items. This post is based off one by OS X Daily, that found some of the other areas on your disk that contain the applications and preferences. I’m going to add a little bit of background to each of the folders (the preference files folder in particular), new users may end up deleting an important files located in the folders, and we don’t want that.

The first port of call is to check your System Preferences for login items. Before you go fiddling through all of these folders go to System Preferences > Accounts > [name] > Login Items. Check through that list and delete any applications you don’t want to run on start up. It may be basic but it is always worth checking.

System Folders

There are two locations where start up items can be located, the first is within the System files located on your hard drive, the second being in your User folder. The first set of files is located in /Library/StartUpItems, these files are used on start up when your computer is in boot. If you know there is a file or folder you want to remove since it is causing your trouble, delete it. Better still move it to a safe location and then restart to make sure the changes don’t do anything damaging. File located in this folder will more than likely be an application in one form or another.

The next step to check is /Library/LaunchDaemons, these are plist or preference files. They are essentially links to other preference files and applications. These files run on start up. To remove them from start up either delete them or move them to a different folder. If you don’t know what they do leave them be. Most of the time it is better to delete a file and then test it with a restart to make sure you haven’t broken anything. Preference files can be slightly difficult to understand however they tend to be formatted in the following way:

com.developer.program.plist

If you want to find out more, either google the program name and the developer to see which application it belongs to. More often than not it will be a defunct file which has been left, and it can be pretty safe to delete it. All of these files will be third party apps and not ones supplied by Apple.

Within the Library folder there is a second folder which contains a list of plist files. This is located in /Library/LaunchAgents, similar to the LaunchDaemons, these are plist files. Instead of running at startup, these run during login. These files apply to all users when they login.

We can now move on, this time into the System folder. First go to /System/Library/LaunchDaemons. This is another folder that contains preference files, however this folder contains a lot of system files. These launch daemons run at start up, so its probably not a good idea to delete any of them, as you may find your computer may not work on start up. Only go into this folder if you know there is an application which is causing you trouble.

Similar to the Library folder there is also a LaunchAgents folder. This is under /System/Library/LaunchAgents, these are system items that run on login. Similar to the the System LaunchAgents there probably wont be anything in this folder worth checking out, however if you have a problematic application that messes about on login you can probably trace it back from this folder.

User Folders

The majority of launch items are in the Library and System folder as mentioned, however these is one in a User folder. Go to /Users/[name]/Library/LaunchAgents. There shouldn’t be many items in this folder, these are login items specific to that user when they login. So if one problem occurs when only one user logs in an not another, the problem may be found in this folder.

Conclusion

Hopefully you have understood all of the specific folders that contain login and start up item. If you are confused there is a simple rule to remember. LaunchAgents are when a user logs in, file can be global (for all users) or specific users. LaunchDaemons are when your Mac starts up as a result there is no specific folder for users. Within these type types there is also system and application folders. Third party applications are found in the Library folder, and System items are found under System/Library. Most of the time third part files are found in the library folder only.

It can be quite complicated to find the correct location for a file. However look through all of the folders and see if you can find the required folder. Then either delete the file or move it, before testing the result.

If you have any questions or comments, please leave one below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Tracking Down System and Hidden Login Items

Related posts:

  1. How To Use Login Items
  2. Editing Startup Items On Your Mac
  3. Speeding Up Login

Installing Xcode

February 25, 2010 by admin · Leave a Comment 

Good Evening,

Today’s post is going to show you how to install Xcode. This post is for people who are new to the Mac and want to try there hand at programming. The Xcode developer tools allow anyone to create Mac applications (as well as other cool stuff). I have recently begun learning the application and how to program for Mac over the last couple of weeks, as a result it seemed a good post. Xcode isn’t normally found on your Mac, so people who don’t know how to install it may find the process a little confusing.

The first step in installing Xcode is to have the binary files. The most common (and quickest) way to do this is to pop your installation disk into the slot drive and allow it to load. The second method is to head over the the Apple developer website and download it from there. You do have to sign up on the Apple website and the download is quite large. It is quicker to find your installation disk and run it from there. When you Mac loads the disk, select Optional Installs the from list.

Throughout this tutorial I will be running it from the install disk that comes with your Mac. The download process may slightly differ in steps.

x code install 1

Within the Optional Installs folder select Xcode. The other package in the list allows you to reinstall apps such as iCal and Mail to name a few, it also has language files and printer drivers to select. This is useful if you ever need to reinstall anything.

xcode choose package

As you run through the installation you will eventually be greeted with the options to install different parts of Xcode. The essential package is always needed, however system tools, UNIX support, documentation and Mac OS X 10.4 support is optional. I recommend you install the documentation and system tools, both of these are quite useful especially the system tools option. The UNIX dev support is only need if you want to play around with some high level stuff. For more information read the little description box. If you ever find your need some of the products in the list you can always insert your CD again and reinstall the missing apps.

xcode chose package

The installation process will then run. Depending on the speed of your DVD drive this will take about 30 minutes. Unless you choose otherwise the files will be places in /Developer, the root of your drive. I recommend this spot since it is in an easy location to remember and seems to come recommend by Apple. You can chose to install it in other locations, just select the option when it appears.

xcode install successful

When everything is done Xcode will be installed. The installation processes brings across a lot of other files, most of which you will never need. However as you develop your applications you may find they become useful. The majority of the cool stuff is in Applications (where the main programs are installed) and in Library. Take a look around to see all of the new shiny programs.

developer tools finder

When you are done your can begin writing your applications and using cool Mac technologies such as Quartz Composer. If you need a little help I recommend searching the web, as well as visiting CocoaLab, is always a good start as they have a cool eBook you can download. If you want an actual book to read, Xcode 3 Unleashed comes recommended and one of my readers enjoys Learn Xcode. I am currently reading (and will eventually be reviewing) Beginning Mac Programming, so I stay tuned.

If you have any comments or questions please leave a comment below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Installing Xcode

Related posts:

  1. Introduction To Xcode – A Newbies Resource
  2. Installing PHP To Run With Your Web Server
  3. Installing Windows Games With CrossOver Games

Compressing PDF Files In Preview

February 23, 2010 by admin · Leave a Comment 

Hey

Every so often I have PDF files, or have created a PDF file, and it needs slimming down a bit. For a long while I had no idea how to do this and would, for the most part, be stuck with a large PDF file that was always difficult to transfer. After a little digging into Preview I stumbled across two options which allow you to shrink the size of a PDF. Most of the time these two methods may not produce useful result, they may be as tiny as possible. However if you have used a program which isn’t designed for PDF (Word for some reason springs to mind) this trick might be useful. There are two options which you can use, both offer different results.

Both of the compression options are found in the Save As menu. First find a large PDF file that you want to shrink, any will do for this example. Go to File > Save As. In the save box there will be two drop down items. The second one is what we are interested in, Quartz Filter. From the drop down menu select none. This may be counter intuitive at first, however it allows the PDF engine to run and reduce any parts that it can. It doesn’t run any other filters. For the most part on an uncompressed PDF this will produce pleasing results. The image below show the drop down box on the Save As menu.

reduce pdf

The option of having no Quartz Filter for the most part is sufficient. This can reduce the file size. This option is known as loss less, so it wont remove anything at all and keep things in high quality. This is needed for PDF’s with images. However for PDF’s with only text or simple geometric shapes to may be better to reduce the file size even more.

To apply a reduction in quality (however it still stays pretty good) in the drop down select “Reduce File Size”, I never notice it at first. This option will crunch images and remove parts of the PDF that are not needed, in a similar method of a jpeg images. There are slight problems with this method. Images turn out horrible and lose all quality. However for text and simple bands of colour it is perfect, and the reduction in file size can be massive.

Hopefully these two option apply to you. The first one, for the most part, doesn’t produce any decent results (one files size was larger) if the original PDF is made in Preview. However the second option always reduces the files size, usually by half.

If you have any other PDF compression tips, please leave a comment below.

Want to catch up on the latest Tweets about this site, join the MacTricksAndTips Tweet RSS Feed.

Compressing PDF Files In Preview

Related posts:

  1. Joining PDF Files Together In Preview
  2. Disabling Default Auto-Rotate & Scale In Preview
  3. Quick Preview Search Tips

Next Page »

Bottom