Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: qg on February 28, 2017, 08:15:01 AM

Title: How to install a custom FLWM
Post by: qg on February 28, 2017, 08:15:01 AM
Hi,

I would like to disable some hot keys from the standard FLWM.
Here is what I have done so far:
- I downloaded the code source for FLWM from github (https://github.com/tinycorelinux/flwm)
- I modified the config.h file to satisfy my needs
- I compiled the code using "./compileit"
- Everything worked and I now have two executable files: flwm and flwm_topside

Now my problem comes from the installation.
I already have flwm_topside installed on my distribution and I can find the "flwm_topside.tcz" file under my tce/optional folder.
I thought it would be a good idea to just replace this "flwm_topside.tcz" by my new executable file flwm_topside after squashing it (mksquashfs). That's what I did but now there is no background, no mouse icon, etc. It's the same as not having a window manager with no background. So that's obviously not the right way to do it.

I have been looking around trying to find the solution to my problem but I couldn't.
How do we install a custom FLWM ?

I thought the problem could come from the following executable files that are missing in my compiled flwm : flwm_topside_initmenu, flwm_topside_makemenu, flwm_topside_menu_common, etc. (found in /usr/local/bin/)
But I can't file these files anywhere.

Thanks in advance

PS: I am using tinycore 7.2
Title: Re: How to install a custom FLWM
Post by: Juanito on February 28, 2017, 09:38:22 AM
First load the old flwm extension, then:
Code: [Select]
$ mkdir /tmp/pkg
$ sudo cp -rp /tmp/tcloop/flwm/usr /tmp/pkg
$ sudo cp flwm /tmp/pkg/usr/local/bin [your new flwm]
$ cd /tmp
$ sudo mksquashfs pkg/ flwm.tcz
Title: Re: How to install a custom FLWM
Post by: qg on February 28, 2017, 11:18:11 AM
Thanks !
It works great  :)
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 27, 2018, 11:35:47 PM
Hi Juanito,
May I ask to deal these issues with core-remaster?
Title: Re: How to install a custom FLWM
Post by: Juanito on June 28, 2018, 05:55:44 AM
Sorry, but I'm not sure what you are asking for?
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 28, 2018, 09:13:20 AM
I have tried to remaster ISO (using core-remaster, mksquashfs). Recompiles flwm_topside
config.h as..
Code: [Select]
#define DESKTOPS 0
#define WMX_MENU_ITEMS 0
#define XTERM_MENU_ITEM 0
and put it in flwm_topside.tcz; remastered ISO. Now no arrow head mouse pointer and other issues.
Using tinycore9.x
Title: Re: How to install a custom FLWM
Post by: Juanito on June 28, 2018, 09:51:52 AM
Does your modified flwm work without remastering?
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 28, 2018, 10:33:42 AM
Compiled flwm_topside from
https://github.com/tinycorelinux/flwm
Extracted flwm_topside.tcz from iso, unsquashed and replaced 'flwm_topside', repackaged .tcz, and replaced it.
Title: Re: How to install a custom FLWM
Post by: Pats on June 28, 2018, 10:56:14 AM
Dunno , if following links abt permision problems , missing files in remastering  are of any help :

http://forum.tinycorelinux.net/index.php?topic=13716.0

http://forum.tinycorelinux.net/index.php?topic=15411.0

Also if Xorg , then ggl Pendrive dot com - Mouse pointer disappears problem.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 29, 2018, 04:18:29 AM
Hi Juanito,
I followed following command to create a new 'flwm_topside' to put in 'flwm_topside.tcz'
Code: [Select]
tc@box:~$ tce-load -iw git fltk-1.3-dev Xorg-7.7-dev sstrip compiletc man
tc@box:~$ git clone http://git.tinycorelinux.net/flwm
tc@box:~$ cd flwm
tc@box:~$ g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti -shared -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
tc@box:~/flwm$ sstrip ./../new_flwm_topside
Note: Here is have used "-shared" option is g++ command to avoid errors.
Then changed the permission of 'new_flwm_topside'
Code: [Select]
tc@box:~$ sudo chmod 755 new_flwm_topside
Then, Extracted 'flwm_topside.tcz' from TC-ISO file and unsquashfs it.
Code: [Select]
tc@box:~$ unsquashfs flwm_topside.tcz
tc@box:~$ sudo rm flwm_topside.tcz
Then copied 'new_flwm_topside'..
Code: [Select]
tc@box:~$ sudo cp new_flwm_topside  ./squashfs-root/usr/local/bin/flwm_topside
Then repackaged 'flwm_topside.tcz'
Code: [Select]
tc@box:~$ mksquashfs ./squashfs-root/ flwm_topside.tcz
And finally replaced 'flwm_topside.tcz' in ISO file.
Title: Re: How to install a custom FLWM
Post by: Juanito on June 29, 2018, 04:22:56 AM
does it work?
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 29, 2018, 04:41:24 AM
Not worked!
No arrow head mouse pointer. No title bar on GUI windows.
Title: Re: How to install a custom FLWM
Post by: Juanito on June 29, 2018, 05:23:55 AM
I would suggest that, once you have recompiled flwm and without rebooting:

* overwrite the extension symlink /usr/local/bin/flwm with your newly compiled flwm
* exit to the console prompt
* startx

..this will show whether the problem is with your recompiled flwm or with repackaging/remastering.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 29, 2018, 05:59:24 AM
May I ask the correct command make a symlink? is it
Code: [Select]
ls -s ??
Title: Re: How to install a custom FLWM
Post by: Juanito on June 29, 2018, 06:13:04 AM
Yes, "sudo ln -s", but no need to remake a symlink,  just overwite the existing symlink with your actual recompiled file.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 29, 2018, 06:34:43 AM
Used command for symlink
Code: [Select]
sudo rm /usr/local/bin/flwm_topside
sudo ln -s /home/tc/new_flwm_topside /usr/local/bin/flwm_topside
Exited to command prompt, then
Code: [Select]
statxDispaly with black background, no mouse pointer. Yes Wbar is there.
Title: Re: How to install a custom FLWM
Post by: curaga on June 29, 2018, 01:11:13 PM
It doesn't start because you made it a shared library with "-shared", not a binary.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 29, 2018, 11:30:05 PM
Hi Curaga,
Without "-shared" generating errors...
Code: [Select]
/tmp/ccnotk6r.ltrans4.ltrans.o: In function `request_menu_refresh(int)':
<artificial>:(.text+0xb): undefined reference to `wmx_time'
/tmp/ccnotk6r.ltrans4.ltrans.o: In function `arg(int, char**, int&)':
<artificial>:(.text+0x15a): undefined reference to `fl_open_display()'
<artificial>:(.text+0x16a): undefined reference to `fl_display'
<artificial>:(.text+0x172): undefined reference to `XGetVisualInfo'
<artificial>:(.text+0x17c): undefined reference to `fl_visual'
<artificial>:(.text+0x18c): undefined reference to `Fl::fatal'
...
/tmp/ccnotk6r.ltrans3.ltrans.o: In function `Frame::draw()':
<artificial>:(.text+0x179): undefined reference to `Fl_Window::draw()'
/tmp/ccnotk6r.ltrans3.ltrans.o: In function `Frame::set_size(int, int, int, int, int)':
<artificial>:(.text+0xa09): undefined reference to `XSync'
collect2: error: ld returned 1 exit status
And with this command
Code: [Select]
tc@box:~/flwm$ g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_f
orms.so.1.3 /usr/local/lib/libfltk.so.1.3  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
The errors are...
Code: [Select]
/usr/local/bin/ld: /tmp/ccgYXdlb.ltrans0.ltrans.o: undefined reference to symbol 'XConfigureWindow'
/usr/local/lib/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Please guide, what am I missing?
Title: Re: How to install a custom FLWM
Post by: Rich on June 30, 2018, 12:27:47 AM
Hi ipmeel
Try adding:
Code: [Select]
-lX11to your command.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 30, 2018, 01:42:28 AM
Hi Rich,
Thank you very much for the hit...
Only adding "-lX11" to command has not worked.
Following command worked for me..
Code: [Select]
g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_forms.so.1.3 /usr/local/lib/libfltk.so.1.3 /usr/local/lib/libX11.so.6.3.0  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
and this also worked
Code: [Select]
g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_forms.so.1.3 /usr/local/lib/libfltk.so.1.3 -lX11  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
The new "flwm_topside" is working fine with modified "./flwm/config.h" as
Code: [Select]
#define DESKTOP 0
But when "./flwm/config.h" is modified as (either or both)..
Code: [Select]
#define WMX_MENU_ITEMS 0
#define XTERM_MENU_ITEM 0
Result: no title bar on GUI windows.
Also may I ask how to disable "Ctrl+Esc" for closing/terminating GUI apps.
Title: Re: How to install a custom FLWM
Post by: Pats on June 30, 2018, 09:16:45 AM
Quote
Also may I ask how to disable "Ctrl+Esc" for closing/terminating GUI apps.


Short-cut do'nt know.

Posible solution may be :
1) use xmodmap, which maps keys , and xev, which traps key events and prints to the screen. Xev shows mappings for each key pressed. Need to change the .xmodmap file, in /home directory. If not there ,  create one or you can find it in /etc/x11, however, altering this file will change the system for every user.....

2) xbindkey allows advanced mapping of keysyms to actions independently of the Desktop Environment.
Title: Re: How to install a custom FLWM
Post by: ipmeel on June 30, 2018, 04:34:01 PM
Hi Pats,
Successfully used xmodmap. Thank you very much for help.
Quote
Result: no title bar on GUI windows.
resolved by editing *.C files.