editing the fvwm source

Hi all –

I’m still new to all of this, but I have been able to set up a basic fvwm for myself, but now I want to make some changes to the actual source code (not themes, but the actual fvwm.c, menus.c, etc).

So here’s my question: I’ve downloaded a source .rpm file and then unpackaged in onto my computer. Can I just start messing with the code, then run ‘make’ at the root directory of the source, and then do ‘something’ to get the new code installed?

If anyone has any ideas, I would greatly appreciate any help anyone can give me. I know it’s a stupid question… but it’s for work, and I SUCK at this.

What kind of changes? Can you be more specific?

Forgive me for saying so, but if you have to ask this, I question how you’re going to manage to actually add these “new” features to FVWM. All you do need to do though is:

./configure && make 

Assuming you don’t need any FVWM modules, you can then run the resulting fvwm binary in the $SRC/fvwm directrory, without installing it.

If you tell us what you’re trying to do, I can probably help further. You say it’s for work? I hope work adheres to the GPL. Any changes you make, whether your company will profit from them or not must be made publically available.

Bear in mind also, that if you’re planning changes, it’s best to discuss them on the fvwm-workers mailing-list.

– Thomas Adam

Thomas –

Thanks for the reply. Just so no one thinks I have no idea what I am talking about, I have 4.5 years of Java/J2EE – but all my time was spent working on Microsoft boxes, and then winSCPing the code over to a linux box which was running the WebLogic App Server. All I did was use the HTML gui <-- and that was all the linux experience I had until 3 days ago, so I’ve now spent all of 3 days in Linux. And yes, I suck. So, thanks for the pointers on building the binaries - I appreciate it…

Also, as far as I know, all changes made will be made public. Everyone else here is great at Linux… I just hapen to be the newest man, and lowest on the totem pole.

All I need/want to be able to do is to compile the code (after making some changes specific for the products were working on here), grab something called an ‘rpm’ (which I hope is being built in the make file - but I can’t seem to find a reference to it), and then copy that rpm over to a waiting system. Unfortunately, I don’t know how to ‘make’ one of those… and I can’t seem to find a tutorial that applies to someone in my very, very beginner position.

ya, I suck, and am new to this realm of software… so I appreciate any and all comments/help I can get.

thanks,
Skender

My condolences. I am forced to use Java as part of my University course.

That’s OK.

Don’t look at it like that – you’ll be surprised at what you know.

OK. Are you eligable to say which changes these will be? You’ve peaked my curiosity. Oh. One tip I will give you, is before you edit a file to change it, just take a copy of the original file. Here’s an example:

cp ./the_file.c ./the_file.c.orig

That way, by having the original file, you’ll then be able to produce patch sets (“man diff”).

As for the RPM issue, the autoconf process in FVWM allows you to do something like this:

./configure
make <TAB> <TAB>

Where “” denotes you should press the TAB key. Doing so should list options you can pass to the ‘make’ program – assuming you’re using BASH and have bash_completion support. I believe the actual command is something like:

make rpm-dist

But I only ever use deb files.

– Thomas Adam

Ha. Ya, Java can really suck – that’s why I took this new job in c/c++… sorry about your course work.

The changes, in general (because that is apparently all I can say until product release, and then the linux stuff will go public - I just asked my manager about that), are going to be to the way the virtual desktops are accessed and used. Plus, I’ve got to get fvwm to support some functionality ‘hacked’ into twm by my predecessor (we’re moving from twm to fvwm) - this will include compiling the fvwm src to include a corba channel (so, c++ there), with files to support event handling. In general, that’s what’s going on.

hmmm… tried the ‘make dist2’ which gives me a tar ball (closer than I was before), but when I try and make an rpm using any of the following commands taken from the Makefile.ma:

Produce an rpm package using dist or from the given tarball

Usage:

make rpm-dist

make release=1 rpm-dist

make rpm-this

make version=2.3.22 release=2 rpm-this

make rpm-dist cparams=’–enable-multibyte --quiet’ mparams=‘CFLAGS="-O2 -g"’

I get the following error:

==== Creating rpm from /tmp/fvwm-2.4.19.tar.gz, release 0.20050727 ====
-ba: unknown option

and yet again, i am stumped…

thanks in advance,
Skender

:slight_smile: Don’t worry. I still get to use Ruby, in my spare time.

The reason I asked is because I am more than certain that you can probably “access” virtual desktops (for varying values of “Access”) by telling FVWM via its config file, what to do. Adding (possibly) superfluous code into the FVWM core, is not something I’d be pleased about – of course, that’s only dependant on the functionality you have planned.

Well, you might run into problems there. FVWM is written strictly in C and Xlib. C++ even as a module would be a PITA, not to mention near impossible, without re-writing the libs/module_interfaces.c file. Even in the core FVWM stuff, it wouldn’t work, unless you have a bridge betweem the two – again, a lot of work.

Since you’ve also mentioned events, you’ll want to see events.c and virtual.c as well as a host of other files. But I will advise you, that I hold you know Xlib well. It’s quite complex. :slight_smile:

So it was “rpm-dist” – ah, good. You may well need to run that as the root user:

su -c 'make rpm-dist'

– Thomas Adam

Hmmm…

I was root at the time, and I am still getting the error:

-ba: unknown option

The 4th to last line of the /rpm/Makefile says:

rpm -ba tmp-fvwm.spec --clean; \

Which appears to be the only place that says ‘-ba’ in the entire make file…

according to the man pages, rpm has no such option, but rpmbuild does… so I tried chainging the Makefile, but when I ran ./configure && make, it gets rewritten to rpm -ba…

I think that I need to change something in Makefile.am, or Makefile.in.

Skender

Odd. -ba is a valid flag to RPM, AFAIK.

No, you only need to edit “Makefile.am” – the “.in” file is what autoconf generates – which is the command (in conjunction with ‘aclocal’ and friends) you will need to run if you change this file, and then type:

make

in the same directory. If you start removing flags to rpm, because it doesn’t work for you, I can see that leading to more problems, to be honest. What does the rpm manpage “man rpm”, say about the -b flag?

– Thomas Adam

apparently, according to some blogs I just checked, Red Hat (I am running Fedora core 4) removed the -b from rpm, and placed it into rpmbuild, which is apparently what is now being used to build the rpm’s for Red hat:

unfortunately, when I edit Makefile.ma, so that the lines read:
rpmbuild -ba tmp-@PACKAGE@.spec --clean;
rm /tmp/$$tarball;
rm tmp-@PACKAGE@.spec;
instead of:
rpm -ba tmp-@PACKAGE@.spec --clean;
rm /tmp/$$tarball;
rm tmp-@PACKAGE@.spec;\

I get the following error:
==== calling rpmbuild -ba tmp-fvwmspec --clean
error: Legacy syntax is unsupported: copyright
error: line 17: Unknown tag: Copyright: GPL

Thanks again Thomas,
Skender

LOL

Apparently, rpmbuild, used (by only red hat it would appear) has a LICENSE, not a COPYRIGHT - when the HELL did open source starting having licenses? (yes, I am new to open source… but this seems… strange).

Thanks Thomas - seriously, thank you.

If you have any java questions (ha) drop me an email:

mailto:jared@npl.com

cheers,
Skender