Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

symlinks

News about upgrades

symlinks

Postby OU812 on Fri Jul 04, 2008 10:48 pm

Hello. Anti and I would like to have different wallpapers for each wm. I wrote to the author of nitrogen to see if this was possible. This is what he sent me:

nitrogen itself does not support such a thing, it always looks in
~/.config/nitrogen/bg-saved.cfg for the list of items to restore. I
could perhaps modify nitrogen so that it will accept an argument to tell
it where to look for the saved items, but this is a rather specific use
that not many other users will have.

I have an idea that might work (outside of nitrogen). You could
maintain two separate files in ~/.config/nitrogen, named
bg-saved-icewm.cfg and bg-saved-fb.cfg, and in the startup scripts for
each of the different wms, create a symbolic link from the existing file
to bg-saved.cfg. That way, nitrogen will always read the correct file
for which wm you are in, and it also has the added bonus of being able
to just run nitrogen normally and have any changes saved to whatever
file is currently symlinked to bg-saved.cfg.

I get what he's saying, but I don't know how to do the symlink part. Any ideas?

john
OU812
 
Posts: 479
Joined: Sat Sep 29, 2007 9:12 pm
Location: California

Postby eriefisher on Fri Jul 04, 2008 11:24 pm

I think I understand him but I will need to download the iso and check out the script before I can be sure. I will try to figure it out.
eriefisher
------------------------------------------------------------
If I knew It was this good I would have been "Anti" everything long ago.

The first thing a I met was a fly with a buzz......America
User avatar
eriefisher
 
Posts: 712
Joined: Sun Oct 07, 2007 6:16 pm
Location: Canada's South Coast

Postby OU812 on Mon Jul 07, 2008 6:47 pm

Well, through a lot of trial and error, I think I got the symlink thing figured out (well, there is more than one way to create a symlink and I've figured out two of them). So I created a symlink in the icewm startup script to the nitrogen config file, and a similar symlink in the fluxbox startup file. Then I logged in to icewm and used nitrogen to set the wallpaper. Unfortunately, even though I was in icewm, changing the wallpaper in icewm affected all symlinks to the nitrogen config file; i.e., the fluxbox symlink was affected also. So, I don't know if it's possible to have nitrogen set two different wallpapers. Also, I haven't had further contact from the developer of nitrogen for other avenues to explore. (The only thing I could still do is check the goblinx livecd and see how they managed to get different wallpapers for each of their window managers.)

There is one other possibility, at least for now. Since fb is the default wm of this distro, put

Code: Select all
nitrogen --restore &

in the fluxbox startup file. This will reflect any changes a user makes using the control center.

For icewm, have this statement included in the startup file but commented out. Also include in the comments that uncommenting will result in both wm's using the same wallpaper. So that means that the default style in icewm - AntiX - will be used to display the "default" wallpaper.

There is one or two more experiments I am willing to try. If they don't work, then we'll have to use the aforementioned approach and live with the "side-effects."

john
OU812
 
Posts: 479
Joined: Sat Sep 29, 2007 9:12 pm
Location: California

Postby eriefisher on Tue Jul 08, 2008 12:05 am

What about Gsetroot for handling wallparer?
eriefisher
------------------------------------------------------------
If I knew It was this good I would have been "Anti" everything long ago.

The first thing a I met was a fly with a buzz......America
User avatar
eriefisher
 
Posts: 712
Joined: Sun Oct 07, 2007 6:16 pm
Location: Canada's South Coast

Postby OU812 on Tue Jul 08, 2008 3:00 am

gestroot, esetroot, xli are not included on the iso. However, feh is. This should probably be used since it's already on the iso and the way themes in icewm can display wallpapers is not ideal.

john
OU812
 
Posts: 479
Joined: Sat Sep 29, 2007 9:12 pm
Location: California

Postby thinkpada21 on Wed Jul 09, 2008 6:09 am

It is possible that nitrogen does something like:
Code: Select all
mv bg-saved.cfg bg-saved.cfg.bak

to make a back up of the previous settings. Usually this is a good thing, however, with bg-saved.cfg as a symbolic link to another file, it just defeats the purpose of the symlink.

You could write code that checks if bg-saved.cfg is still a link. If it is not:
Code: Select all
mv $x $x.bak; mv bg-saved.cfg $x

where $x is set to what bg-saved.cfg.bak points to, will fix it.
thinkpada21
 
Posts: 39
Joined: Thu Sep 13, 2007 4:34 am


Return to Development

Who is online

Users browsing this forum: No registered users and 0 guests