Difference between revisions of "Tips and Tricks"

From MorphOS Library

m
Line 128: Line 128:
  
 
: This works with all raw disk image files like Raspberry Pi's OS distributions etc.
 
: This works with all raw disk image files like Raspberry Pi's OS distributions etc.
 +
 +
 +
=== Using WLAN with Hidden SSID ===
 +
 +
: If you have to use wireless network with hidden SSID, you can add "scan_ssid=1" line in your ENVARC:sys/Wireless.prefs file's network block.
 +
 +
: Contents should look something like this:
 +
: <tt>network={
 +
: &nbsp;&nbsp;ssid="ThatHiddenSSID"
 +
: &nbsp;&nbsp;scan_ssid=1
 +
: &nbsp;&nbsp;psk="password"
 +
: }</tt>

Revision as of 17:20, 27 January 2015

Originally published at: http://jpv.wmhost.com/morphos/tips/

Miscellaneous tips and tricks for MorphOS use. Some may even be hackish and not officially encouraged by MorphOS Team. Everyone is welcome to make additions and corrections here.

Basic Features

Modifying the System Directory

Tip #1: NEVER modify anything in the MOSSYS: (SYS:MorphOS/) path! All the changes are lost in the system upgrade. If you need to add any 3rd party drivers or libraries, add them to SYS:. If there isn't a correct directory by default, make one.
There's only one exception (of course there is one) to this: you can rename MOSSYS:Libs/rexxsyslib.library to MOSSYS:Libs/rexxsyslib.library_disabled when you copy 68k version of rexxsyslib.library to SYS:Libs/ in order to get the AREXX working.


Keyboard Commands

At first, check the default ones and define your favourites in System Settings -> IControl -> Hotkeys and in Ambient Settings -> Keyboard.
Other keys:
  • To zoom Ambient icons in icon mode: keep CTRL pressed and use the mouse wheel.
  • To find and select files in Ambient windows by letter: start typing the wanted name when the window is active. Keep shift-key pressed for directories.
  • To enter a path manually (for example for hidden dirs like .recycled): press the / key in an Ambient window and type in the path.
  • Command-f activates the find function in most programs.
  • The r-key rotates the pictures in Ambient's internal viewer and page up/down keys select previous and next images in a dir
  • Check the keyboard commands of the shell, like by default, commands can be completed with CTRL-tab, devices with ALT-tab, history with shift-tab etc.
  • Keeping the alt-key pressed while double clicking drawer gives you different ways to open drawers.


Enabling/Disabling Icon Tooltypes

Double click single tooltypes to enable and disable them in the icon information window.


Browsing History in Ambient

Clicking the parent button (Tips Parent.png) on an Ambient window (in browser mode) with the right mouse button gives you a browsing history popup menu for quick jumping between locations.


Sync the Clock from Internet at Boot

Add this line to S:user-network-startup file:
Run DETACH MOSSYS:C/SetClockNTP SAVE


Redirecting AHI Music Unit

You can select Unit 0 as the Music Unit in AHI to be able hear audio output from multiple programs at the same time, with a slight decrease in quality.


Mime Type Configuration

Learn to configure mime types from the Ambient settings. It really gives so much for your system and your user experience. Here is one example of how to configure MPlayer for all the video files.


Batch Renaming in Ambient

  1. Select files you want to be in the range of renaming.
  2. Hit rename button or command-r keyboard shortcut.
  3. Use pattern to rename. For example renaming all files which begin with "mod." to files which end with ".mod", use "mod.*" as source and "*.mod" as destination (quotation marks not needed).


Don't Forget RMB/Long-LMB Gadget Menus

You get menus from zoom and depth gadgets with right mouse button or by holding left mouse button pressed on them.
Tips Zoommenu.png Tips Windowdepthmenu.png Tips Screendepthmenu.png

How to Use RMB with One-button Mouse

Right mouse button can be emulated in several different ways:
  • SYS:Utilities/Commmodities/ShiftClick program lets your mouse button act as right mouse button if you hold a qualifier key pressed while clicking. Qualifier key can be configured for your preferences. Drag&drop it to WBStartup drawer for permanent use and save its settings or tune its tooltypes to avoid window pop-up.
  • Press right alt and right command keys together. This probably doesn't work on systems with ADB keyboard, like on older Mac laptops. ADB keyboard doesn't make difference between left and right keys.
  • With non-ADB laptops (PowerBook 5,6-5,9 and 6,7 (iBook)) you can also use two finger tap or two finger hold + button on touchpad for RMB.
  • You can define a hotkey for menu launching on IControl preferences (default one is rcommand+space). It doesn't work exactly as RMB everywhere, but works if you're mostly using RMB for menus.
  • Multi button USB mouse works always!


Advanced Features

Default Device Icons

If you want a certain default icon for all the units of a certain device, you can create an icon named def_DEVICENAMExdisk.info to your default icons path (SYS:Prefs/Presets/Deficons/ by default).
For example the deficon for SMBFS devices would be called def_SMBFSxdisk.info.


Old Style Preferences Icons

You can have separate preferences icons in the SYS:Prefs/ directory in the old Amiga style for MorphOS system prefs. Make or copy icons named with a corresponding sub preference name into the SYS:Prefs/ dir and edit their Default Tool to ":MorphOS/Prefs/Preferences".
There's already a main preferences icon in SYS:Prefs, so here's an easy example: "copy SYS:Prefs/Preferences.info SYS:Prefs/Network.info", after which double clicking the new Network icon opens the network preferences directly.


Hilight Options in Listers

If you want to use "Alternated rows" and "Hilighted sorting column" options in the Lister settings with a grapchics card that doesn't support 3D acceleration.
Type in shell:
Setenv MUI/fastppa SAVE 1


Copy Selected Filenames

You can use the internal Ambient command "copyselectiontoclipboard" to copy selected filenames with or without path information to the clipboard. For example, create a new custom hotkey in the Ambient Settings and define "copyselectiontoclipboard VIEWID=%Si FULLPATH" as an internal command for it.
User may find it very useful to paste around the names selected in the Ambient windows in many situations.


Using ARexx Ports from Lua

MorphOS comes with a native implementation of Lua scripting language. It can be used for script writing with application interacting instead of the emulated 3rd party ARexx. Lua can use existing ARexx ports with its ipc.module.
  • ipc.address(port) - sets the default ARexx port. Port "COMMAND" executes commands as DOS shell commands.
  • ipc.checkport(port) - checks if ARexx port is available.
  • ipc.rx(command) - sends command to a port set with ipc.address. It returns ARexx RESULT.
  • ipc.waitforport(name[, interval]) - Waits for a ARexx port. Script is aborted if the port isn't found.
Few examples can be found from here.


Copying a Whole Disk As an Image File

You can access raw data of drives by MorphOS's RAWDISK: device. Partitions or whole disk can be copied in or out with it, but be careful to write to correct destination! For copying you need to use SDK's cp command or standard Copy command with DIRECT option.
You can browse available disks and devices by opening RAWDISK: device from shell (just type RAWDISK: on shell) or Ambient (hit / key, clear existing text and write RAWDISK: to the string line). Browse to Devices dir and then to the wanted device and unit to see the actual disk image file (rawdisk) and partition files in separate partition table directory. Partition files let you recognize more easily that you're accessing the wanted disk. They also have information like device and filesystem names told in file comments (use List or Ambient to see them).
As an example, to make a backup of a whole SD card which is placed in a USB reader (card is found in usbscsi.device unit 3):
Copy DIRECT RAWDISK:Devices/usbscsi.device/3/rawdisk work:sdcard.img
And to copy image back to SD card (removes all existing data, be careful!):
Copy DIRECT work:sdcard.img RAWDISK:Devices/usbscsi.device/3/rawdisk
This works with all raw disk image files like Raspberry Pi's OS distributions etc.


Using WLAN with Hidden SSID

If you have to use wireless network with hidden SSID, you can add "scan_ssid=1" line in your ENVARC:sys/Wireless.prefs file's network block.
Contents should look something like this:
network={
  ssid="ThatHiddenSSID"
  scan_ssid=1
  psk="password"
}