Forum › Forums › Official Releases › antiX-19 “Marielle Franco, Hannie Schaft, Manolis Glezos, Grup Yorum, Wobblies” › taskbar editor problem
- This topic has 11 replies, 3 voices, and was last updated May 26-9:08 pm by roland.
-
AuthorPosts
-
May 24, 2021 at 3:28 pm #60026Member
roland
I was recently introduced to the useful taskbar editor, so I set up some often-used icons in there. However a problem surfaced with Ceni, 2 optional paths are offered, but neither actually work and the template fails to appear. I have Rxvt next to it which does appear and does work. I checked out the paths and both appear valid. Only trivial I agree, but such things sometimes conceal others.
paths are :- /home/roland/.local/share/applications/TCM/Ceni-1611504283.desktop
/usr/share/applications/ceni.desktopThere is a desktop icon file in each specified location. I am using 8 taskbar buttons and 8 workspace buttons.
May 24, 2021 at 4:24 pm #60030MemberPPC
::I tested using TIM to add “/usr/share/applications/ceni.desktop” and the icon was added, but didn’t launch ceni. I opened ceni.desktop and found out why- the .desktop file launches ceni using “su-to-root” that (for some reason that I won’t debug right now) does not work when added directly to the toolbar by TIM… To solve that problem do this:
-launch TIM, select “Advanced” > Click “yes” > the toolbar configuration file is opened for edition.
-find the line that starts with prog “Ceni”, and edit it, adding
x-terminal-emulator -e
before the command that runs ceni (after the path to the icon), give a space and then put the entire command that runs ceni between double quotes.You’ll end up with a line that looks similar to this:
prog "ceni" /usr/share/icons/papirus-antix/24x24/apps/ceni.png xterminal-emulator -e "su-to-root -c /usr/sbin/Ceni"-Save the text file and restart icewm. Ceni’s toolbar icon should work now…
PS: TIM is not a perfect tool, I developed it because there was no GUI way to add icons to the toolbar- for problematic cases, such as this, it’s best to edit manually the toolbar config file- that is also the fastest way to move icons to more than one position away from the current position- just cut the line that refers to the icon and paste it exactly where you want it…
EDIT: when I was developing TIM I tested dozens of icons, and they all worked- without exception, when I finished the script. The worst that I considered could happen was, if you were trying to add an application that, for some reason, TIM could not find a suitable icon, it would display an “gears” icon- and the user could then use the “advanced” menu to edit the icon path and add the correct one.
I tested cli apps, like htop, and they worked… I never tested Ceni because I haven’t used it in a very long time.
This problem should only happen when you are trying to add cli applications, that are started in a way other than being launched using the default terminal (or any other terminal, installed in your system).
This solution of adding “xterminal-emulator -e ” forces antiX to run the command that is next to it in the default terminal emulator, so, that “fix” should work in all cli tools that are not correctly added to the toolbar by TIM.P.
- This reply was modified 1 year, 11 months ago by PPC.
- This reply was modified 1 year, 11 months ago by PPC.
May 25, 2021 at 12:16 am #60084Anonymous
::Roland, toward troubleshooting the issue.
What is the Exec= launchstring for that .desktop file?Here, I found
cat /usr/share/applications/ceni.desktop$ cat /usr/share/applications/ceni.desktop [Desktop Entry] Type=Application Terminal=true Exec=su-to-root -c /usr/sbin/CeniDoes that launchstring succeed when typed at a command prompt?
su-to-root -c /usr/sbin/Ceni^—- Is it asking for (and are you typing) YOUR password, or the root user password?
Also check the Exec= launchstring within the custom …/TCM/… desktop file.
May 25, 2021 at 10:27 am #60095MemberPPC
::@Skidoo: Just some info- I tested that ceni.desktop (in a virtual machine), I didn’t run the command in the terminal, but I can confirm that launching that .desktop file from the file manager does indeed launch a terminal window, asking for the password (only the root password works) but adding the .desktop to icewm’s toolbar folder using TIM adds the exec line as is in the .desktop file, but nothing happens when I click the toolbar icon.
The only work around I found was forcing the su-to-root command to run inside a new default terminal window…
The OP did not comment, but, if my work around solved the problem on my end, it *should* also work on his computer… Lets wait to see what Roland says…
An universal way to solve this would be adding, to TIM’s script, a line, that checks the contents of the exec command, and if it starts with “su-to-root”, change the text so it’s:
xterminal-emulator -e “[original exec string]”
But I don’t I have time or phocus to edit TIM’s code and add that fix- since this seems to be a very rare problem- probably only happening with the ceni.dekstop and not anywhere else, or so I hope!P.
- This reply was modified 1 year, 11 months ago by PPC.
May 25, 2021 at 6:02 pm #60109Anonymous
::TIM adds the exec line as is in the .desktop file, but
If TIM does not also consider the “Terminal=true” detail, that would explain the cause of the problem.
May 25, 2021 at 6:21 pm #60111MemberPPC
::(for some reason that I won’t debug right now)
That reason is exactly the fact that TIM does not react to “Terminal=true”- doing that would add to the script’s complexity (more than what I could handle at the time I began writing it) and would not be of much use to most users, since the .desktop file of cli apps like “htop” and “nano” have exec lines that run those apps in a fresh terminal window , and most users tend to add GUI applications to the toolbar…
It seems that ceni’s .desktop file is the exception to that rule 🙁
I can’t improve TIM’s script (nor will I probably do that in the foreseeable future)- But yes, checking the .desktop file for the string “Terminal=true”, and if a match is found add automatically x-terminal-emulator -e ” to the exec command (and close quotes after that)- would be the optimal solution.We have a saying here in Portugal (probably everywhere else, since it’s Voltaire’s most famous quote):
“O óptimo é inimigo do bom”, literally translates as ” optimum is the foe of good”, meaning that if we keep waiting until everything is completely perfect, nothing really gets done; it’s best to take a “good” outcome, even if it’s not the “perfect” one…P.
Edit: Lol, that did not come out correctly! I meant “automatically x-terminal-emulator -e ” to the exec command that TIM adds to Icewm’s toolbar config file (and close quotes after that)” […]
- This reply was modified 1 year, 11 months ago by PPC.
- This reply was modified 1 year, 11 months ago by PPC.
May 25, 2021 at 7:14 pm #60113Anonymous
::For the TIM author, the “fun” is just beginning…
add automatically x-terminal-emulator -e ” to the exec command
Here, you can read some of my cribnotes regarding launchstrings and the quirks of various terminal emulator programs: https://gitlab.com/skidoo/gexec/-/blob/master/gexec.c#L66
Do note that the “ceni thing” is probably not a benign failure ~~ a while back, I called out the identical bug scenario regarding launch of ceni via ControlCentre. The unseen “failed” process continues in the background, perpetually retrying and inducing a single-core 100% CPU load.
.“O óptimo é inimigo do bom”
Yeah, go bo0m.
ain’t got no fancy vowels here in Possum Hollow,
so instead of wrestling with an exact translation we just call it “sh** on a stick”.
;^)May 25, 2021 at 7:57 pm #60117Anonymous
May 25, 2021 at 8:02 pm #60118MemberPPC
::Off topic:
@skidoo (My previous post was corrected, and I inserted the part of the sentence that was missing. My idea of “fun” is not altering user’s .desktop files)
I was not aware that ceni add such problems… I haven’t used it since antiX began using connmann as connection manager…
I don’t understand C, but is the (apparently) commented line
define DEFAULT_TERMROX "roxterm --disable-sm -e %s"
meant to make Ceni always launch roxterm, (probably) if it’s the default terminal?I searched “Possum Hollow” on-line found what seems to be a very nice restaurant!
P.
May 26, 2021 at 9:10 am #60152MemberPPC
::Last night I used app-select to take a peek at all .desktop files in my antiX 19.3.
I found 19 entries that started with “su-to-root” and tested half a dozen of them, adding them to the icewm toolbar with TIM- they all worked (they were also all GUI applications:add blocker – tested and works
User management – tested and works
persistance configuration
persistance set up
save persistance changes
iso snaptshot
create live usb
format USB
repo manager- tested and works
one of the Synaptic .desktop files
? menu manager
one of gparted .desktop files
codec installer
package installer
gazelle installer
nvidea driver installer
live remaster
boot repair – tested and works
* rox filer as root – tested and worksI did not do a complete test, but it seems that really Ceni was the single antiX application that fails to be added to the icewm toolbar by TIM…
P.
May 26, 2021 at 6:39 pm #60189Anonymous
::I recall that during antix19 pre-release betatesting, along with ceni launcher we found one other ProblemChild.
Alsamixer, or SoundCardChooser?May 26, 2021 at 9:08 pm #60206Member
roland
::I added the ‘x-terminal-emulator -e’ as suggested by PPC and placed “su-to-root -c /usr/sbin/Ceni” between double quotes and this solved the problem, Ceni comes up asking for the ‘real’ root password (not my user password) and works as it should.
I do not claim to have understood all the subsequent replies ! But thanks to all contributors.
Here is the requested cat:-
root@antix1:/home/roland# cat /usr/share/applications/ceni.desktop
[Desktop Entry]
Type=Application
Exec=su-to-root -c /usr/sbin/Ceni
Icon=ceni
Terminal=true
Name=Ceni
GenericName=Network card configuration
GenericName[de]=Netzwerkkarte konfigurieren
GenericName[ru]=Конфигурация сетового адаптера
GenericName[es]=Configuración de la tarjeta de red
GenericName[pt]=Configuração da placa de rede
Categories=Network;
Keywords=Net;Network;Configuration;interfaces;ifupdown;
root@antix1:/home/roland#
@antix1:~Yes the declared string does work in a terminal :-
roland@antix1:~
$ Exec=su-to-root /usr/sbin/Ceni
Ceni requires root priviledges! Be careful!
Password:Typing the root password produced the Ceni template.
Among the very few improvements that I think would benefit Ceni, asking for the root password is superfluous. If user is not superuser, then let it fail. If user is superuser, then proceed. I realise this may not be possible when coming from a taskbar shortcut button.
I never lose sight of the fact that the recent posts regarding wlan connections involving Ceni and Wicd, are only really of importance because of the shortcomings (for some users like myself anyway) of Connman. I look forward to a bullet-proof re-issue of Connman having tried it on 3 or 4 builds recently with only total failure to report. From my point of view Wicd is ideal because on my latest builds I have 16gb and 32gb memory to go at, and it seems to fulfil every requirement affecting my lan usage. Ceni can be troublesome and I have suggested slight tweaks to improve usability, but if improved it would just become another Wicd wouldn’t it? But it works and works well once understood how it can trip up the user. But if used in an organised way it does the job.
The real answer is for Connman to be overhauled.
- This reply was modified 1 year, 11 months ago by roland.
- This reply was modified 1 year, 11 months ago by roland.
- This reply was modified 1 year, 11 months ago by roland.
-
AuthorPosts
- You must be logged in to reply to this topic.
