MX-21 MX-Fluxbox
Re: MX-21 MX-Fluxbox
I've been trying to create a hook up to apt to automaticaly update the "all apps" menu every time a package is installed/removed...
I've found out how to create the hooks up, but it tries to generate the config file in the root folder, not in the user's home...
Before I dig deeper into this... Is there any interest from the Dev team to include such kind of hook up? It would make the fluxbox menu more intuitive to use...
P.
I've found out how to create the hooks up, but it tries to generate the config file in the root folder, not in the user's home...
Before I dig deeper into this... Is there any interest from the Dev team to include such kind of hook up? It would make the fluxbox menu more intuitive to use...
P.
Re: MX-21 MX-Fluxbox
Good thought, thanks, but I think we have that already covered in the startup file.
Code: Select all
#update app menu if it doesn't exist
if [ ! -f $HOME/.fluxbox/submenus/full_menu ]; then
command -v mxfb-menu-generator && mxfb-menu-generator
fi
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: MX-21 MX-Fluxbox
@Jerry3904 : yes, that script in the startup file creates a full menu, if none is found, but does not automaticaly update it, if the user add/removes some package, that's why I got interested in apt hook ups..., so the "all apps" menu is dynamic...
P.
P.
Re: MX-21 MX-Fluxbox
Give it a shot so we can test it -- thanks.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: MX-21 MX-Fluxbox
@Jerry3904 .
It took some trial and error and a lot of web searching...
Here is how I got a dynamic "all apps" menu:
1- Add to the startup file this command, to log the user name:
2- Edit /etc/apt/apt.conf.d/00exectmp and add this hook:
I tested this, using apt to first install "mutt" - the menu updated and the app appeared in my menu > all apps > internet
I purged "mutt" and the app was removed from my "all apps" menu
This seems to work, but, please, do test this extensively before trying to implement it...
Also I would like a better way to store the "regular" user that is in the system before running "sudo", I'm not that confident in using such volatile place as the /tmp/ folder...
(note1: I tried adding DPkg::Pre-Invoke {"whoami > /tmp/current_user.txt";}; that would be ideal- getting the user right before running apt... but it does not work.
note2: If you don't run the post-invoke as a regular user, the menu generator will error out because it's trying to create files in the root home folder...)
P.
It took some trial and error and a lot of web searching...
Here is how I got a dynamic "all apps" menu:
1- Add to the startup file this command, to log the user name:
Code: Select all
whoami > /tmp/current_user.txt
Code: Select all
DPkg::Post-Invoke {"user=$(cat /tmp/current_user.txt) && su $user /usr/bin/mxfb-menu-generator";};
I purged "mutt" and the app was removed from my "all apps" menu
This seems to work, but, please, do test this extensively before trying to implement it...
Also I would like a better way to store the "regular" user that is in the system before running "sudo", I'm not that confident in using such volatile place as the /tmp/ folder...
(note1: I tried adding DPkg::Pre-Invoke {"whoami > /tmp/current_user.txt";}; that would be ideal- getting the user right before running apt... but it does not work.
note2: If you don't run the post-invoke as a regular user, the menu generator will error out because it's trying to create files in the root home folder...)
P.
- dolphin_oracle
- Developer
- Posts: 22100
- Joined: Sun Dec 16, 2007 12:17 pm
Re: MX-21 MX-Fluxbox
should be able to use the "logname" command to get the user name. @PPC
Code: Select all
DPkg::Post-Invoke {"su $(logname) /usr/bin/mxfb-menu-generator";};
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: MX-21 MX-Fluxbox
@dolphin_oracle
Man... I should have "googled" a bit more! Thanks, DO, the hook up is perfect, no need to add anything to the start up file, now!
If this is implemented, I think MXFB menu + rofi to search for apps are enough for my needs, I can remove xfce's file search, and stick with a more "pure" fluxbox setup
Many thanks for the tip!
And I hope this hook up is approved to be in the final MXFB... it probably is a nice feature, most people expect apps that were installed to magically appear in the menu- they have no idea of the work that's behind that!
P.
Man... I should have "googled" a bit more! Thanks, DO, the hook up is perfect, no need to add anything to the start up file, now!
If this is implemented, I think MXFB menu + rofi to search for apps are enough for my needs, I can remove xfce's file search, and stick with a more "pure" fluxbox setup
Many thanks for the tip!
And I hope this hook up is approved to be in the final MXFB... it probably is a nice feature, most people expect apps that were installed to magically appear in the menu- they have no idea of the work that's behind that!
P.
Re: MX-21 MX-Fluxbox
I also spiced up the "simple weather" "script" that shows the weather, using wtt.in
This script has to be tested, and needs a fail safe, for when the detected place does not exist in wtt.in database...
This does a better job at finding exactly where you are, and displays the weather in your language:
Enjoy
P,
This script has to be tested, and needs a fail safe, for when the detected place does not exist in wtt.in database...
This does a better job at finding exactly where you are, and displays the weather in your language:
Code: Select all
#! /bin/bash
geoip="$(wget -O- -q http://geoip.ubuntu.com/lookup)"
area="$(sed -r 's/.*<RegionName>(.*?)<\/RegionName>.*/\1/g' <<< $geoip)"
corrected_area=$(echo "${area// /_}")
echo $corrected_area
langu=$(locale | grep LANG | cut -d= -f2 | cut -d. -f1)
l1=$(echo $langu |cut -d_ -f1)
curl http://wttr.in/$corrected_area?lang=$l1
P,
Re: MX-21 MX-Fluxbox
Thanks, we'll give it all a test!
DO and others may be more use than I will be...
DO and others may be more use than I will be...
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: MX-21 MX-Fluxbox
Hi i have a problem with fluxbox and application setting manager. it don't work. I used version beta 2 xfce enviroment and switch at fluxbox from exit session. Many thanks for your help me and best regards from Naples (Italy)
gennaro
gennaro