Command is not automatically executed ?

Please post all general support questions for LXDE here.
Locked
duddy67
Posts: 13
Joined: Thu May 06, 2010 9:52 am

Command is not automatically executed ?

Post by duddy67 »

Hi,

I recently removed Pcmanfm and installed Thunar instead.
Everything works fine except I can't setting the desktop wallpaper.

I installed feh to define a wallpaper but each time I restart a
session, the wallpaper jpg image is not loaded and I have a blue background desktop instead. :(

I put the

Code: Select all

@eval `cat ~/.fehbg` 
line in the /etc/xdg/lxsession/LXDE/autostart file but
it doesn't work. I also tried the

Code: Select all

eval `cat ~/.fehbg` &
line in the /etc/xdg/openbox/autostart.sh
file but it doesn't work neither. (command works if I type it in the terminal).

So why this command is not automatically executed ?

Can someone help me ?

Thanks.
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: Command is not automatically executed ?

Post by maces »

Hi,

maybe the script in this post will help you.

maces
duddy67
Posts: 13
Joined: Thu May 06, 2010 9:52 am

Re: Command is not automatically executed ?

Post by duddy67 »

Thanks for your help, but I found a simplest way.
I created a bash script called .wallpaper.sh

Code: Select all

#!/bin/bash
eval `cat /home/login/.fehbg`
then I call this script in the /etc/xdg/lxsession/LXDE/autostart file:

Code: Select all

@/home/login/.wallpaper.sh
and it works!

But I don't why it doesn't if I put:

Code: Select all

@eval `cat /home/login/.fehbg`
directly in the /etc/xdg/lxsession/LXDE/autostart file.
Is the eval command valid in an autostart script ?

Any idea ?
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Command is not automatically executed ?

Post by Marty Jack »

It is the backticks that aren't evaluated in /etc/xdg/lxsession/LXDE/autostart; you are not running a full shell there. It would probably work if you had said sh the command with backticks.
duddy67
Posts: 13
Joined: Thu May 06, 2010 9:52 am

Re: Command is not automatically executed ?

Post by duddy67 »

Mmm, I see.
Thanks for this helpful information. ;)
Locked