Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Launching a custom Windows app when double-clicking a file
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message

Joined: 08 Feb 2005
Posts: 590
Location: Almeria, Spain

PostPosted: Wed Feb 28, 2018 6:53 pm    Post subject: Launching a custom Windows app when double-clicking a file Reply with quote

Since the demise of qtiplot as a free project for versions >, and since good old v0.9.8.9 depends on qt4 and other deprecated packages, it occurred to me to replace my portage-installed instance with the same Windows version (, and then run it through wine (crossover). So, I downloaded the latest Windows free version and installed in ~/Programas/qtiplot- The installation is just a matter of uncompressing a folder (I had previously installed the required python-2.7.x for Windows in the desired bottle). Then, you launch qtiplot.exe in KDE by right-clicking it and selecting "open with wine".

However, my goal was to be able to simply double-click a .qti file (the file type this program creates) in KDE so that qtiplot.exe launched automatically and loaded the file.
I'd like to share with you how I got it to work:

1) I re-created the qti mime type:
user@box ~/.local/share/applications $ cat x-qtiplot.xml
<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="" type="application/x-qtiplot">
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  <comment>QtiPlot document</comment>
  <comment xml:lang="es">documento de QtiPlot</comment>
  <sub-class-of type="text/plain"/>
  <generic-icon name="x-office-document"/>
  <glob pattern="*.qti"/>
  <glob pattern="*.qti.gz"/>

2) I created a working launch-script for qtiplot.exe in its same folder (chmod it with a+x):
user@box ~/Programas/qtiplot- $ cat qtiplot.script
exec "/opt/cxoffice/bin/wine" --bottle "Microsoft Office 2007" --check --wait-children --start "Y:\Programas\qtiplot-\qtiplot.exe" "$@"

3) I re-created a .desktop file for the Windows program:
user@box ~/.local/share/applications $ cat qtiplot-qtiplot.desktop
[Desktop Entry]
Name=QtiPlot Scientific Plotting
Comment=Qt based clone of the Origin plotting package
Exec="/home/user/Programas/qtiplot-" %u
Icon="/home/user/Config/iconos KDE/qtiplot.png"

The Windows version works like a charm so far and is a perfect replacement for me: I have tried non-linear fitting, exporting a plot as SVG or PNG with transparent backgrounds, selecting gentoo-installed fonts for plots...

Hope this info helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum