You are not logged in.

#1 2008-12-09 04:17:25

draze
Member
Registered: 2008-11-13
Posts: 37

~/.config/openbox/autostart.sh

hello, i have a problem. this is the output of my:

/home/draze/.config/openbox/autostart.sh

. $GLOBALAUTOSTART
feh --bg-scale /home/aqua-blue.jpg
(sleep 2 && pypanel) &

everytime when i login as draze and type startx it logs in with black screen and original theme.

Offline

#2 2008-12-09 04:29:09

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: ~/.config/openbox/autostart.sh

how does your .xinitrc look like?

Offline

#3 2008-12-09 05:36:58

wickedlester
Member
From: Texas, USA
Registered: 2004-07-22
Posts: 144

Re: ~/.config/openbox/autostart.sh

hello draze. make sure you start openbox like this

/usr/bin/openbox-session &

To use the openbox autostart.sh file you need to run openbox as a session. You could also execute the autostart.sh file directly from ~/.xinitrc but I think letting openbox handle it is probably better.

Also, if you want changes to openbox to stay for next login you will need to copy /etc/xdg/openbox/rc.xml to ~/.config/openbox as well as /etc/xdg/openbox/menu.xml to ~/.config/openbox if you want to edit the menu. Hope this helps.

Last edited by wickedlester (2008-12-09 05:41:37)

Offline

#4 2008-12-09 09:03:03

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: ~/.config/openbox/autostart.sh

or simply put

exec openbox-session

in your ~/.xinitrc

Offline

#5 2008-12-09 12:11:25

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: ~/.config/openbox/autostart.sh

That's because gnome-settings-daemon is started in $GLOBALAUTOSTART and gnome-settings-daemon is trying to set the background.
Either:

-comment the first line,
-edit GLOBALAUTOSTART to not include gnome-settings-daemon,
or disable gnome-settings-daemon wallpaper setting through gconf.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#6 2008-12-09 15:18:58

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: ~/.config/openbox/autostart.sh

moljac024 and bangkok_manouel are both right.  i have three comments.

1) any command run before openbox should be in the background (& sign after it)
2) don't _set_ the background with autostart.sh, _restore_ the background with autostart.sh
3) i'm perfectly happy w/o the global autostart stuff

here's my autostart.sh

# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# Run the system-wide support stuff
#. $GLOBALAUTOSTART

# programs to run *before Openbox*
xrdb /home/patrick/.Xdefaults &            # just incase
xcompmgr -cCfF &                           # unstable with new xorg :(
eval `cat $HOME/.fehbg` &                  # restore background
kdeinit &                                  # set up kde
numlockx on &                              # numlock on if it's not

# Programs to launch *after Openbox*
(sleep 3 && conky) &
(sleep 10 && synergys) &

# exec openbox-session in .xinitrc

edit: grammar/spelling

Last edited by brisbin33 (2008-12-09 15:24:27)

Offline

#7 2008-12-09 21:08:47

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

when i put only:
exec openbox-session in ~/.xinitrc with the same autostart.sh, as in my initial post, my openbox starts loading then brings me back to xterm with following:

(==) Log file: "/var/log/Xorg.0.log" Time: time here
(==) Using config file: "/etc/X11/xorg.conf"

(II) Module "ddc" already built-in
Could not find init font path element /usr/share/fonts/Type1, removing from list!

waiting for X server to shut down FreeFontPath: FPE "/usr/share/fonts/misc" refcount is 2, should be 1; fixing.

then brings me back to [draze@draze ~]$

edit: by trying sudo nano /usr/share/fonts/misc, it's empty

Last edited by draze (2008-12-09 21:11:12)

Offline

#8 2008-12-09 21:29:02

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: ~/.config/openbox/autostart.sh

draze wrote:

when i put...  ...openbox starts loading then brings me back to xterm...

i'm guessing by that you mean X crashes with the messages you've shown and you're brought back to init 3.

try commenting out everything in autostart.sh and give `startx` another try.  if you get the same errors, then we may need to see your xorg.conf

i think ...fonts/misc is a directory (so you can't edit it with nano).  try `ls /usr/share/fonts/misc` to see if it's empty

Offline

#9 2008-12-10 00:06:45

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

brisbin33 wrote:

2) don't _set_ the background with autostart.sh, _restore_ the background with autostart.sh

Nevermind, I think I'm following you now.

Could you please explain why, either here or in this thread: http://bbs.archlinux.org/viewtopic.php?id=56416

Edited for spelling

Last edited by monstermudder78 (2008-12-10 00:11:43)

Offline

#10 2008-12-10 01:25:08

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

This is what i have there right now:

#. $GLOBALAUTOSTART
#feh --bg-scale /home/aqua-blue.jpg
(sleep 2 && pypanel) &
eval `cat ~/.fehbg` &

x loads, then in 2 secs my pypanel loads, but not the background.

Last edited by draze (2008-12-10 01:33:13)

Offline

#11 2008-12-10 01:43:24

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

Did you put something in

~/.fehbg

?

Last edited by monstermudder78 (2008-12-10 01:47:11)

Offline

#12 2008-12-10 01:46:18

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

done

thanx to everybody!

Offline

#13 2008-12-10 01:47:02

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

monstermudder78,
it worked with what you wrote before.....

and yes, my ~/.fehbg has feh --bg-scale /home/aqua-blue.jpg

Last edited by draze (2008-12-10 01:49:16)

Offline

#14 2008-12-10 01:48:25

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

What part worked?  I edited my post a couple of times there.

Offline

#15 2008-12-10 01:50:05

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

the part where you told me to un# feh --bg-scale /home/aqua-blue.jpg

Offline

#16 2008-12-10 04:18:35

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

draze wrote:

the part where you told me to un# feh --bg-scale /home/aqua-blue.jpg

So is this what it looks like now?

#. $GLOBALAUTOSTART
feh --bg-scale /home/aqua-blue.jpg
(sleep 2 && pypanel) &
eval `cat ~/.fehbg` &

I think the reason "eval `cat ~/.fehbg` &" didn't work for you is because you need to set the background using

feh --bg-scale /path/to/image.file

from the terminal once, then that information is stored in ~/.fehbg and will be retrieved by

eval `cat ~/.fehbg` &

the next time you restart openbox.

So, what I would recommend is picking one way that you are comfortable with, and use it.  Right now you have two different commands that are trying to do the same thing.  Either feh --bg-scale /home/aqua-blue.jpg & or eval `cat ~/.fehbg` & needs to be commented out.

Offline

#17 2008-12-10 04:33:17

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

What I would do if I were you, (And basically what I have done) is this:

~/.config/openbox/autostart.sh

#. $GLOBALAUTOSTART
feh --bg-scale ~/.wallpapers/current &
(sleep 2 && pypanel) &

Then make the directory ~/.wallpapers

Store all your wallpaper images in ~/.wallpapers.  To set the current wallpaper, just rename one of the images in ~/.wallpapers to current (~/.wallpapers/current).

Offline

#18 2008-12-10 15:00:04

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: ~/.config/openbox/autostart.sh

interesting approach you have there monstermudder with renaming to "current".  i use `eval `cat $HOME/.fehbg`` b/c it's easier to just do whatever you do to the background during your session and know that whatever you logout w/ that's what you'll log in w/.  cleaner and wiki recommended.

the autostart.sh in comment #10 _should_ work.  when i used to use only an autostart.sh (more on that in the next paragraph).  i'd have all my `(sleep && *) &` _after_ the other stuff.  just made [chrono]logical sense to me, but i doubt it's you're problem.

what i do now is put all my initializations in .xinitrc so it looks like this:

#!/bin/sh
# Executed by startx

# pre X set-up stuff
xrdb /home/patrick/.Xdefaults &            # just incase
xcompmgr -cCfF &                           # unstable with new xorg :(
eval `cat $HOME/.fehbg` &                  # restore background
kdeinit &                                  # set up kde
numlockx on &                              # numlock on if it's not

# launch the WM
exec openbox-session                       # openbox
#exec awesome                              # awesome

then my autostart.sh just has the stuff i launch after openbox like this:

# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# Run the system-wide support stuff
#. $GLOBALAUTOSTART

# pre openbox stuff in .xinitrc now

# Programs to launch *after Openbox*
(sleep 3 && conky) &
(sleep 10 && synergys) &

might i recommend that approach, see if it works?

EDIT: monstermudder, i think my above answer is appropriate for your other thread? i set things that are independent of WM (background, xcompmgr, kdeinit) in .xinitrc so it's run no matter what WM i'm using.  then openbox specific stuff is run in autostart.sh.

Last edited by brisbin33 (2008-12-10 15:08:40)

Offline

#19 2008-12-10 15:24:35

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: ~/.config/openbox/autostart.sh

For a simple wallpaper selector--so that you can change your ~/.fehbg easily--make a script

#!/bin/sh
feh -g 640x480 /home/username/wallpaper

Store it somewhere and add this to your ~/.config/openbox/menu.xml

<item label="Wallpaper Selector">
    <action name="Execute"><command>/path_to_script/wallpaper.sh</command></action>
  </item>

This will start up a nice little 640x480 window and you can scroll through your wallpaper with your mousewheel or arrow keys and then pick one and right-click on it and select File->Background->Set Scaled.  This will set your ~/.fehbg file.  I know I posted this somewhere but can't remember where. hmm


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#20 2008-12-10 16:15:44

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

bgc1954 wrote:

For a simple wallpaper selector--so that you can change your ~/.fehbg easily--make a script

#!/bin/sh
feh -g 640x480 /home/username/wallpaper

Store it somewhere and add this to your ~/.config/openbox/menu.xml

<item label="Wallpaper Selector">
    <action name="Execute"><command>/path_to_script/wallpaper.sh</command></action>
  </item>

This will start up a nice little 640x480 window and you can scroll through your wallpaper with your mousewheel or arrow keys and then pick one and right-click on it and select File->Background->Set Scaled.  This will set your ~/.fehbg file.  I know I posted this somewhere but can't remember where. hmm

This is a good idea, the reason I use "current" is because I can remember that easier than the feh command that I may only use once a month, or less.  This is also a nice solution that requires minimal "remembering."

@brisbin:  I looked through your posts in detail last night, and I went through the wiki and man pages also, as well as trying it myself, and this is what I came up with.  Please correct me if I am wrong.
When you run

feh --bg-scale /path/to/image.file

feh simply places

feh --bg-scale /path/to/image.file

into ~/.fehbg, to be read later by

eval `cat $HOME/.fehbg`

The purpose of this, I assume, is to allow the bg to be easily changed from the command line, as well as keeping people out of a config or autostart file when all they want to do is change the bg.

IMO, this just adds another step to the whole process, by sending the command from autostart >> .fehbg >> image, when in fact it could just as easily be autostart >> image.  When all is said and done, the same command is passed to feh, the only change is the extra "eval `cat $HOME/.fehbg`" command.

Now the advantage to the wiki method is the ability to use it from the command line, and now that I see the advantage it may win me over.  However, just saying something is "wiki recommended" without explaining why it is better or right, is guranteed to cause me to rebel and carry on like I have here for the last 5 or 6 posts big_smile

Offline

#21 2008-12-10 16:23:22

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

my autostart.sh:

eval 'cat ~/.fehbg' &
(sleep 2 && pypanel) &

my ~/.fehbg

feh --bg-scale /home/aqua-blue.jpg

my ~/.xinitrc:

exec openbox-session

i don't see what's the problem here.....everything is typed in right, but still my wallpaper doesn't go on. when i tried the following in autostart.sh , it worked fine:

eval 'cat ~/.fehbg' &
feh --bg-scale /home/aqua_blue.jpg &

(sleep 2 && pypanel) &

but neither eval 'cat ~/.fehbg' & , nor feh --bg-scale /home/aqua-blue.jpg work separately for me.

Offline

#22 2008-12-10 16:30:51

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: ~/.config/openbox/autostart.sh

Maybe its just a typo in your post but the line should be eval `cat ~/.fehbg` with the single quote ` under the ~ key not the ' under the " key.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#23 2008-12-10 16:33:45

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: ~/.config/openbox/autostart.sh

draze wrote:

my autostart.sh:

eval 'cat ~/.fehbg' &
(sleep 2 && pypanel) &

my ~/.fehbg

feh --bg-scale /home/aqua-blue.jpg

my ~/.xinitrc:

exec openbox-session

i don't see what's the problem here.....everything is typed in right, but still my wallpaper doesn't go on. when i tried the following in autostart.sh , it worked fine:

eval 'cat ~/.fehbg' &
feh --bg-scale /home/aqua_blue.jpg &

(sleep 2 && pypanel) &

but neither eval 'cat ~/.fehbg' & , nor feh --bg-scale /home/aqua-blue.jpg work separately for me.

First question: Is aqua-blue.jpg really in /home, or is it in /home/<username> ?

Offline

#24 2008-12-10 16:36:24

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

/home /aqua-blue.jpg

Offline

#25 2008-12-10 16:41:08

draze
Member
Registered: 2008-11-13
Posts: 37

Re: ~/.config/openbox/autostart.sh

bgc1954 wrote:

Maybe its just a typo in your post but the line should be eval `cat ~/.fehbg` with the single quote ` under the ~ key not the ' under the " key.

solved my problem

Offline

Board footer

Powered by FluxBB