unity launcher does not handle apps launched from shell scripts correctly

Bug #765466 reported by Rocko on 2011-04-19
170
This bug affects 33 people
Affects Status Importance Assigned to Milestone
BAMF
Low
Marco Trevisan (Treviño)
Unity
Fix Released
Low
Marco Trevisan (Treviño)
unity-2d
Undecided
Unassigned
bamf (Ubuntu)
Undecided
Marco Trevisan (Treviño)
unity (Ubuntu)
Low
Marco Trevisan (Treviño)

Bug Description

Binary package hint: unity

If I launch a Java app from, says, a bash script, unity shows an icon for the application and allows me to tick 'keep in launcher'. However, after the application closes, clicking on the unity-launcher icon for the application does not launch it. The icon flashes for a while but no error is reported and the application does not run.

If I use a .desktop file to specify the bash script and add this to the unity-launcher, clicking on the icon does launch the script but unity-launcher displays a new icon for it (ie it can't connect it to the window that is launched).

DockbarX includes the ability to edit the window identifier for each application so that the above works correctly, but unity-launcher doesn't seem to have anything like this.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unity 3.8.8-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,move,resize,mousepoll,imgpng,vpswitch,dbus,thumbnail,grid,regex,snap,place,compiztoolbox,gnomecompat,animation,session,wall,kdecompat,expo,ezoom,workarounds,staticswitcher,fade,scale,unityshell]
Date: Tue Apr 19 11:17:28 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100602.2)
ProcEnviron:
 LANGUAGE=en_AU:en
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: unity
UpgradeStatus: Upgraded to natty on 2011-04-13 (5 days ago)

Related branches

Rocko (rockorequin) wrote :
Bilal Akhtar (bilalakhtar) wrote :

Related to bug #751909

Alex Launi (alexlauni) on 2011-05-04
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
importance: Undecided → Low
Changed in unity (Ubuntu):
importance: Undecided → Low
Changed in bamf:
status: New → Confirmed
importance: Undecided → Low
Didier Roche (didrocks) on 2011-05-30
Changed in bamf (Ubuntu):
status: New → Confirmed
Didier Roche (didrocks) on 2011-05-31
Changed in unity-2d:
status: New → Confirmed

Also related to #753305

Im with same problem. http://i.imm.io/6YeV.png Proves this with Maple and Mathematica. Also, even with same Icon, the new process got a new "Java" icon. So i think Unity cant track graphic apps launched from scripts.

Gabe Gorelick (gabegorelick) wrote :

Any workarounds for this? Is there something that can be done in the shell script or .desktop file?

David Williams (david-williams) wrote :

In comment 5, Gabe asks about workarounds, in my just duplicated bug 899333 a workaround for my simple use-case was to directly use

Exec=gnome-terminal -x testmenu.sh

instead of the desired

Terminal=true
Exec=testmenu.sh

I'm sure that wouldn't work for everyone (have only skim read the other use-cases in this bug) and is not a great long term solution ... but, thought I'd share what little I know.

I have had the same problem with running PhpStorm, but it works most of the time now when using a .desktop file...
The only problem is wen hovering the tooltip is empty after a while, and there's also en empty entry in the right click menu, where the window name should be...

Leon (leonbo) wrote :

Same problem here with vim

Vladimir Kravets (vova-kravets) wrote :

It seems already fixed for such desktop file is not reproduce anymore in Plank:

[Desktop Entry]
Version=1.0
Type=Application
Name=Idea Jetbrains Leda
Comment=
Exec=bash -c "export JAVA_HOME=/home/sly-arch/opt/jdk1.8.0; /home/sly-arch/opt/IDEA12/bin/idea.sh"
#Exec=bash -c "/home/sly-arch/opt/IDEA12/bin/idea.sh"
Icon=/home/sly-arch/opt/IDEA12/bin/idea.png
Path=
Terminal=false
StartupNotify=true

Changed in unity-2d:
status: Confirmed → Won't Fix
Changed in bamf (Ubuntu):
status: Confirmed → In Progress
Changed in unity (Ubuntu):
status: Confirmed → In Progress
Changed in bamf:
status: Confirmed → In Progress
Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: Confirmed → In Progress
milestone: none → 7.1.2
Changed in bamf:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in bamf (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in bamf:
milestone: none → 0.5.0
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:bamf at revision 577, scheduled for release in bamf, milestone 0.5.0

Changed in bamf:
status: In Progress → Fix Committed

Marco, will this fix be "transparent" for users? Just use shell script and Unity will track any X application spawned by this script?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bamf - 0.5.0+13.10.20130809-0ubuntu1

---------------
bamf (0.5.0+13.10.20130809-0ubuntu1) saucy; urgency=low

  [ Marco Trevisan (Treviño) ]
  * BamfApplication: include Path in .desktop file if its working dir is
    not the default one. (LP: #765466)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 577
 -- Ubuntu daily release <email address hidden> Fri, 09 Aug 2013 02:02:21 +0000

Changed in bamf (Ubuntu):
status: In Progress → Fix Released
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity at revision 3458, scheduled for release in unity, milestone 7.1.1

Changed in unity:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.1.0+13.10.20130812.1-0ubuntu1

---------------
unity (7.1.0+13.10.20130812.1-0ubuntu1) saucy; urgency=low

  [ Brandon Schaefer ]
  * Add ibus.py to the tests/autopilot/unity/emulators from
    lp:autopilot. (LP: #1210661)
  * Don't make the ScopeView/DashView/ScrollView Visible on start up
    (bool wise, causing things to think its ok to render). (LP:
    #1201631)
  * Adds the ability to use the mouse in the switcher. (LP: #824965)

  [ Andrea Azzarone ]
  * Add edge barriers to unity::panel::PanelView. (LP: #931384)

  [ Marco Trevisan (Treviño) ]
  * ApplicationLauncherIcon: Create a local desktop file when sticking
    an app that has not Also make icon sticky only if both the icon
    itself and the inner app is sticky as well. (LP: #1209320, #753305,
    #765466, #754334, #704046)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 3462
 -- Ubuntu daily release <email address hidden> Mon, 12 Aug 2013 06:49:01 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released

Fix Released in Bamf BAMF 0.5.0.

Changed in bamf:
status: Fix Committed → Fix Released
Stephen M. Webb (bregma) on 2013-10-10
Changed in unity:
milestone: 7.1.2 → 7.1.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers