How to open a text file with kwrite from a menu?

joe at actionline.com joe at actionline.com
Sun Dec 31 11:21:25 MST 2017


Thanks Alex.

I don't think I asked my question well.

You suggested:
<a href="/home/joe/data/SOMEFILE.txt">notes</a>

That works the same as:
<a href=file:/home/joe/data/SOMEFILE.txt>notes</a>

(Which I had tried).

Both open the file, to read-only, but what I want to
do is open the file in the text editor 'kwrite'.

When I do: kwrite SOMEFILE.txt <E> from the command line,
the file opens in the editor.

My question might be better ask this way:
How can I do that from a menu.

Is there a syntax something like: exec kwrite SOMEFILE.txt
that can be used to within an html menu?

-----------------

> The reason you're getting that prompt is because that syntax is saying to
> open an ".odt" file and you have not yet told Firefox how to handle the
> ".odt" extension. You can do that in your browser settings. If you were
> to
> change the syntax to have ".txt" the browser would just display it
> online,
> with no prompt.
>
> I'm not familiar with the "=file:" part, and suspect that might be
> specific
> to FF. Try this and let me know if it works for you?
>
> <a href="/home/joe/data/SOMEFILE.txt">notes</a>
>
> Thanks,
> Alex.
>
> Sent from my Samsung Galaxy S8+
>
>
> On Dec 30, 2017 13:01, <joe at actionline.com> wrote:
>
> I have an html menu with a list of tasks that open
> various documents both online and on my local system.
> Most of the tasks in the list open html documents,
> but one of the tasks looks like this:
>
> <a href=file:/home/joe/data/notes.odt>notes</a>
>
> When I click on "notes" (using Firefox) a dialog pops up
> that reads: "What should Firefox do with this file?"
> (*) Open with LibreOffice Writer (default)
> ( ) Save File
> [ ] do this automatically for files like this.
>
> Two questions:
> (1) What actions and what syntax could I use to open a plain text
> document with 'kwrite' (the text editor that I use most often)?
>
> (2) How can I get this to work with the Chrome browser, also?
> (It only works with Firefox now.)
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss




More information about the PLUG-discuss mailing list