LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fluxbox add rootCommand to init (https://www.linuxquestions.org/questions/linux-newbie-8/fluxbox-add-rootcommand-to-init-909409/)

looop 10-21-2011 03:39 PM

Fluxbox add rootCommand to init
 
Hey I am new in heir.
But not new to linux, but I am quit green using Fluxbox.
So I want to add following commands to the init file:
fbsetbg -l /Pictures/slackware.jpg
setxkbmap dk

I thought I should add this to the init file:
session.screen0.rootCommand: fbsetbg -l /Pictures/slackware.jpg
session.screen0.rootCommand: setxkbmap dk

But when I reboot the system, the lines does not be execute am I do something wrong?

bathory 10-21-2011 04:20 PM

Hi,

First you need to setup your wallpaper running:
Code:

fbsetbg -f /Pictures/slackware.jpg
and then use just:
Code:

session.screen0.rootCommand: fbsetbg -l
Have a look at fbsetbg manpage for more options

Regards

looop 10-21-2011 04:32 PM

Quote:

Originally Posted by bathory (Post 4504716)
Hi,

First you need to setup your wallpaper running:
Code:

fbsetbg -f /Pictures/slackware.jpg
and then use just:
Code:

session.screen0.rootCommand: fbsetbg -l
Have a look at fbsetbg manpage for more options

Regards

That is right, but it does not work

bathory 10-21-2011 04:47 PM

Please define "but it does not work".
What happens when you run "fbsetbg -f /path/to/file" from xterm? Do you see the wallpaper? Does the file ~.fluxbox/lastwallpaper gets created?

looop 10-21-2011 04:53 PM

Sorry, yes
fbsetbg -f /Pictures/slackware.jpg and yes ~/.fluxbox/lastwallpaper get created but when I reboot it does not "reload" the wallpaper

bathory 10-21-2011 05:37 PM

And what happens if you run "fbsetbg -l" from xterm? Do you get your wallpaper?

You may try to use the overlay feature that does the same thing.
Edit ~/.fluxbox/overlay and use:
Code:

background: aspect
background.pixmap: /Pictures/slackware.jpg

and see if it works this way

looop 10-21-2011 05:38 PM

if I run fbsetbg -l yes I get the wallpaper i want

frankbell 10-21-2011 09:03 PM

Rather than trying to answer your question directly, I suggest that you check out the Fluxbox wiki section on backgrounds.

It will answer your questions thoroughly.

The Fluxbox wiki is an excellent resource.

looop 10-22-2011 02:23 AM

I have used the fluxbox wiki, I always check that first, but it can't solved the problem :\

bathory 10-22-2011 03:10 AM

Quote:

Originally Posted by looop (Post 4504994)
I have used the fluxbox wiki, I always check that first, but it can't solved the problem :\

Did you try to set the wallpaper in the ~/.fluxbox/overlay?

looop 10-22-2011 05:21 AM

yes

clifford227 10-22-2011 10:49 AM

Quote:

Originally Posted by looop (Post 4504687)
session.screen0.rootCommand: fbsetbg -l /Pictures/slackware.jpg

The way I set the wallpaper in Fluxbox is this:

'session.screen0.rootCommand: fbsetbg -l' (without the path to the .jpg) in the Init file

Then you need a program to display the wallpaper, I use Esetroot, which is a part of Eterm (but there is a slackbuild for Esetroot at Slackuilds.org, if your using Slack). You can use feh or some other prog, but I couldnt get the aspect to display properly with feh.

Then, in '~/.fluxbox', you need to create a file called' lastwallpaper', with the following:

Code:

wpsetters Esetroot
$aspect $full|/home/user/.fluxbox/backgrounds/pic.jpg|:0.0

backgrounds being the place you put your wallpapers.

Also!

There is a special wallpaper option for the Fluxbox menu file, I have this line in the menu to change wallpapers easily:

Code:

[wallpapers]  (~/.fluxbox/backgrounds) {fbsetbg -u Esetroot -a}
put some wallpapers in ~/.fluxbox/backgrounds', and they should automatically show up in the fluxbox wallpaper sub-menu. If you set the wallpaper through the menu, it should stick on reboot. Works for me.

frankbell 10-22-2011 06:24 PM

What happens when you run "fbsetbg -i"?

Oh, I took a look at your original post:

Quote:

fbsetbg -l /Pictures/slackware.jpg
In init or startup, it should be

Code:

fbsetbg -l ~/Pictures/slackware.jpg
or

Code:

fbsetbg -l /home/[username]/Pictures/slackware.jpg

looop 10-23-2011 04:36 AM

@frankbell thanks mate it work
and thanks to all who helped

frankbell 10-23-2011 06:53 PM

Quote:

Originally Posted by looop (Post 4505709)
@frankbell thanks mate it work
and thanks to all who helped

Cool. Glad I could help and I should have caught that the first time around.


All times are GMT -5. The time now is 06:31 PM.