OK Richard, I think I might have just about cracked it. If you navigate to http://www.howsoft.com/runrev/sysinfo/ you can download get_sys_info_linux.zip .

Inside, you will find a Linux executable to get system info as detailed below. For some reason that I haven't worked out yet though, changing the file name, up/downloading it over the Internet, or simply extracting the program from the ZIP file nullifies its executable status. So when you extract it, look at the file's properties (right click of the mouse) and GIVE IT EXECUTABLE STATUS.

Here is my first (and possibly last) routine in RB for creating the module:

  Dim g As FolderItem
  Dim h As string
  Dim f As FolderItem
  Dim t as TextOutputStream

  f = GetFolderItem("sys_info.txt")
  t = f.CreateTextFile

  g=DesktopFolder
  h=g.AbsolutePath
  t.Write h
  t.Write Chr(13) + Chr(10)

  //g=ApplicationsSupportFolder
  //h=g.AbsolutePath
  //t.Write h
  //t.Write Chr(13) + Chr(10)

  //g=FontsFolder
  //h=g.AbsolutePath
  //t.Write h
  //t.Write Chr(13) + Chr(10)

  g=PreferencesFolder
  h=g.AbsolutePath
  t.Write h
  t.Write Chr(13) + Chr(10)

  //g=StartupItemsFolder
  //h=g.AbsolutePath
  //t.Write h
  //t.Write Chr(13) + Chr(10)

  g=SystemFolder
  h=g.AbsolutePath
  t.Write h
  t.Write Chr(13) + Chr(10)

  g=TemporaryFolder
  h=g.AbsolutePath
  t.Write h
  t.Write Chr(13) + Chr(10)

  g=TrashFolder
  h=g.AbsolutePath
  t.Write h
  t.Write Chr(13) + Chr(10)

  //g=SpecialFolder
  //h=g.AbsolutePath
  //t.Write h
  //t.Write Chr(13) + Chr(10)

  t.close
  Quit

------------------
As you can see, the output is to the file "sys_info.txt". The items commented out are the ones which did not work under Linux. So what we have in "sys_info.txt" are the paths in the order above, ignoring the commented ones. On my computer (Ubuntu), this gives:

/home/bob/Desktop/      (DesktopFolder)
/home/bob/              (PreferencesFolder)
/usr/                   (SystemFolder)
/tmp/                   (TemporaryFolder)
/home/bob/.Trash/       (TrashFolder)

------------------
In RR, you can now do a "shell and wait end" on the get_sys_info_linux module.

One little detail that I might have to clear up eventually is that the RB coding was put into the window's "Activate" handler, but I found that if I made the window invisible, this handler would not be actioned. So I kept it visible and reduced the window's dimensions to 1x1 pixels, but it doesn't help very much because there must be a default minimum size that is independent of what I specified in the program, and in fact you can actually see a very quick flash of a window which is certainly bigger than 1x1 pixels.

That's the best I can do at the moment, I'm afraid. Hope it helps.
Let us know how you get on.

Regards,
Bob



_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to