(Solved) Xsession error with Midori uninstall.

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

(Solved) Xsession error with Midori uninstall.

Post 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?
Last edited by globetrotterdk on 26. Feb 2012, 08:10, edited 3 times in total.
Military justice is to justice what military music is to music. - Groucho Marx
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Xsession error with Midori uninstall.

Post 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, ... ;)
Image
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: Xsession error with Midori uninstall.

Post by gapan »

Delete file /etc/profile.d/lxde.sh
Image
Image
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

Re: Xsession error with Midori uninstall.

Post 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.
Military justice is to justice what military music is to music. - Groucho Marx
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Xsession error with Midori uninstall.

Post 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:

Code: Select all

#chmod +x /etc/profile.d/lxde.sh
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

Re: Xsession error with Midori uninstall.

Post 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.
Military justice is to justice what military music is to music. - Groucho Marx
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Xsession error with Midori uninstall.

Post by mimosa »

I must say I didn't really expect that to work :D

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
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

Re: Xsession error with Midori uninstall.

Post 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.
Military justice is to justice what military music is to music. - Groucho Marx
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Xsession error with Midori uninstall.

Post 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.
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

Re: (Solved) Xsession error with Midori uninstall.

Post by globetrotterdk »

Interesting. BTW, thanks for your quick response to my problem.
Military justice is to justice what military music is to music. - Groucho Marx
Post Reply