WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to add launch flags to an application launcher  (Read 3218 times)

Offline SirFizX

  • Newbie
  • *
  • Posts: 4
How to add launch flags to an application launcher
« on: August 13, 2016, 01:42:45 AM »
I am used to systems with *.desktop files that can be edited to launch applications with flags. For example I would normally edit the .desktop file for chromium to include a line that said chromium-browser --auto-open-devtools-for-tabs. How is this achieved in TC without typing it out in the Terminal each time or writing a separate script for it?

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: How to add launch flags to an application launcher
« Reply #1 on: August 13, 2016, 02:48:39 AM »
Tiny Core uses desktop files. Load the extension and check out /tmp/tcloop. For example, the desktop file for Dillo in dCore when mounted is /tmp/tcloop/dillo/usr/share/applications/dillo.desktop. You could unpack the .tcz, modify the desktop file for your preference and repack for use.

Easier just create a custom menu entry, if your Window Manager supports this.

Or if you keep the extension in OnDemand, modify the OnDemand script. With OnDemand improvements, the same applicaition can be launched repeatedly from OnDemand menu during the same session without difficulty. For example, modifying Dillo to open Google when launched from the OnDemand menu:
Code: [Select]
#!/bin/sh
ondemand -e dillo.sce www.google.com
« Last Edit: August 13, 2016, 02:50:54 AM by nitram »

Offline SirFizX

  • Newbie
  • *
  • Posts: 4
Re: How to add launch flags to an application launcher
« Reply #2 on: August 13, 2016, 09:03:46 AM »
@nitram

Thank you very much.  Have a great day.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How to add launch flags to an application launcher
« Reply #3 on: August 13, 2016, 09:48:06 AM »
I think it should be possible to edit the  Exec=  line of  /usr/local/share/applications/some-app.desktop  and just add it to backup, because *.desktop files are used by the window manager's menu build scripts. This way, in addition to OnDemand execution (uses *.desktop files too), the program options are also used if launched from Wbar and WM's Applications menu. Might be easier than modifying extensions.
Download a copy and keep it handy: Core book ;)