Page 1 of 1
(Solved) Xsession error with Midori uninstall.
Posted: 10. Jan 2012, 11:56
by globetrotterdk
I have replaced Midori with Firefox 9.0.1 on my Salix OS 13.37 LXDE install and am now getting the following x11 error message at boot:
Code: Select all
which: no midori in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin)
What is that all about and how do I stop that error?
Re: Xsession error with Midori uninstall.
Posted: 10. Jan 2012, 16:13
by Shador
It doesn't matter. But probably some *xinitrc* file in /etc or ~ or similar is setting the default browser. It would probably be a good idea to discard which error output for future releases.
Not at hoe atm so can't lookup the exact file. Try grep, find, locate, ...

Re: Xsession error with Midori uninstall.
Posted: 10. Jan 2012, 18:31
by gapan
Delete file /etc/profile.d/lxde.sh
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 12:07
by globetrotterdk
gapan wrote:Delete file /etc/profile.d/lxde.sh
I have reactivated this subject, as I just tried deleting this file on a Dell Latitude D505, and I completely lost my graphical display. I have the same system installed.
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 13:21
by mimosa
Here is the file, which goes in /etc/profile.d/lxde.sh
Code: Select all
#!/bin/sh
if [ -x `which midori` ]; then
export BROWSER=midori
fi
Are you sure that's all you deleted? By the looks of it, doing so should have done what you wanted without undesired side-effects. All it does is check if midori is present, and if it is, sets that as the default browser.
Anyway, I suppose you could try putting the file back! Make sure it's executable:
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 13:58
by globetrotterdk
Freaky!!! Thanks mimosa, that did it. Now I have my desktop back. I recreated the file by booting into the new Salix KDE Live CD.
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 15:03
by mimosa
I must say I didn't really expect that to work
You could try changing "midori" to "firefox" (or perhaps it's "mozilla-firefox" or something like that) and see if that makes the original irritating emssage go away.
I'm left with an itch to understand what actually happened there. How could deleting that file have such a major effect? Maybe the script that calls it fails somehow if it's not there; that surely shouldn't happen. You could also try replacing it with a dummy script, i.e. delete everything except the first line #!/bin/sh
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 16:42
by globetrotterdk
mimosa wrote:You could try changing "midori" to "firefox"
It seems to work fine with "firefox". It also seems to work fine with just the first line included in the script.
Re: Xsession error with Midori uninstall.
Posted: 25. Feb 2012, 16:56
by mimosa
Great!
There's no need now, but another approach occurred to me, namely to create an empty file "midori" in your $PATH somewhere using
touch. It needs to be executable for
which to recognise it, though:
Code: Select all
root[vanilla]# which midori
which: no midori in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
root[vanilla]# touch /usr/bin/midori
root[vanilla]# which midori
which: no midori in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
root[vanilla]# chmod +x /usr/bin/midori
root[vanilla]# which midori
/usr/bin/midori
root[vanilla]#
However, your way is tidier and also more useful, if you need the environment variable $BROWSER for anything.
Re: (Solved) Xsession error with Midori uninstall.
Posted: 26. Feb 2012, 08:58
by globetrotterdk
Interesting. BTW, thanks for your quick response to my problem.