[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Open Folder/File in Linux

Posted on 2009-05-18
5
Medium Priority
?
1,652 Views
Last Modified: 2012-05-07
Hi,

Am trying to open a folder or file on linux(Suse,CentOS)
using the following

dim f as folderitem
f = GetFolderItem("/root/abc.txt") or f = GetFolderItem("/root/bin/myfolder")
f.launch

unfortunately nothing happens ...neither the file nor the folder is launched ...works fine on windows/mac ...
Has anyone else faced this situation?


regards
Pramod
0
Comment
Question by:pramodpatel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 

Author Comment

by:pramodpatel
ID: 24409855
Hi,

Managed to launch folders with the following

dim s as shell
dim g as FolderItem
s = new shell
g=GetFolderItem(EditField1.text)

s.execute( "nautilus /root/bin")


looking to open movie files now...
regards
pramod
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 750 total points
ID: 24417534
In Linux, text files are not normally executable.  If you can ever click on a text file to run it, that's a special attribute of the file manager program you are using to "present a view" of the file.

Instead of launching the file you want to view, you launch a PROGRAM and pass the file you want to open as an argument.
eg

Dim item As FolderItem
item = GetFolderItem("/path/to/kfmclient")
f.launch "exec /path/to/file.txt"

The idea is to run, for example  "/opt/kde3/bin/kfmclient exec /path/to/file.txt"

The GNOME equivalent (for Linux systems using the Gnome WM)  is
gnome-open,  i.e.

Dim item As FolderItem
item = GetFolderItem("/path/to/gnome-open")
f.Launch "/path/to/file.txt"


in XFCE it would be exo-open


In Linux, the user could be utilizing a different window manager, and every WM has a different way of accomplishing this.


KDE and Gnome being the common cases.
0
 

Author Comment

by:pramodpatel
ID: 24418532
hi Mysidia,
firstly..thnx so much for replying... its damn difficult to get answers for realbasic here... :)
i managed to launch the folders yesterday ...also got the files to work ...thnx so much for your replies...

Could you plz also look into my previous question regarding the shell in realbasic?


regards
pramod
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question