Trucs et Astuces

From MorphOS Library

Revision as of 20:51, 16 February 2016 by Beworld (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Retour sur la page principale


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.

Contents

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.
For example IControl has "Active Window: Activate Next" and "All Windows: Depth Menu" options, which can be used to achieve alt/ctrl/command-tab style window cycling functionality familiar from other operating systems.
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.


Keeping AHI Audio Quality Better

Audio quality with AHI will be better if you reduce available channels for its shared modes (Unit 0 usually). Available channels will limit the amount of simultaneus playback of sounds, but you really don't need the default 32 channels and even two channels can be quite enough. Should there be more concurrent sounds, some of them just get muted until the other have been finished.


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.


Inline Editing

Inline editing is a quick way to edit filenames by clicking them with the mouse wheel or with the long left mouse click. Its behaviour can be configured from the Lister settings in Ambient Settings.
File comments can also be edited with the inline editing.
Tips Inlineedit.png


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

The right mouse button can be emulated in several different ways:
  • The SYS:Utilities/Commmodities/ShiftClick program lets your mouse button act as the right mouse button if you hold a qualifier key pressed while clicking. The qualifier key can be configured for your preferences. Drag&drop it to the WBStartup drawer for permanent use and save its settings or tune its tooltypes to avoid a window pop-up. The ShiftClick program can be launched by clicking the one eyed mouse on the welcome window of MorphOS when booted from the MorphOS installation media.
  • Press right alt and right command keys together. This probably doesn't work on systems with ADB keyboard, like on older Mac laptops. The 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 combination on the touchpad for RMB.
  • You can define a hotkey for menu launching on the IControl preferences (the default one is rcommand+space). It doesn't work exactly as the RMB everywhere, but works if you're mostly using the RMB for menus.
  • A multi button USB mouse works always!


Starting Programs Iconified

MUI has an option to start programs in iconified mode. It's useful for example for programs like Synergy, which you'd like to start on background without their main window jumping up. The option can be found from program's MUI Settings (Windows -> Iconify on startup).
Tips Iconify.png


Checking the Debug Log

If you want a stable system, you need to check the debug log periodically to see if any program misbehaves when used, especially when running new software.
An easy way to do it is to enable Debug screenbar module from the screen depth gadget menu. Bug looking Debug button on the screenbar will then give you a debug menu where you can view the log etc. If "Show Log..." option is ghosted, there's nothing in the log and everything is fine, but if it shows hundreds of cryptic lines (it's called a hit), then you have something to worry and the system probably isn't stable anymore. Some programs may output their own harmless debug information to the log too, but it's usually limited to few or tens of lines maximum. You'll recognize a real hit for sure.
Tips Debug1.png Tips Debug2.png


Printing to a PostScript Compatible Network Printer

You should mount the NETPAR: device and print to that device from programs like VPDF and OWB, which can output PostScript. NETPAR: is faster than printing through Turboprint (PRT:) and doesn't need Ghostscript installed (PS:).
"Mount NETPAR:" can be added to S:user-startup, for example.


.recycled Directory

SFS is the default filesystem on MorphOS. It can have a special directory which contains recently deleted files. The directory is named as .recycled and it resides at the root level of every SFS partition (SYS:.recycled for example). Depending the format options it may be disabled, hidden but accessible, or visible.
If it's hidden, you can't see it even with "View All Files" option, but you can access it from the shell or Ambient (for example by pressing / key and then writing it to the path string after the volume name).
You shouldn't modify any files in it, but you can recover deleted files by copying them to some other path.
The PFS3 filesystem has a similar directory, but its name is ".deldir".


How to Reduce Graphics Memory Usage

MorphOS can use graphics memory quite extensively which can cause slowdowns or glitches if you run out of it. It usually isn't an issue if you have 64MB or more graphics memory, but lower spec systems with today's resolutions may need some tuning. There are several ways to reduce memory usage and you have to decide or try which is the best for you.
MorphOS has an "Enhanced Display" mode, which uses the graphics card's 3D functions to draw graphic layers. It consumes more memory than the traditional 2D mode, but it provides some eyecandy, tearless moving etc.
To reduce its memory usage, you may:
  • Change its buffering settings on the DisplayEngine settings in MorphOS Preferences. You need to reboot or switch screens for the new settings to take effect.
  • Disable it completely from the Screens settings in MorphOS Preferences for some or all screens. It may also help if you let it be enabled for Ambient screen, but disable it on other screens you might have.
Other ways to reduce graphics memory usage:
  • Lower the color depth of screens from the Screens settings. 16-bit might be enough sometimes.
  • Don't use too many separate screens at the same time.


How to Open MUI Programs on Their Own Screens

1) An easy way is to select "Jump to Screen -> New" from the MUI popup menu gadget in program's window border. It always opens in an enhanced mode and clones the resolution from the Ambient screen. Open and save program's MUI settings to save it permanently.
MorphOS3 jPV Newscreen.png
2) A more configurable method is to open program's MUI settings, select the Screen tab, and create a totally new screen definition there. You can edit the screen name and the title to suit your use (you can use program's name for those for example), select any resolution and depth, enable or disable the enhanced mode etc. In many cases this is a better method, because you can save graphics memory by not using the enhanced mode for screens which you're going to use for full screen apps only or so.
You can switch between the screens with lamiga-m (lcommand-m) keyboard shortcut, or by clicking the screen depth gadget (left click switches to the next screen, right click gives you a menu where you can select any open screen).
Tips Screendepthmenu.png


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.


Default Icon for Ambient Windows

By default there isn't a default icon file for the icon you see when iconifying an Ambient window (a view). If you want to override the built-in icon, create or copy a new icon file to your default icons path and name it to def_view.info.


Old Style Preferences Icons

Example of separate system prefs in MorphOS
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 the 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.
Load the IPC module first with the require 'ipc' line (unlike the standard Lua distribution, all modules have to be loaded with the require function on MorphOS. Check available modules from the MOSSYS:Libs/Lua/ directory.)
  • 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 the correct destination! For copying you need to use SDK's cp command or standard Copy command with the DIRECT option.
You can browse available disks and devices by opening RAWDISK: device from the shell (just type RAWDISK: on the shell) or from Ambient (hit the / key, clear existing text, and write RAWDISK: to the string line). Browse to the Devices directory and then to the wanted device and unit to see the actual disk image file (rawdisk) and partition files in a 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 the List command or Ambient to see them).
As an example, to make a backup of a whole SD card which is placed in a USB reader (the card is found in usbscsi.device unit 3):
Copy DIRECT RAWDISK:Devices/usbscsi.device/3/rawdisk work:sdcard.img
And to copy the image back to the 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.
Single partitions can also be copied from the RAWDISK:Disks directory.
If you want to access the data in saved image files without needing to write them back to any device, you can mount them with help of Tools/FileImageCtrl and Tools/Mounter programs. You can either mount partitions directly with the FileImageCtrl tool or insert disk images on it and mount the wanted partitions with the Mounter tool.


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"
}
Note: It's not recommended to hide the SSID, because it doesn't add security in practise. Use this only if you can't control the network you're connecting.


Modifying Screen and Keyboard Brightness on a Laptop without Using KB Shortcuts

Brightness values can be modified by editing the ENVARC:sys/laptopquick.conf file with a text editor. The values are taken in use after a reboot.


Bundled Software

Flacapella Settings for MP3 Encoding

Example of a custom encoder setting in Flacapella:
Compress Command: c:lame -V0 --tt "{title}" --ta "{artist}" --tl "{album}" --tn {track} {?coverfile:--ti "{coverfile}"} {input} {output}
File Extension: mp3
This will encode tracks to mp3 files with title, artist, album and track number tags. It also embeds fetched cover image in files, if image was found.
Example assumes you have LAME installed in C:


Jukebox Tips

  • If you select any song in playlist by clicking it just once, it's played next no matter if you have random or sequential mode in use.
  • You can adjust volume in Jukebox by using mouse wheel over its screenbar module.
  • Displayed columns can be configured on the fly by right clicking the column title.
  • Jukebox can be better integrated into Ambient and its contextual menus with the JukeboxAdder script.
  • Two new tooltypes were presented in MorphOS 3.8:
    •  FRAMESCAN=NO disables the Reggae framescanning for tracks that have unknown duration. It speeds up the loading of such tracks, but you'll lose the seeking ability with them.
    •  STREAMBUFFER=YES activates the Reggae streambuffer class which reduces stuttering, but causes lag on track change and seeking.


How to Reduce OWB's HD Writes

OWB writes a lot of data to the hard drive by default. You might want to reduce it if you're paranoid about SFS fragmentation, filesystem corruption or privacy. Or you just want your .recycled dir to have other than the OWB files too. One option is to use the Private Browsing mode always, but here are tips if you don't want to activate that always or you want to restrict certain writes only.
  • Disable the TopSites feature. This makes a write for every page you visit, it's an awful amount. You can disable it with "Setenv SAVE OWB_DISABLE_TOPSITES 1" command in the shell.
  • Disable the Website Icons feature. Open the Interface settings and uncheck all Website Icons checkmarks.
  • Disable all saving options from the Privacy settings.
If you still need some option enabled, because some site requires it, you can soft link its configuration file to Ram Disk. I, for example, still have Local Storage enabled, but I have linked its dir to ENV: (which resides in Ram Disk). To do that, make LocalStorage directories to both ENV: and ENVARC: (that ensures that it's created after a reboot too), open the shell and cd into your OWB/Conf/ dir, rename or delete the old LocalStorage dir, type "makelink LocalStorage ENV:LocalStorage". Using ENV: gives the advantage to have some files saved so that those settings are restored in every boot. If you're happy with a certain setting, copy the corresponding file to ENVARC: and it will be preserved without being messed up with the later usage. If you just want to have the configuration files enabled, but cleared on every boot, you could soft link them to T: for example.


Alternative YouTube Script for OWB

YouTube Center is a feature rich configureable userscript for improving YouTube experience. It's made for mainstream browsers, but it also works on OWB! All videos can be forced to HTML5 to get them work in OWB. It's heavier than Fab's official OWB script, but works fine as an option or as a backup plan :). Script saves its settings to LocalStorage to #?www.youtube.com#? files.
Note: YouTube defaults to the HTML5 player nowadays and you might be fine without any Flash->HTML5 converter scripts. It's probably better to install this script only if you want some other features from it.


Watching Videos with Less CPU Load in OWB

When watching a video in OWB, the fullscreen mode makes a lot less CPU load than the default embedded mode, because the fast overlay mode is used then. CPU load may drop from 100% to 40% for example. Wait until the video really starts playing before clicking the fullscreen button on it, or it may fail and you have to reload the video to be able to try it again. Some videos may have a fullscreen option in their contextual menu too. Remember to have Fullscreen Fix scripts added and enabled from the Scripts window ("Windows->Scripts..." pulldown menu entry) for YouTube, Dailymotion, and Vimeo.
Note: check that you really have the latest YouTube fullscreen fix script from http://fabportnawak.free.fr/owb/scripts/YouTube_Fullscreen_Fix.js in your OWB/Scripts/ directory. Grunch doesn't get updated for the latest version always for example.


Some YouTube Videos Refuse to Play

Now that YouTube defaults to HTML5, our days of ad-free videos have ended. It also means that the Content Blocking (AdBlock) option in the OWB's settings can block some videos. If you have some videos which won't start playing, try to disable the Content Blocking option and try again. If that was the problem, but you want to keep the content blocking, add an allow rule to the Content Blocking settings. Open "Windows->Content Blocking..." from the OWB's pulldown menus, click the Add button, and write "youtube.com" to the Rule line. Close the window and try the video again.
OWB ContentBlockingYT.png
If all videos refuse to play, check if you have any YouTube converter scripts enabled in the "Windows->Scripts..." settings. Try disabling them if you do, only Fullscreen Fix is needed.


Creating an ISO Image

Jalapeno can also create and save ISO images which will preserve MorphOS/AmigaOS file attributes and comments. Images can be used for backups or even be booted from USB devices.
An option to create an ISO image is found on the pulldown menu in the Burn Files section.
Tips Create ISO.png
If the resulting image file will be bigger than 1GB, Jalapeno splits it into 1GB parts. Those parts can be joined into one big image file with the Join command in the shell, but remember the filesize limits of your target filesystem if doing that.


Disabling the Default UTF-8 Mode with Scribble

Scribble uses UTF-8 encoding by default, but you might prefer to default to the traditional ASCII format instead. The UTF-8 mode can be disabled from the pulldown menu in Scribble, but the setting isn't saved if you save the program settings.
Scribble ascii1.png
If you want to disable it by default, you have to open the "Save As..." requester, enable the "Make Default" option (also check that Encoding is set to ASCII), and save a file (can be any file anywhere).
Scribble ascii2.png


3rd Party Software

Where to Get Software?


Custom Ambient Menus with AREXX

You can add own menu items to Ambient pulldown menus with AREXX. Read SYS:MorphOS/Ambient/docs/arexx.txt for more info about AREXX usage or download the CRABUM program, which helps you to create correct AREXX lines.


Help with Shell Commands

There's a nice Help program in Aminet. Unfortunately it hasn't been updated for all the MorphOS 2.x commands, but it's still a very nice help for the basic commands of the shell.
MorphOS Library also contains descriptions of many shell commands now.


Utilizing Your Keyboard's Multimedia Keys

  • The MMKeyboard software can be used to assign different kinds of functions to extra keys found on some keyboards.
  • The MultiMeedio script provides a unified control for all popular media players.


Hardware Related

Removing Startup Sound on Macs

Sadly there isn't any known way to disable that annoying startup sound from MorphOS itself or from Open Firmware, but there are few different ways to achieve it anyway.
  • If you plan to use Mac as MorphOS only system, but you still have OSX installed, you can mute the audio from OSX before wiping it out by installing MorphOS. Startup sound doesn't come back if you won't boot into OSX anymore.
  • If you don't have OSX anymore, you could try to remove sound with some Linux distribution's live/installation CD. More info here and here.
  • If you use OSX and MorphOS as a dualboot system you can install StartupSound.prefPane for OSX.


Speeding Up the Startup Manager on Macs

Startup Manager (the boot menu you get by booting with option/alt key pressed) can be slow when it tries to find network boot devices. To speed it up go to the OF prompt and type "setenv skip-netboot? true". Funnily enough, it only affects if you have network cable plugged in.


Booting MorphOS ISO from USB Stick

MorphOS Team has released an official guide for USB booting, but I've also noticed that at least some Macs (Mac mini and Powerbook for example) have certain ud alias for USB drive. You can use that as a shortcut and get the booting done with less work (no need to search the correct path, works even when USB stick is in a hub, less typing and less to remember).
If you have only one mass storage device connected, you can just boot into Open Firmware prompt (command-alt-o-f) and type:
boot ud:,\boot.img bi umsd0:morphos.iso
(Remember to have both boot.img and morphos.iso on the stick)


Keyboard Reboot on ADB Laptops

The traditional Ctrl-Command-Command (Ctrl-Amiga-Amiga) keyboard combination doesn't work on laptops using the ADB interface for the keyboard, because ADB doesn't make difference between the left and right command keys. You can reboot them with an alternative Fn-Alt-Alt keyboard combination.


Blackouts or Graphical Flickering on Mac mini

Mac minis suffer from short blackouts with some monitors when the connection is made with a DVI cable. The screen gets usually blanked for few seconds, and depending of the monitor it may happen more or less frequently. Issue may also show up as flickering lines on the screen and it may get worse and worse until the monitor is unable to sync to the signal anymore.
One option to get around it is to use a VGA adapter/cable, because it doesn't seem to happen with it.
An another option is to try to lower the pixel clock value for the used screenmode from the Monitors settings in the MorphOS preferences. If your default mode has for example vertical frequency of 75 Hz, going to 60 Hz mode may help. Sometimes even a small change can help, and lowering just couple clicks from 60 Hz does the trick.
This seems to be a common problem with Mac minis and "non-coherent" displays as discussed for example here.