Clicking the xchat indicator starts a new instance

Bug #1122853 reported by Omer Akram
This bug affects 45 people
Affects Status Importance Assigned to Milestone
XChat Indicator
xchat-indicator (Ubuntu)

Bug Description

If xchat is already running clicking on its messaging menu indicator would start a new instance of the app. it should rather focus the application.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: xchat-indicator 0.3.11-0ubuntu4
ProcVersionSignature: Ubuntu 3.8.0-4.8-generic 3.8.0-rc6
Uname: Linux 3.8.0-4-generic x86_64
ApportVersion: 2.8-0ubuntu4
Architecture: amd64
Date: Tue Feb 12 13:26:28 2013
InstallationDate: Installed on 2013-02-05 (6 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130205)
MarkForUpload: True
 PATH=(custom, no user)
SourcePackage: xchat-indicator
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Omer Akram (om26er) wrote :
Changed in xchat-indicator (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
importance: Undecided → Medium
Changed in xchat-indicator:
status: New → Confirmed
Changed in xchat-indicator (Ubuntu):
status: New → Confirmed
Revision history for this message
Radu Camerzan (raduttzu) wrote :
Revision history for this message
Tigran Gabrielyan (tigrangab) wrote :

Is there any updates on this bug?

Revision history for this message
Joe (joseph-jsd) wrote :

If only I had the knowledge.

Revision history for this message
Oleg (oleg-secondary) wrote :

Looks like xchat-indicator works like it should, the problem is somewhere between messaging menu and xchat (xchat can't use the same instance, it create new one every time you start it, and messaging menu doesn't care)

Here is my workaround

1) open /usr/share/applications/xchat.desktop with a text editor
2) comment line "Exec=...."
3) add new line:
Exec=sh -c "flock -n -x /var/run/lock/xchat.lock -c xchat || xchat --existing -c 'gui show'"

Hope this helps

Revision history for this message
KoRnKloWn (kornklown) wrote :

Your workaround works, but you should note it only works when launching from the shortcut in the application menu (Unity dash), if you open it from the indicator it still launches a new instance.

Unfortunately the indicator most likely has the command hard coded into it so there's probably no way to apply this workaround to it, if anyone has an idea how it would be greate.

Revision history for this message
Oleg (oleg-secondary) wrote :

Indicator will reload modified desktop file after reboot (or at least logout/logon)

The only hardcoded command is "xchat.desktop", so if it works for dash, it should work for indicator either

P.S. I have Ubuntu 14.04, i didn't try this workaround on anything else

Revision history for this message
Acho Arnold (arnold-8) wrote :

@Oleg I created an account here just to say 'THANK YOU FOR THE WORKAROUND'!!
It has helped me alot.

P.S I use ubuntu 14.04

Changed in xchat-indicator (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
Revision history for this message
Lantizia (lantizia) wrote :

Flock doesn't seem to be needed, this worked for me...

sed -i 's/\(--existing \)%U/\1-c '\''gui show'\''/' /usr/share/applications/hexchat.desktop

Essentially it just changes...

hexchat --existing %U


hexchat --existing -c 'gui show'

The '--existing' part is meant to run a URL or a command in an existing copy of HexChat - so the %U is interpreted as a URL it doesn't comprehend so I think that makes the whole '--existing' argument invalid (so it opens a whole new copy, as though '--existing' wasn't specified). But putting '--existing -c' makes it run a command, that command being to bring the window to the foreground.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.