Problems for installing texmacs on ubuntu

I am using Ubuntu 20.04. When using this method to install texmacs, I encounter the following error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 texmacs : Depends: libqt5core5a (>= 5.12.2) but it is not installable
           Depends: libqt5gui5 (>= 5.4.0) but it is not installable or
                    libqt5gui5-gles (>= 5.4.0) but it is not installable
           Depends: libqt5printsupport5 (>= 5.0.2) but it is not installable
           Depends: libqt5svg5 (>= 5.6.0~beta) but it is not installable
           Depends: libqt5widgets5 (>= 5.11.0~rc1) but it is not installable
           Depends: fonts-stix but it is not installable
           Depends: fonts-texgyre but it is not installable
           Recommends: netpbm but it is not installable
           Recommends: libjpeg-progs but it is not installable or
                       libjpeg-mmx-progs but it is not installable
           Recommends: libtiff-tools but it is not installable
           Recommends: librsvg2-bin but it is not installable
           Recommends: xfig but it is not installable
           Recommends: imagemagick but it is not installable
           Recommends: texlive-bibtex-extra but it is not installable or
                       pybtex but it is not installable or
                       nbibtex but it is not installable
E: Unable to correct problems, you have held broken packages.

Note the .deb file downloaded from here also gives the same error. How to solve this problem??

BTW, there is indeed a way to avoid this problem, i.e., directly download the static binary file, and run the texmacs inside its bin directory…

Try apt -f install (probably with sudo) to fix the dependencies: https://www.reddit.com/r/Ubuntu/comments/oau8bv/what_does_sudo_apt_f_install_do/

Or using the suggestions in the website

Depending on your shell, either type

export TEXMACS_PATH=[installation directory] export PATH=$TEXMACS_PATH/bin:$PATH

or

setenv TEXMACS_PATH [installation directory] setenv PATH $TEXMACS_PATH/bin:$PATH

We recommend to put these lines in your personal startup script (...)

Please let me know in case you need details on how to do this for Ubuntu.

Yet another option is the AppImage version of TeXmacs

Thank you for the suggestion. Unfortunately, this method does not work; it returns the same error message as before…

Yes, I know this method. But I would like to make texmacs shown in Applications of ubuntu so that I can simply launch it from there. Maybe somehow one can manually add a file called texmacs.desktop to ~/.local/share/applications?

I tried this method, it returns the same error as before.

I think that this is an issue to explore (not just using another universal package to “avoid”), since TeXmacs does have a build for Ubuntu 20.04, and there seems something wrong in the packaging.

Likely that it works.
Mine has inside

[Desktop Entry]
Version=1.0
Type=Application
Name=GNU TeXmacs
GenericName=Text Editor
Comment=A structured wysiwyg scientific text editor
MimeType=text/x-texmacs.doc;text/x-texmacs.sty;text/plain;text/x-tex;
Exec=texmacs
Icon=texmacs
Terminal=false
Categories=Education;Science;Math;
X-KDE-Priority=TopLevel
InitialPreference=99
Path=
StartupNotify=false

There was one even when I had TeXmacs installed as static binary, and it is possible that it had a Path= “something” instead of the Path= “nothing” it has now; and I have the strong impression that it was generated by TeXmacs itself the first time I launched it, because I do not recall writing this file myself.

well, I’ve tried your codes, and some of its variants, all does not work… basically when i click the icon, nothing happened.

I tried it now and it is the same for me. Let me investigate, because it worked when I did not have the packaged version, and I had only the binary one.

Ok, I think I know.

From the terminal:
The required TEXMACS_PATH() does not exists

So you have to do both things I think, setting the environment variables and setting the Exec to point to the binary version. I will test it as soon as I have time later today or tomorrow.

my code is the following:

[Desktop Entry]
Version=1.0
Type=Application
Name=GNU TeXmacs
GenericName=Text Editor
Comment=A structured wysiwyg scientific text editor
MimeType=text/x-texmacs.doc;text/x-texmacs.sty;text/plain;text/x-tex;
Exec=/home/dell/bin/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs/bin/texmacs
Icon=texmacs
Terminal=false
Categories=Education;Science;Math;
X-KDE-Priority=TopLevel
InitialPreference=99
Path=/home/dell/bin/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs
StartupNotify=false

I also add

export TEXMACS_PATH="/home/dell/bin/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs"
export PATH="$TEXMACS_PATH/bin:$PATH"

to my ~/.zshrc file

still not work…

Wha happens if you do

from the terminal, while in the installation directory?

despite pop up with many warnings (which I also want to fix them…)

Fontconfig warning: line 5: unknown element "its:rules"
Fontconfig warning: line 6: unknown element "its:translateRule"
Fontconfig warning: line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 8: unknown element "description"
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 76: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 76: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 84: saw unknown, expected number
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-fonts-persian.conf", line 34: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/65-fonts-persian.conf", line 35: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/69-unifont.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/69-unifont.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 5: unknown element "its:translateRule"
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 5: unknown element "its:translateRule"
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
TeXmacs] With linked TrueType support

texmacs will show up. Note this is the default way I launch texmacs.

I believe those fontconfig warnings are caused by the ancient version of fontconfig used by qt4 unable to read newer configuration files found in recent distros. They don’t appear if TeXmacs is built against qt5. They can be safely ignored.

I don’t believe desktop environments will read .zshrc. For example, GNOME reads a .gnomerc file to set environment variables, if I remember correctly.

Or you can make a wrapper script that sets the environment and runs TeXmacs, and call that from your .desktop file.

In my Xubuntu for the desktop environment I place a texmacs.sh file /etc/profile.d/ with the shell commands.

just add

#!/bin/sh
export TEXMACS_PATH="/home/dell/bin/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs"
export PATH="$TEXMACS_PATH/bin:$PATH"

to /etc/profile.d/texmacs.sh, still not working

I do not have the #!/bin/sh statement at the beginning of /etc/profile.d/texmacs.sh, but I do not know if that is the problem.
I am assuming that /etc/profile.d/texmacs.sh is the right file for both your and my Linux of course

I also checked the version without the first line. It does not work neither way…