You are not logged in.

#1 2008-10-16 16:24:43

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

launchy opening EVERYTHING in firefox??

Hey --

I just installed openbox, and to avoide gnome dependencies associated with gnome-do, I installed launchy.

However, it is doing something extremely strange. When I search for an app (lets say, geany), and hit enter, it attempts to open geany with firefox.

Has anyone had this problem?
Ideas on how to fix it?

I found ONE mention of this problem on the launchy bbs, and no one responded to the guy's posts. He's also running arch, btw.

I can post screenshots, if needed.

-- Thanks!

-- Drew

Offline

#2 2008-10-17 03:16:24

bslagowski
Member
Registered: 2008-02-23
Posts: 102

Re: launchy opening EVERYTHING in firefox??

Hey, this also is happening to me.  I gave up and uninstalled it, unfortunately.  If you come up with a solution I'd be interested.

Offline

#3 2008-10-17 04:01:01

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: launchy opening EVERYTHING in firefox??

It's using xdg-open to launch things, right? LyX did this too. And with LyX, xdg-open would start Firefox which in turn would try to launch the file using a plug-in. With LyX I went through and changed all of the launchers to avoid xdg-open.

Offline

#4 2008-10-17 19:37:48

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

mmmmm

launchy source wrote:

[andrew@the-haystack src]$ pwd
/home/andrew/Desktop/launchy-2.1.2/src
[andrew@the-haystack src]$ grep xdg *
plugin_interface.cpp:    //    r = "xdg-open \"" + path + "\" " + args + " 2>/dev/null || sh -c \"" + path + "\" " + args;
plugin_interface.cpp:    r = "xdg-open \"" + path.trimmed() + "\" " + args.trimmed() + " 2>/dev/null || sh -c \"" + path.trimmed() + " "  + args + "\"";
plugin_interface.cpp:   proc.start(QString("xdg-mime"),args);
plugin_interface.cpp:   proc.start(QString("xdg-mime"),args);
[andrew@the-haystack src]$

And, xdg-utils was pulled in as a dependency.
I wonder if we could patch this to avoid xdg?

*Thinks...*

Maybe I'll try this today.... not that I understand what I'm doing, but if I can fix it then great...

Offline

#5 2008-10-17 20:42:33

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

OK
um, well I think I may have somewhat fixed the problem
I removed the references to xdg in that r = statement, and it compiles cleanly and runs programs as you'd expect.
however, i'm not sure if what i've done was actually useful, as i may have killed other functionality with removing xdg.

[andrew@the-haystack ~]$ diff -abB plugin_interface.cpp.edit launchy-2.1.2/src/plugin_interface.cpp
106,107c106,108
<     r = "xdg-open \"" + path.trimmed() + "\" " + args.trimmed() + " 2>/dev/null || sh -c \"" + path.trimmed() + " "  + args + "\"";
<
---
>     // removed xdg-open as it is causing problems on linux
>     //r = "xdg-open \"" + path.trimmed() + "\" " + args.trimmed() + " 2>/dev/null || sh -c \"" + path.trimmed() + " "  + args + "\"";
>     r = "sh -c \"" + path.trimmed() + " " + args + "\"";
[andrew@the-haystack ~]$

Offline

#6 2008-10-17 20:47:52

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

OK, yes I've confirmed that it pretty much kills all the other functionality....

Offline

#7 2008-10-17 21:23:38

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: launchy opening EVERYTHING in firefox??

I just have something like this in my autostart.sh:

export DE=xfce

This fools xdg-open and makes it think that I'm using xfce...  I think you need to have exo package installed for this to actually result in files being opened...

Offline

#8 2008-10-17 23:32:42

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

I just have something like this in my autostart.sh:

export DE=xfce

This fools xdg-open and makes it think that I'm using xfce...  I think you need to have exo package installed for this to actually result in files being opened...

Just tried exporting that variable, recompiled a vanilla launchy, and it didn't help at all :-(

I cleaned up the patch, and it seems to be working for me, for the most part. xdg-open still fails miserable at detecting what it should do with files, but at least it is calling xdg-open again.

QString r;



    //    r = "xdg-open \"" + path + "\" " + args + " 2>/dev/null || sh -c \"" + path + "\" " + args;



    //      r = "xdg-open \"" + path.trimmed() + "\" " + args.trimmed() + " 2>/dev/null || sh -c \"" + path.trimmed() + " "  + args + "\"";

    

   QString path2;

   path2.append("bash -c \"file -L \"" + path.trimmed() + "\"|grep \"ELF\"|| grep \"Bourne\"\""); 

   

   if (proc.execute(path2) == 0)

   {

           r = "sh -c \"" + path.trimmed() + " " + args + "\"";

       }

   else

   {

           r = "xdg-open \"" + path + "\" " + args + " 2>/dev/null";

       }

patch

-- drew

Offline

#9 2008-10-17 23:45:45

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

Offline

#10 2008-10-18 04:07:23

drewbug01
Member
From: chicago
Registered: 2007-04-06
Posts: 85
Website

Re: launchy opening EVERYTHING in firefox??

patch is updated, check the bug report for the most current one
(hint: i accidentally named the two patches the same thing, the new one does not have a description field)

Offline

#11 2008-11-06 21:58:51

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: launchy opening EVERYTHING in firefox??

I have the same issue. Did you find a way to solve the issue drewbug01?

Offline

#12 2008-11-07 00:12:30

bslagowski
Member
Registered: 2008-02-23
Posts: 102

Re: launchy opening EVERYTHING in firefox??

He uploaded the patch. It's attached to his bug report, which was linked just a couple posts above yours ...

Offline

#13 2008-11-07 05:59:00

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: launchy opening EVERYTHING in firefox??

bslagowski wrote:

He uploaded the patch. It's attached to his bug report, which was linked just a couple posts above yours ...

oh..

Offline

#14 2008-11-07 19:10:49

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: launchy opening EVERYTHING in firefox??

forget launchy, "lxpanelcrt run" does the job perfectly!

Last edited by Falstaff (2008-11-07 19:11:36)

Offline

#15 2009-11-10 21:52:44

maryś
Member
Registered: 2009-05-15
Posts: 1

Re: launchy opening EVERYTHING in firefox??

I don't know how to add this patch... Anyone could you help me?

Offline

#16 2009-12-23 18:09:53

steeef
Member
Registered: 2009-12-23
Posts: 4

Re: launchy opening EVERYTHING in firefox??

Had to educate myself on creating my own packages, but I think I got it.


First, make sure you have base-devel and fakeroot installed (sudo pacman -Sy base-devel fakeroot).
Then, create a directory somewhere, cd to it, and create a file called PKGBUILD with the following in it:

# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Contributor: Andrew Burkett <burkett.andrew@gmail.com>
pkgname=launchy
pkgver=2.1.2
pkgrel=1
pkgdesc="Launchy indexes the programs in your start menu and can launch your documents, project files, folders, and bookmarks with just a few keystrokes!"
arch=('i686 x86_64')
url="http://www.launchy.net/"
license=('GPL')
depends=('qt' 'xdg-utils')
makedepends=('gcc' 'boost')
source=("http://downloads.sourceforge.net/launchy/launchy-$pkgver.tar.gz")
md5sums=('235a5ecba34d96c44fc4e69d74fc5817')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  wget -O plugin_interface.cpp.patch http://sourceforge.net/tracker/download.php?group_id=132975\&atid=725839\&file_id=297819\&aid=2175658 || return 1
  cd src
  patch -p0 -i ../plugin_interface.cpp.patch || return 1
  cd ..
  sed -i 's/qmake-qt4/qmake/g' makefile
  make || return 1
  make DESTDIR="$pkgdir" install
}

Basically, this is the PKGBUILD file from the repository, with commands to download the patch and apply it to source before building.

Now, run makepkg. After the package is built, run "sudo pacman -U <pkgname>" to install. Done!

Offline

#17 2009-12-23 20:08:50

steeef
Member
Registered: 2009-12-23
Posts: 4

Re: launchy opening EVERYTHING in firefox??

Hmm. Now Launchy seems to crash on certain executables. Guess I'll switch to gnome-do.

Offline

Board footer

Powered by FluxBB