1

I want to use OSProcess to execute external programs in Linux and MacOS from Pharo 1.4. I've followed other post install instructions but when I evaluate

(PipeableOSProcess command: 'pwd') output asFileReference

it hangs the VM under Ubuntu. For OSProcessPlugin There is a Squeak wiki page with instructions but execution returns:

OSProcess not available or OSProcess plugin not functioning

Loading OSProcess sar file from the File Browser leads to a Syntax Error

(anArrayOfNullTerminatedStrings collect: [:e | e size])
    inject: offset into: [:p :e | ws nextPut: p. Cannot store into -> p := p + e].

Do I have to build my own VM to make it work? What do I need to do to execute commands in Linux under latest Pharo 1.4?

Community
  • 1
  • 1
user183928
  • 783
  • 3
  • 9

3 Answers3

3

Use the Configuration for OSProcess available in the Metacello Repository:

Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfOSProcess';
    load.

((Smalltalk at: #ConfigurationOfOSProcess) project version: #stable) load.

Using the configuration you avoid loading unstable versions.

camillobruni
  • 2,298
  • 16
  • 26
2

In Pharo 5.0 or alpha 6, use the Catalog Browser, found in the Tools menu of the world menu.

Screenshot of Pharo window

John Pfersich
  • 135
  • 2
  • 7
0

From the Pharo book (read it!)

Gofer new
    squeaksource3: 'coral';
    package: 'OSProcess'; 
    load.
camillobruni
  • 2,298
  • 16
  • 26
nes1983
  • 22
  • 4