← Back to team overview

unity-api-bugs team mailing list archive

[Bug 1367871] Re: ubuntu-app-launch doesn't pass arguments to the executable

 

The tricky thing about app confinement, is that command line arguments
and environment variables aren't really a good mix for it. An "app" is
completely separate from the rest of the system, in the click package
world. There are some hooks in click to set up symlinks or such, for
other parts of the system to be able to easily find those apps, such as
ubuntu-app-launch and the apps scope. But they are not command line
applications, and you can't simply just run them from the command line
with arbitrary configuration.

For running the tests multiple times on the same server or workstation,
with different screen sizes for each test, the best solution would
probably be to have something like xvfb or Xnest, for Mir, where a
display surface is created at a specific pixel size, and with a specific
grid units ratio, to match different pieces of hardware.

-- 
You received this bug notification because you are a member of Unity API
bugs, which is subscribed to Ubuntu Application Launcher.
https://bugs.launchpad.net/bugs/1367871

Title:
  ubuntu-app-launch doesn't pass arguments to the executable

Status in Autopilot:
  New
Status in Ubuntu Application Launcher:
  Won't Fix
Status in Ubuntu UI Toolkit:
  New

Bug description:
  Many applications currently use command line arguments to run in
  different modes. For example, we have reminders that receives -s to
  start using the sandbox, and some other arguments to decide the
  geometry of the app if it's being run on a platform that has a screen
  big enough.

  The problem is that when launching the app with ubuntu-app-launch
  reminders -s, that -s will be dropped. u-a-l will just execute the
  exec line on the desktop file. So if we need to launch evernote with
  the sandbox, we will need to write a different desktop file.

  I find it really useful to be able to launch applications with
  different modes by passing an argument. It makes it really simple to
  test the different modes on the same manual testing session. It also
  makes it simple to automate tests that require certain conditions, for
  example running the same tests twice on desktop, once in landscape
  mode and once in portrait mode; that way we will reduce the number of
  errors we find while running on the real hardware.

  We even have a handler for arguments on our API: http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Components.Arguments/
  So it seems that we are encouraging the apps to use it. But then we are not able to launch them easily with those arguments.

  Ted thinks that UI apps shouldn't receive command line arguments, and
  that we should remove that from the API. (I'll ping Ted to comment on
  this bug so he talks for himself, I might have missed some details on
  this statement).

  Some alternatives are:
  - to write desktop files for each argument on the fly during automated tests.
  - to include desktop files for alternate modes on the click packages.
  - use environment variables instead of arguments.

  I'm reporting this bug so we can discuss about the best approach.

To manage notifications about this bug go to:
https://bugs.launchpad.net/autopilot/+bug/1367871/+subscriptions


References