OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio


Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Opening A File From The Command Line In Qtopia App, How to make qcop use default file assocs
post Apr 1 2006, 03:02 AM
Post #1

Group: Members
Posts: 105
Joined: 3-August 05
Member No.: 7,766


I assume I can use qcop for this but I wasn't able to find out how.

I want to open a document (say "hello.html") using the default application as if I would double click on the file icon in the document tab. How do I do this? I guess something like qcop QPE/System '+++(QString)' hello.txt would do the job. I tried a view possibilities but all I achieved were interesting crashes.

Any ideas?

Go to the top of the page
+Quote Post
post Mar 11 2007, 07:02 AM
Post #2

Group: Members
Posts: 447
Joined: 17-November 05
Member No.: 8,551

Yeah, well, your use of qcop is simply as a messenger, to tell the appropriate application it should open the file.

If you want textedit to open the file, then try something like (untested):

qcop QPE/Application/textedit 'start(QString)' 'hello.txt'

Use the qcoptest app I described at http://www.sdjf.esmartdesign.com/ipks/qcoptest.html to test your syntax without crashing.

You also may need to google or search here for examples of successful qcop calls.

I also found running strace to be quite helpful in figuring out the causes of crashes.

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 25th April 2018 - 08:18 PM