Graphics does not work on recent install of Matlab_202​1b_Linux_x​86-64 - run icon is unavailable, also, can't execute script files explicitly.

2 Ansichten (letzte 30 Tage)
I have the above problem after recently installing matlab. The error messages coming up are:
Gtk-Message: 21:25:02.923: Failed to load module "pk-gtk-module"
Gtk-Message: 21:25:02.923: Failed to load module "canberra-gtk-module"
When I try to install package gtk3-devel-3.22.2 using sudo dnf install gtk3-devel-3.22.2 the following error message comes up
/usr/bin/sudo must be owned by uid 0 and have the setuid bit set,
so all my permissions have been messed up by the install. I now probably need to re-install linux.
How many times can I re-install and validate on this machine? I wish to execute Matlab programs on this, and another machine as a home project. Could you please advise me as to ehere I should go from here? Can I install an earlier version of Matlab if necessary?

Antworten (1)

Chetan
Chetan am 3 Jan. 2024
I Understand that you're experiencing issues with GTK modules following your MATLAB installation on Linux. These warning messages about missing GTK modules.
Here's a solution to address the permissions and GTK warnings without needing to reinstall your Linux system:
1. Create a Startup Script:
  • Open your terminal.
  • Navigate to a directory where you'd like to place the startup script.
  • Use the `touch` command to create a new script file:
touch matlab_start.sh
2. Edit the Startup Script:
  • Open `matlab_start.sh` in your preferred text editor.
  • Insert the following content into the script:
#!/bin/bash
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
/path/to/matlab/bin/matlab
Make sure to replace `/path/to/matlab` with the actual path to your MATLAB installation.
3. Make the Script Executable
a. Back in the terminal, grant execution permissions to the script:
chmod +x matlab_start.sh
For additional information, refer the following MathWorks documentation:
Thanks
Chetan

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by