Mailinglist Archive: opensuse (2835 mails)

< Previous Next >
Re: [opensuse] article about Midnight Commander
  • From: Will Stephenson <wstephenson@xxxxxxx>
  • Date: Fri, 15 Dec 2006 14:59:20 +0100
  • Message-id: <200612151459.20892.wstephenson@xxxxxxx>
On Friday 15 December 2006 13:24, Hylton Conacher(ZR1HPC) wrote:
> As with most of Linux it aint easy, but it can be done :)
> HOW Can I open documents in the graphical interface ie (Ctrl-Alt-F7)
> from using the cli? True Linuxers use the cli and find it OK, right? So
> why is it so difficult to explain how to open a file in the designated
> viewer?
> Wouild it not be something like $> /document/dir/docname :0 to open the
> document in Ctrl-Alt-F7?

There are 2 steps involved: discover the appropriate viewer for the document,
and open it in the right place.

1) "kfmclient exec /document/dir/docname" starts the appropriate KDE
application for docname's mime type. This follows the settings for that
mimetype in the KDE file associations config module.

2) we set DISPLAY to tell the program to use a given X display.

"DISPLAY=:0 kfmclient exec /document/dir/docname" should do the same thing as
if you had clicked it in KDE for pretty much any file. You can always alias
this if it seems like too much typing.

> If the document was to be opened in Ctrl-Alt-F8 then wouldn't it be
> $> /document/dir/docname :1 ?

Right, substitute :1 for :0 above.
If you are frequently running X on a different you could do some scripting
trickery using the output of who to determine which display to use.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups