MX-21 MX-Fluxbox

Help for MX Fluxbox
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
Jerry3904
Administrator
Posts: 23100
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-21 MX-Fluxbox

#111 Post by Jerry3904 »

Does Brightness Systray work for people with bottom horizontal panels? For me on my Lenovo X! Carbon laptop and using the default tint2rc panel, I get the icon in the systray but when I click it and the "MX Tweak" button shows up in the panel I see something like ">>" at the right end. If I switch to one of the vertical panels, then I see the brightness adjustment screen. Works OK with "graytop" where the brightness adjustment is mostly below the panel.

(Happened to test b/c at 5 am with 3 other people sleeping in this mountain cabin I didn't want to turn on a light.)
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

User avatar
Jerry3904
Administrator
Posts: 23100
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-21 MX-Fluxbox

#112 Post by Jerry3904 »

gennargiu wrote: Tue Sep 14, 2021 6:00 am 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
Hi gennargiu! Can you add some detail? You started with MX-21 Xfce B2, then what? Did you use MX Package Installer to add Fluxbox WM? If yes, what did you do then? Did you run MX Fluxbox using the Xfce menu or rofi (Logo key)? And then what do you mean by "it doesn't work" exactly?
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

User avatar
dolphin_oracle
Developer
Posts: 22096
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-21 MX-Fluxbox

#113 Post by dolphin_oracle »

Jerry3904 wrote: Tue Sep 14, 2021 6:22 am Does Brightness Systray work for people with bottom horizontal panels? For me on my Lenovo X! Carbon laptop and using the default tint2rc panel, I get the icon in the systray but when I click it and the "MX Tweak" button shows up in the panel I see something like ">>" at the right end. If I switch to one of the vertical panels, then I see the brightness adjustment screen. Works OK with "graytop" where the brightness adjustment is mostly below the panel.

(Happened to test b/c at 5 am with 3 other people sleeping in this mountain cabin I didn't want to turn on a light.)
I think fluxbox doesn’t mind starting apps off the screen. The app doesn’t have any screen edge detection built in. It’s supposed to start whoever your mouse is I think but I don’t quite remember. Will check on it
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.

User avatar
Jerry3904
Administrator
Posts: 23100
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-21 MX-Fluxbox

#114 Post by Jerry3904 »

Maybe I misunderstood something.
--I created a new document /etc/apt/apt.conf.d/00exectmp
--pasted in DO's code and saved
--tried to install a package from mxpi, got this error msg at the end

Code: Select all

cat: /tmp/current_user.txt: No such file or directory
E: Problem executing scripts DPkg::Post-Invoke 'user=$(cat /tmp/current_user.txt) && su $user /usr/bin/mxfb-menu-generator'
E: Sub-process returned an error code
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

User avatar
dolphin_oracle
Developer
Posts: 22096
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-21 MX-Fluxbox

#115 Post by dolphin_oracle »

I think You used ppcs code
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.

User avatar
Jerry3904
Administrator
Posts: 23100
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-21 MX-Fluxbox

#116 Post by Jerry3904 »

Yup, told you it was early...

So now it works (@PPC very cool!) I wanted to get rid of this final msg so commented it out in the script in skel--MXFB certainly doesn't need it any more since it's installed by default.

Code: Select all

Please wait, creating menu file - stored in /home/jb/.fluxbox/submenus/full_menu ...

If you want to insert this All categories sub-menu into your MXFB menu:
rootMenu > Settings > Configure > Menu
and insert, anywhere you want, this code:
 [submenu] (All apps)
  [include] (~/.fluxbox/submenus/full_menu)
  [separator] 
  [exec] (Update Menu) {mxfb-menu-generator} 
 [end]

Menu file created and ready to be used
20668
I guess those last two lines will still show.
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

User avatar
ceeslans
Posts: 814
Joined: Sun Apr 14, 2019 3:48 am

Re: MX-21 MX-Fluxbox

#117 Post by ceeslans »

dolphin_oracle wrote: Tue Sep 14, 2021 6:40 am
Jerry3904 wrote: Tue Sep 14, 2021 6:22 am Does Brightness Systray work for people with bottom horizontal panels? For me on my Lenovo X! Carbon laptop and using the default tint2rc panel, I get the icon in the systray but when I click it and the "MX Tweak" button shows up in the panel I see something like ">>" at the right end. If I switch to one of the vertical panels, then I see the brightness adjustment screen. Works OK with "graytop" where the brightness adjustment is mostly below the panel.

(Happened to test b/c at 5 am with 3 other people sleeping in this mountain cabin I didn't want to turn on a light.)
I think fluxbox doesn’t mind starting apps off the screen. The app doesn’t have any screen edge detection built in. It’s supposed to start whoever your mouse is I think but I don’t quite remember. Will check on it
Yeah that'sprobably it. The brightness panel 0x0 position is set relative to the cursor position. see below screenshot composition.
The panel is still draggable though with Alt+lclick keybinding, so all is not lost... But surely rather annoying

Image
Sony Vaio VPCF23P (2011), Intel Core i7-2670, 6gb RAM, 240gb SSD, MX-Linux 23 based Fluxbox v/1.3.7+
Lenovo Thinkpad L560 (2016), Intel Core i5-6200, 16gb RAM, 240gb SSD, Devuan Daedalus based Fluxbox v/1.3.7+

gennargiu
Posts: 19
Joined: Fri Sep 27, 2019 11:51 am

Re: MX-21 MX-Fluxbox

#118 Post by gennargiu »

Jerry3904 wrote: Tue Sep 14, 2021 6:27 am
gennargiu wrote: Tue Sep 14, 2021 6:00 am 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
Hi gennargiu! Can you add some detail? You started with MX-21 Xfce B2, then what? Did you use MX Package Installer to add Fluxbox WM? If yes, what did you do then? Did you run MX Fluxbox using the Xfce menu or rofi (Logo key)? And then what do you mean by "it doesn't work" exactly?
hello and thanks for the prompt reply, I am using the beta 2 version of mx linux 21 with xfce enviroment of series, fluxbox was already added I did not install the windows manager, what does not work in the dock bar at the bottom is the setting manager button, clicking on it does not happen nothing, thanks for your help :) - the mx linux logo works is the key immediately after the wrench key does not work

User avatar
Jerry3904
Administrator
Posts: 23100
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-21 MX-Fluxbox

#119 Post by Jerry3904 »

Thanks. I am traveling this week and can't confirm or look into this until the weekend. Hopefully someone else can help you while I'm gone.
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

PPC
Posts: 362
Joined: Tue Sep 11, 2018 8:22 am

Re: MX-21 MX-Fluxbox

#120 Post by PPC »

Jerry3904 wrote: Tue Sep 14, 2021 7:15 am Yup, told you it was early...

So now it works (@PPC very cool!) I wanted to get rid of this final msg so commented it out in the script in skel--MXFB certainly doesn't need it any more since it's installed by default.

Code: Select all

Please wait, creating menu file - stored in /home/jb/.fluxbox/submenus/full_menu ...

If you want to insert this All categories sub-menu into your MXFB menu:
rootMenu > Settings > Configure > Menu
and insert, anywhere you want, this code:
 [submenu] (All apps)
  [include] (~/.fluxbox/submenus/full_menu)
  [separator] 
  [exec] (Update Menu) {mxfb-menu-generator} 
 [end]

Menu file created and ready to be used
20668
I guess those last two lines will still show.
I'm glad you liked this idea! I think this little tweak makes MXFB act even more "polished"!

Those instructions that were echoed when the user runs the script were put there initially because the "all apps" menu was an extra, that had to be manually placed in the menu... I removed that section and adjusted a bit the output of the script- you can, of course, adjust even more what the script outputs, but I think this version is informative enough to both newbies and hard core users... So here's my suggested mxfb-menu-generator script:

Code: Select all

#!/bin/bash

### mxfb-menu-generator: a tiny script to Create a (non dynamic) fluxbox menu using information on .desktop files, released by PPC, 7/10/2020, under GPLv3
### Modified by MX Linux Devs for use in MX-Fluxbox August 2021

### How to use this script:
### 1. Copy the script below and paste it into your text editor, saving it in your Home as MXFB_menu_generator.sh
### 2. Navigate to that file, right click it > Proprieties > "Permissions" tab > Check the last field, to allow this script to run as a program
### 3. Add the following entry to your menu to access "All Categories" anywhere you want 
#######################################################################################   
#[submenu] (All Apps)
#       [include] (~/.fluxbox/submenus/full_menu) 
#       [separator]
#       [include] (~/.fluxbox/full_menu)
#   [end]
#######################################################################################
### 4.- Now click Menu > All apps > Update menu. Wait for some seconds while the menu is generated

Encoding=UTF-8
#
# i18n - Internationalization
export TEXTDOMAIN=mxfb-menu-generator
export TEXTDOMAINDIR="/usr/share/locale"

CATEGORIES="Accessories Development Games Graphics Internet Multimedia Office System Settings"

echo Please wait, creating/updating menu file - stored in ~/.fluxbox/submenus/full_menu ...
cd $HOME/.fluxbox/
mkdir -p submenus
touch submenus/full_menu
FILE="$HOME/.fluxbox/submenus/full_menu"

#Get system language (to allow localization):
lang=$(locale | grep LANG | cut -d= -f2 | cut -d_ -f1)

#Loop through all .desktop files in the applications folder
for file in /usr/share/applications/*.desktop
do
name1=$(grep -o -m 1 '^Name=.*' $file)
 ### localized menu entries generator (slows the script down, but produces nearly perfect localized menus):
    name2=$name1
	translated_name1=$(grep -o -m 1 "^Name\[$lang\]=.*" $file)
	[ -z "$translated_name1" ] && note="No localized name found, using the original one" || name2=$translated_name1
	#if the desktop file has the string "Desktop Action" simple use the original untranslated name, to avoid using a translation that's not the name of the app, but the action it does
	grep -q "Desktop Action" $file && name2=$name1
    name1=$name2
### end of localized menu entries generator	 

name=$(echo $name1|sed 's/.*\=//') 
command1=$(grep -o -m 1 'Exec=.*' $file)
command=$(echo $command1|sed -E 's/Exec\=//g')
terminal=$(grep -o -m 1 'Terminal=.*' $file)
  if [[ $terminal == *"true"* ]]; then
   command=$(echo xfce4-terminal -e $command1|sed -E 's/Exec\=//g') 
  fi
 categories=$(grep -o -m 1 'Categories=.*' $file)

 nodisplay=$(grep -o -m 1 'NoDisplay=.*' $file)
  if [[ $nodisplay == *"rue"* ]]; then
    Note="not adding this entry to menu because it has a nodisplay flag"
   else
    echo "[exec] ("$name ")" "{" $command "}" $categories
  fi
done > /tmp/list.txt
sort /tmp/list.txt > ~/.fluxbox/pre-global-menu.txt
rm $FILE
#fix for repeated synaptic menu entry- first instance does not run, so, delete it:
sed -i '/{ synaptic }/d' ~/.fluxbox/pre-global-menu.txt

#### Now divide applications into categories:
#This array has all the available .desktop file categories we want to have on the menu (note: the "." is a quick and dirty workaround, so the script ignores entry nr 0):
array1=( . Utility Development Game Graphics Network AudioVideo Office System Settings)
#This array corresponds to the previous one, but it's the "user friendly name" that shows on the menu- NOTE: this can be translated to any language!
array2=( . $CATEGORIES)

#Begin LOCALIZATION OF Category sub-menus to a language - pt, add equivalent section for other languages:
#    if [[ $lang == *"pt"* ]];
#    then
#		array2=( . Acessórios Desenvolvimento Jogos Graficos Internet Multimédia Escritório Sistema 'Definições globais')
#		echo A criar submenus em Português
#    fi
#End LOCALIZATION OF Category sub-menus
    
#Create the header of the file
echo '[begin] (All Categories)' >> $FILE
#Loop through the array- the last number below has to match the number of entries on $array1
for i in {1..9};
do 
 #Create a submenu entry for the current item on $array2
 echo '[submenu] ('${array2[$i]}')'  >> $FILE
#Nested loop to check if the item on the current line of the "pre-global-menu.txt" file matches the current item on $array1, if it matches, add it to the "$FILE" file 
 while read p; 	do
		if [[ $p =~ ${array1[$i]} ]]
			then
				echo $p >> $FILE
		fi
	done <~/.fluxbox/pre-global-menu.txt ;
 echo '[end]' >> $FILE ;	  
done

#Process only entries that don't fit anywhere else:
sed -i '/Utility/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Development/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Game/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Graphics/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/AudioVideo/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Office/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/System/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Settings/d' ~/.fluxbox/pre-global-menu.txt
sed -i '/Network/d' ~/.fluxbox/pre-global-menu.txt

#check if the file is not empty, create last submenu and populate it
file="~/.fluxbox/pre-global-menu.txt"
if [ -s "$file" ]
then 
 note="empty file, do nothing"
else
echo '[submenu] ('Other applications')'  >> $FILE
  while read p; 	do
		echo $p >> $FILE
  done <~/.fluxbox/pre-global-menu.txt ;
echo '[end]' >> $FILE
fi

###Fix menu errors, so Libreoffice, etc, work without errors
delete="%U"
sed -e s/$delete//g -i $FILE
delete="%u"
sed -e s/$delete//g -i $FILE
delete="%F"
sed -e s/$delete//g -i $FILE
delete="%f"
sed -e s/$delete//g -i $FILE
echo ...Menu file was created/updated successfully!

#if fluxbox running, reload menu
pgrep -x fluxbox && fluxbox-remote restart

Edit: I forgot: the current output of running my suggested script is this:
/usr/bin/mxfb-menu-generator
Please wait, creating/updating menu file - stored in /home/demo/.fluxbox/submenus/full_menu ...
...Menu file was created/updated successfully!
3027

Post Reply

Return to “MX Fluxbox Official Release”