terminal

Latest

  • Terminal Tips: Stop Safari "saved text" dialogs

    by 
    Cory Bohon
    Cory Bohon
    09.09.2008

    We're continuing with Safari hacks for today's Terminal Tip. Have you ever typed text on a web page, but then realized that you want to go to another page without saving your input? However, when you close the window or tab, Safari rudely tells you that you have saved text and if you navigate away, your changes will not be saved. While these dialogs can be useful, most of the time they're annoying. If you want to get rid of them, just type in this Terminal (/Applications/Utilities/) command and press enter: defaults write com.apple.Safari DebugConfirmTossingUnsubmittedFormText NOYou will no longer see the dialog when you have typed text on a page and want to navigate away. To reverse the command, replace "NO" with "YES." Want more tips and tricks like this? Visit TUAW's Mac 101 and Terminal Tips sections.

  • Terminal Tips: Force Safari to open all links in new tab

    by 
    Cory Bohon
    Cory Bohon
    09.08.2008

    Firefox users have been able to open all links clicked within Firefox in a new tab for a while now, but what about us poor Safari users? Well, sure, you could always hold down command while clicking a link, but that's not fun, now is it? With this simple Terminal hack, you will be surfing like a pro! Just open Terminal (/Applications/Utilities/) and type in the following command: defaults write com.apple.Safari TargetedClicksCreateTabs -bool true Once you restart Safari, all clicked links will open in a new tab. If you want to reverse the command for some reason, just replace "true" with "false." Want more tips and tricks like this? Visit TUAW's Mac 101 and Terminal Tips sections.

  • Terminal Tips: Change Safari's history limit

    by 
    Cory Bohon
    Cory Bohon
    09.04.2008

    Are you tired of not being able to see all of your browsing history in Safari? Well, with this Terminal hack, you can easily change how many items (or how many days) Safari shows in the History menu. To do this, just open Terminal (/Applications/Utilities/Terminal) and type in one of the following commands: Limit to number of items: defaults write com.apple.Safari WebKitHistoryItemLimit 2000 Limit to number of days: defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30 You can you can also use both commands to get both a day and an item limit. Want more tips and tricks like this? Visit TUAW's Terminal Tips and Mac 101 sections.

  • Terminal Tips: Force email to be plain text

    by 
    Cory Bohon
    Cory Bohon
    09.03.2008

    There are some people that like the sleekness of HTML email, then there are those that appreciate the simplicity of plain text email (no images or styled text, thanks very much). If you use Mail.app and want it to force all incoming email to display as plain text, then open Terminal (Applications > Utilities) and type in the following command: defaults write com.apple.mail PreferPlainText -bool TRUENow when you receive an email, Mail.app will only show you the plain text of the message. To reverse this command, just replace "TRUE" with "FALSE." Like this tip? Visit TUAW's Mac 101 and Terminal Tips sections for more.

  • Terminal Tips: Disable annoying application crash dialogs

    by 
    Cory Bohon
    Cory Bohon
    08.28.2008

    Don't you hate it when an application becomes unresponsive and crashes? Are you even more tired of reading annoying application crash dialog boxes? A simple Terminal hack allows you to never see these dialogs again. Just open Terminal (Applications > Utilities) and type: defaults write com.apple.CrashReporter DialogType noneThis will disable the "...unexpectedly quit" dialog that normally appears when an application crashes. If you ever want the dialogs to start appearing again, just replace "none" with "prompt".Like tips like these? Try out TUAW's Mac 101 and Terminal Tips sections.

  • Terminal Tips: Make your Screensaver a desktop background

    by 
    Cory Bohon
    Cory Bohon
    08.25.2008

    Have you ever wanted your screen saver to appear as a background image? Probably not. But if you like to show off to your Windows-using friends, then this tip can definitely help you out. By typing the following command into Terminal (Applications > Utilities), all on one line, and hitting enter, you will instantly see your screen saver displayed as a desktop background:/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -backgroundTo get things back to normal (which you probably will want to do, as many screensavers will put undue load on your processor), either close the Terminal window, press control + C, or restart your computer. If you are running Leopard and have the clock overlay active, it will appear above all windows, which can get a little annoying.Want more tips and tricks like this? Visit TUAW's Mac 101 and Terminal Tips sections.

  • Terminal Tips: Make hidden Dock icons transparent

    by 
    Cory Bohon
    Cory Bohon
    08.22.2008

    Without using Exposé, it is hard to tell which Mac OS X applications are hidden and which aren't. But, with a simple Terminal hack, you can have all your application icons displayed as transparent. Simply open Terminal.app (Applications > Utilities) and type the following command exactly: defaults write com.apple.Dock showhidden -bool YESOnce you type the command and press enter, you need to restart the Dock by typing "killall Dock" and pressing enter. Once the Dock restarts and you hide applications, you will notice that hidden applications have a transparent look. If you want to reverse the command, just replace the "YES" with a "NO" and restart the Dock again. Like these tips and tricks? Why not take a look at TUAW's Mac 101 and Terminal Tips category.

  • Terminal Tips: Disable Dashboard

    by 
    Cory Bohon
    Cory Bohon
    08.21.2008

    If you are the type of person that sees Dashboard as an application that just wastes space in your Dock (and an icon on your keyboard), then why not disable it? It is very easy to disable Dashboard; just type in the following command in Terminal.app (Applications > Utilities): defaults write com.apple.dashboard mcx-disabled -boolean YESYou must restart the Dock in order for this hack to work, so type "killall Dock" into Terminal and press enter -- the Dock should restart. To enable Dashboard again, just type in the above command, replacing "YES" at the end with a "NO." Now when you try to launch Dashboard, nothing will happen; this will save you some system resources. If you found this tip useful, take a look at TUAW's Mac 101 and Terminal Tips sections.

  • Terminal Tip: Add scroll arrows to both ends of scroll bar

    by 
    Cory Bohon
    Cory Bohon
    08.20.2008

    Have you been paging through a document and wished that the scroll arrows were at both ends of the scroll bar? With a simple Terminal hack, you can have it your way. Just open Terminal.app (Applications > Utilities) and type in the following command: defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth You will need to restart your Mac to see the changes. If you want to change the scroll bars back to the normal way, just open the Appearance System Preference pane and select "Together" from the "Place scroll arrows section." For more tips and tricks like this, visit TUAW's Terminal Tips and Mac 101 sections.

  • TUAW Tip: Freshening Up 'Recommended Applications'

    by 
    Robert Palmer
    Robert Palmer
    08.19.2008

    Reader Julius wrote in with an annoying problem: Whenever he tries to open a file by selecting "Other" from the "Open With" contextual menu item in the Finder, he's presented with a list of "Recommended Applications" that (more often than not) has the app he wants grayed out. Ideally, there would be some preference to automatically show "All Applications" instead of just "Recommended Applications," but that doesn't seem to be the case. Sorry. The best option for you comes from our own Erica Sadun, who says to drag the file onto any application icon with the Command and Option keys held down. That way, the Finder will force the app to open the file. This works with items in your dock, or just with an open Applications folder in the Finder. Otherwise, every application maintains a list of the kinds of files it can open. Launch Services, a part of the Mac OS X system, reads these lists, and compiles the set of "Recommended Applications" that you are presented with. As such, many users recommend keeping your Launch Services tidy by rebuilding it using the Terminal, or a utility like RCDefaultApp. It will at least remove the cruft from your list of available applications. Thanks and good luck, Julius!

  • Terminal Tip: Stop disk image verification

    by 
    Cory Bohon
    Cory Bohon
    08.18.2008

    Sure, we've all wanted to stop the pesky "Disk Image Verification" process that starts when you want to open that .iso, .dmg, or other disk image. While this process is a precaution against possibly installing/using corrupt files, sometimes it is completely unnecessary. To stop disk image verification forever, just open Terminal and type: defaults write com.apple.frameworks.diskimages skip-verify TRUEIf you want verification enabled again, type the same command, replacing the "TRUE" with "FALSE." While verification is off, we recommend only using disk images from trusted sources.

  • Terminal Tip: Burning a disc

    by 
    Cory Bohon
    Cory Bohon
    08.12.2008

    Are you a Terminal geek (or wannabe, but not the pop star type)? If so, did you know that you can burn discs right from the Terminal window with a simple command and a drag/drop? Just enter the following command followed by the path to a folder or disk image: drutil burn filehere Don't type the "filehere" -- that's where you put the path to the file/folder that you wish to burn. You can either type the location manually or drag and drop the file onto the Terminal window. But that's not all you can do with drutil; you can also eject media from the optical drive by typing "drutil eject." To see all of the available drutil options, just type in drutil for a quick list or man drutil for a full description.

  • pTerm released, update due soon

    by 
    Giles Turnbull
    Giles Turnbull
    08.08.2008

    Newly arrived in the App Store is pTerm, an iPhone port of the PuTTY terminal emulator. It supports SSH and Telnet, among other things, and has a built-in Control key. But developer Eric Maland has been in touch with us to say that a 1.1 update is already on its way (it has been submitted to Apple and is awaiting approval). Unfortunately a handful of "major crashy bugs" (as Eric puts it) were discovered after the 1.0 release had been submitted. Planned features for future releases include multiple simultaneous connections, custom sizes and colors, port forwarding and lots more. Details on the pTerm home page. And in the meantime, if you download and experience crashy behavior, Eric's message is: be patient. The fixes are done, but when they reach the Store is out of his hands. pTerm is $4.99US in the US App Store (We haven't seen it in the UK store).

  • TUAW Tip: Highlight items in gridded stacks

    by 
    Giles Turnbull
    Giles Turnbull
    07.17.2008

    The Dock's Stacks feature lets Leopard users view a folder's worth of stuff with one click. You'll either love it or hate it, use it or not. If you do use it, here's a little tip that improves it slightly (in my opinion).When you've got a bunch of files from a Stack displayed in Grid View, it can be hard to spot the particular one you're looking for, especially if many of them look identical (such a collection of text files or word processor documents). Luckily, there's a highlight you can switch on, that puts a whiter background around the file you're mousing over. It makes it slightly easier to ensure you click on the correct file.The highlight appears normally if you use the arrow keys to move around a Grid, or if you type Command and the first letter of one of the files displayed. But this trick switches it on permanently, so that it is always in action whether or not you use these keyboard shortcuts.Read on for all the commands.

  • Mac 101: Capture sharp screenshots

    by 
    Dave Caolo
    Dave Caolo
    07.04.2008

    Earlier this week, we described several ways to create screenshots with your Mac. Using the keyboard shortcuts in the Finder is great, but you may have noticed that the results aren't very sharp. Ivan at creativebits noticed that, too, and figured out how you can correct the problem.He explains that a basic screenshot creates a JPEG with a resolution of 60 by default. As is often the case, the solution is just a couple of Terminal commands away. Set the default format to png, pdf or tiff for much better results.If you're not the Terminal type, check out Skitch, which takes simple, great-looking screen captures.

  • Terminal tip: easy email attachments

    by 
    Brett Terpstra
    Brett Terpstra
    04.19.2008

    If you're looking to automate the sending of emails with attachments quickly and easily (and aren't too concerned with having some glamorous stationery), Terminal is once again your friend. It's possible with Mail.app and AppleScript, but there are a few pitfalls and, for most purposes, a simple shell command will do the trick: (echo "This is the message body";uuencode Desktop/yourDoc.doc yourDoc.doc)|mail -s "Test attachment" someone@adomain.com The magical command in this one is uuencode, which is used to encode and decode binary files and can be used on just about any file type. The two arguments in the command above define the name and location of the source file and the name the file should have when it's received. The parenthetical statement at the beginning combines the results of the echo and uuencode commands which are then piped (|) to the mail command. The mail command, having received the body text and attachment, is told to append a subject (-s "Subject") and send it to the address specified. If you wanted to send a longer text file – with line breaks, perhaps – as the body, you could save the text in an external file and replace the echo statement with cat myfile.txt. By adding a little complexity you could make a shell script that takes arguments, making the automation a little more flexible. But TUAW reader Adam was wondering how to send a photo he'd taken automatically using AppleScript (triggered by a Mail Rule). So here's an AppleScript implementation that doesn't require opening Terminal or dealing with Mail.app scripting: set msgBody to "This is the body of the message" set msgSubj to "Message subject" set mailDest to "someone@adomain.com" do shell script "(echo '" & msgBody & "'; uuencode /Users/you/Desktop/pictosend.jpg pictosend.jpg) | mail -s '" & msgSubj & "' " & mailDest Make sure you remove any line breaks from that last line. This obviously requires a predetermined image name, but that could be made a variable as well and used as part of a larger script. We hope this helps, Adam!

  • Terminal Tip: using whois

    by 
    Cory Bohon
    Cory Bohon
    03.13.2008

    Whois or "Who is," is a way to query for contact information (or domain name ownership information) about the person or company in control of a site. If you want to know who runs a website, you don't have to look any further than your Mac and opening a Terminal window. All you have to do is open Terminal.app (/Applications/Utilities/) and type in "whois" and space followed by a URL. For instance, the following command would give you the whois information for tuaw.com: whois tuaw.com. You can do this for almost any website; however, some domain names use some form of a hiding service from their registrar that allows them to hide their contact information. Be forewarned that you shouldn't use information like this to stalk people!Please note that if you have Terminal-itis, or are scared of the Terminal, you can use Apple's Network Utility in Mac OS X to do a whois query. Just open Network Utility.app (in the /Applications/Utilities/) and click the "whois" tab. From there you can enter a URL and do a query, all within a pretty "Aqua-licious" user interface.

  • Terminal Tips: creating a Spotlight-based gallery

    by 
    Brett Terpstra
    Brett Terpstra
    02.15.2008

    As sexy as Leopard is to me, I'm just as enamored with the powerful UNIX underpinnings of the operating system. I've been toying with a few ways to combine a couple of my favorite command line utilities into something that might prove useful. I won't claim I've achieved a truly practical usage yet, but I thought I'd offer some possibilities. Even for the Terminal-timid, you just might find the potential intriguing enough to slap on some binary camouflage and go all "Code Warrior" for a bit. I'm going to elaborate on some image processing techniques using results from Spotlight searches. In order to make use of the examples without modification, you'll need to have a collection of images containing IPTC keywords (or very descriptive filenames). With a little modification, the searches can be expanded to other criteria. But if you can't run a spotlight search and find at least 8 jpegs with one keyword, you'll have to accept this as a proof of concept. But, that being said, let's get started.

  • DTerm: give your Mac a little shell love

    by 
    Brett Terpstra
    Brett Terpstra
    01.10.2008

    DTerm is a utility just released by Decimus Software Inc. It's a Leopard-only app that provides a hotkey-triggered HUD which allows shell commands to be run from anywhere in OS X. In case you're wondering why, just imagine what less window switching and screen clutter could mean for productivity on jobs that require both Finder and Terminal. Yes, you can do a lot with Quicksilver, but DTerm provides bash name completion with a dropdown, context sensitivity to your current path and full output with clipboard features. You can also type ???-??? in the HUD to run the command in the Terminal, which will open up to your current path. DTerm is all about reducing effort, really. The process of running a command in the current directory is reduced to just a few keystrokes and there's no need to grab the mouse or switch to another application. Better Path Finder integration would be nice, but the developers tell me that it's Path Finder's own use of the Accessibility system that prevents that right now. DTerm requires Leopard and has a free demo (up to 50 commands) after which the program costs $20. Visit the DTerm page for the download and more info, including a speedy video that will satisfy your secret bash-voyeurism fetish and won't waste much of your time.

  • Using Data Detectors in Leopard's iChat

    by 
    Brett Terpstra
    Brett Terpstra
    01.05.2008

    I'm always, well, tickled by the things that can happen when you use Terminal commands that begin with "defaults write" -- thus changing the preferences for applications, the Finder, and more, often in ways that you can't accomplish via GUI pref settings. I also get a certain warmness from Leopard's Data Detectors, but I have to confess I rarely use them. It's fun to watch the things that Mail can pick up on, and I've often tested to see what exactly iCal will make of it, but I guess some people just get better emails than I do. Strangely, I do get dates and info via instant messaging on a more regular basis. You can enable Data Detectors in iChat with one simple command in Terminal: defaults write com.apple.iChat EnableDataDetectors 1 You can disable it using the same command, but change the '1' to a '0.' Now you get the fun job of calling your closest Mac-using relative and explaining Terminal so they can use a feature that Apple hid from public view for what I can only assume were valid reasons. I hope your aunt has her screen-sharing figured out. [via Mac OS X Hints]