[Software] Very few programs opening - consistent error message

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
BlackOwl
Posts: 12
Joined: 2025-01-17 07:52

Re: [Software] Very few programs opening - consistent error message

#21 Post by BlackOwl »

CwF wrote: 2025-02-20 23:31
RedGreen925 wrote: 2025-02-20 23:11 Code: Select all

root@9600k:~# ls -l /etc/profile
-rw-r--r-- 1 root root 828 Nov 22 18:04 /etc/profile
That file can and will be updated by system updates. Probably best to leave it alone. Put your edits in ~/.profile.
That does make sense. So if I'm trying to launch games from the desktop and not just a terminal, what do I do?

User avatar
RedGreen925
Posts: 263
Joined: 2024-05-16 02:56
Has thanked: 5 times
Been thanked: 44 times

Re: [Software] Very few programs opening - consistent error message

#22 Post by RedGreen925 »

CwF wrote: 2025-02-20 23:31
RedGreen925 wrote: 2025-02-20 23:11 Code: Select all

root@9600k:~# ls -l /etc/profile
-rw-r--r-- 1 root root 828 Nov 22 18:04 /etc/profile
That file can and will be updated by system updates. Probably best to leave it alone. Put your edits in ~/.profile.
It appears the OP or some software has altered the default file which you would know if you had read the thread. Or I think this is what the problem is, they have not posted to confirm this but the symptoms indicate it. I showed the stock Debian file I have installed and advised a restoration to this default file to correct the broken PATH now being set.. The OP also advises that the solution I proposed of setting the PATH in the ~/.profile to include the /usr/games does not work for a graphical starting of the games only in the terminal starting.

User avatar
RedGreen925
Posts: 263
Joined: 2024-05-16 02:56
Has thanked: 5 times
Been thanked: 44 times

Re: [Software] Very few programs opening - consistent error message

#23 Post by RedGreen925 »

BlackOwl wrote: 2025-02-21 00:10 That does make sense. So if I'm trying to launch games from the desktop and not just a terminal, what do I do?
Confirming the stock Debian file has not been altered is the place to start with it restored to its original state, the file I posted above, the PATH will be correctly set. Without seeing it it is the only place I can think of where it goes wrong.

BlackOwl
Posts: 12
Joined: 2025-01-17 07:52

Re: [Software] Very few programs opening - consistent error message

#24 Post by BlackOwl »

So currently /etc/profile looks like this:

Code: Select all

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$(id -u)" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "${PS1-}" ]; then
  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "$(id -u)" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

User avatar
RedGreen925
Posts: 263
Joined: 2024-05-16 02:56
Has thanked: 5 times
Been thanked: 44 times

Re: [Software] Very few programs opening - consistent error message

#25 Post by RedGreen925 »

BlackOwl wrote: 2025-02-21 00:34 So currently /etc/profile looks like this:

That appeared to be the stock file with the /usr/games in the PATH. It appears something is altering the PATH to remove the /usr/games. Try this at the window where you login in use the CTRL + ALT + F3 keys at the same time to get a console login. There put in your user name and password and use the command echo $PATH and see if the /usr/games is at the very end of it. If not then something during booting up messes with it as it should be there on fresh boot having been set by the /etc/profile been read when you login, though now I think if any of the files sourced by a login are messing with it then it can be altered by the login. This console idea only works if some of the graphical files sourced on login are doing it. I am rapidly running out of ideas on this one. Try booting with a live Debian USB and see if the path is correct there. If you do the console idea a CTRL + ALT + F7 keys at the same time should get you back to the graphical login or a sudo pkill X to kill off the X server and have it respawn showing the screen. Have you installed any software from outside the Debian repositories lately before this started to happen?

BlackOwl
Posts: 12
Joined: 2025-01-17 07:52

Re: [Software] Very few programs opening - consistent error message

#26 Post by BlackOwl »

A few programs, yes, but they've all been installed via Wine. Does that make a difference?

Code: Select all

/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

User avatar
RedGreen925
Posts: 263
Joined: 2024-05-16 02:56
Has thanked: 5 times
Been thanked: 44 times

Re: [Software] Very few programs opening - consistent error message

#27 Post by RedGreen925 »

BlackOwl wrote: 2025-02-21 01:36 A few programs, yes, but they've all been installed via Wine. Does that make a difference?

Code: Select all

/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Now that is showing the correct PATH now with the addition from the ~/.profile showing as well. Are the games not launching graphically started from the wine?

BlackOwl
Posts: 12
Joined: 2025-01-17 07:52

Re: [Software] Very few programs opening - consistent error message

#28 Post by BlackOwl »

No, they are the only games that are launching correctly. The ones that aren't launching were installed from Debian repositories - AisleRiot being the most prominent example.

User avatar
RedGreen925
Posts: 263
Joined: 2024-05-16 02:56
Has thanked: 5 times
Been thanked: 44 times

Re: [Software] Very few programs opening - consistent error message

#29 Post by RedGreen925 »

BlackOwl wrote: 2025-02-21 03:16 No, they are the only games that are launching correctly. The ones that aren't launching were installed from Debian repositories - AisleRiot being the most prominent example.
Alright I downloaded ad checked it out the sol.desktop file in the /usr/share/applications directory is responsible for launching it. Let us try editing the file copied to the ~/.local/share/applications directory.

Code: Select all


zeus@9600k:~/Downloads/folder$ ls -l
total 3704
1848 -rw-rw-r-- 1 zeus zeus 1891076 Feb 21 00:11 aisleriot_3.22.23-1_amd64.deb
  44 -rw-r--r-- 1 zeus zeus   44320 Feb 21 00:12 control.tar.xz
1804 -rw-r--r-- 1 zeus zeus 1846564 Feb 21 00:12 data.tar.xz
   4 -rw-r--r-- 1 zeus zeus       4 Feb 21 00:12 debian-binary
   4 drwxr-xr-x 6 zeus zeus    4096 Jun  3  2022 usr/
zeus@9600k:~/Downloads/folder$ ls -l usr/share/applications/sol.desktop 
16 -rw-r--r-- 1 zeus zeus 13366 Jun  3  2022 usr/share/applications/sol.desktop

There you can see I downloaded the packages from the packages.debian.org site and made directory to extract it in. Now for your machine do.

Code: Select all

cp /usr/share/applications/sol.desktop ~/.local/share/applications/
To copy the file then.

Code: Select all

nano ~/.local/share/applications/sol.desktop
To edit the file changing the lines.

Code: Select all

Name=AisleRiot Solitaire
Comment=Play many different solitaire games
Exec=sol
To.

Code: Select all

Name=AisleRiot Solitaire edited
Comment=Play many different solitaire games edited
Exec=/usr/games/sol

So when the duplicate pops up in the menus you have way to tell which has been edited to try. Once done with the edits use the CTRL + x keys at same time to attempt to quit application answer y for yes when asked to save the modified buffer then ENTER key to save the file. You should now be able to go into the menu and select the edited version of the file to start the game. Give it a go and see if hard wired path in the .desktop does it.

Post Reply