Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

9.08.2009

Mac OSX: Changing Login Screen Desktop Picture

It would look odd whenever you lock your screen (showing Login Window) it will show the default desktop picture instead of your customized desktop picture. To change the default desktop picture, you will need to know where your picture is stored. Open the terminal from Application>Utilities and type the following:

  • cd /System/Library/CoreServices
  • sudo mv DefaultDesktop.jpg DefaultDesktop_original.jpg
  • sudo cp Path/image.jpg DefaultDesktop.jpg
Thats it! you've just renamed the original desktop picture used in Login Windows to DefaultDesktop_original.jpg and copied your image from Path\image.jpg as DefaultDesktop.jpg. Have fun!

8.21.2009

Mac OSX: Create ISO CD/DVD image (.iso)

So I tried searching around but couldn't find a clear solution on this. I had to retrieve bits by bits and visit some forums which takes time. Anyhow, without further ado, here are the steps in creating an ISO CD/DVD image from OS X using Terminal app so you won't need any additional third party software. The steps are as the following:


Open Terminal.app from Utilities folder under the application, then you will need to see where your dvd/cd is under (usually it is in /dev/disk1) by typing:
drutil status

From there find the word "Name" which represents the accessible directory.

Unmount the disk to ensure that the disk is not locked by the OS so you can create a perfect duplication of the disk by typing:
diskutil unmountDisk /dev/disk1

Then, create the ISO file by typing the following:
dd if=/dev/disk1 of=nameOfDisk.iso bs=2048

Wait while the disk is being duplicated as nameOfDisk.iso is being created. Not that this copies exactly the disk you are duplicating so it can also be bootable.

That it! Good luck!

6.10.2009

Mac OSX: Performing Maintenance

In Mac OSX, maintenance are performed regularly to keep your system always at its peak performance. Since these maintenance scripts are usually run at specific time, most of the time these maintenance are missed or skipped which leads to degradation of performance of your system.

To perform the maintenance tasks (all daily, weekly and monthly routine at once) in case you missed some open the Terminal app, and type:

sudo periodic daily weekly monthly

and let the maintenance script run, it may take a while but the performance of your system may increase significantly for some whenever they miss the maintenance schedule.

Below are some explanation of each maintenance script:

(Taken from http://www.thexlab.com/faqs/maintscripts.html)

Each maintenance script — daily, weekly, and monthly — has a specific function. Their functions have varied over different versions of Mac OS X.

  • The daily script removes old log files, "scratch" and "junk" files, backs-up the NetInfo database (Mac OS X 10.4 Tiger® and earlier), reports a variety of system and network statistics, and rotates the system.log file. Under Tiger, the daily script also cleans up scratch fax files and prunes asl.log, the log file for the then-new Apple System Loggingfacility. Under Mac OS X 10.5 Leopard®, the daily script also prunes the asl.db file that replaced the asl.log file for Apple System Logging.
  • The output from the daily script is written to the /var/log/daily.out file, which can be viewed in Console.
  • By default, the daily script is scheduled to run daily at 03:15 hours local time.
  • The weekly script rebuilds the locate and whatis databases. Depending on the version of Mac OS X, it also rotates the following log files: ftp.log, lookupd.log, lpr.log,mail.log, netinfo.log, ipfw.log, ppp.log, and secure.log
  • The output from the weekly script is written to the /var/log/weekly.out file, which can be viewed in Console.
  • By default, the weekly script is scheduled to run every Saturday at a specific time. UnderTiger and later, it runs at 03:15 hours local time. Under Mac OS X 10.3 Panther® and Mac OS X 10.2 Jaguar it runs at 04:30 hours local time.
    • The monthly script reports per-user usage accounting and rotates — depending on the version of Mac OS X — the wtmp, install.log, and cu.modem.log files.
    • The output from the monthly script is written to the /var/log/monthly.out file, which can be viewed in Console.
    • By default, the monthly script is scheduled to run on the first of the month at 05:30 hours local time.

    5.18.2009

    Mac OSX: Leopard 10.5 Enable Root User

    For Mac users especially for UNIX savvy, enabling root user is essential. This will allow better management of your system and have a separate password whenever you run "sudo" in terminal or X11 app.

    To enable root user in Leopard go to Application>Utilities>Directory Utility from there go to Edit>Enable Root User which will then prompt you with a new password to enter. Once completed, now running "sudo" or "su" will work only with the given password. Have fun!