Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-10-15 21:02:16

Yarra
Member
Registered: 2020-10-15
Posts: 8

Icons trouble

Hi.
I use CentOs 7.8.
On my other desktop with Centos 7.7 I manually create .desktop file, it worked perfectly:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Common xs018 4341
Exec=bash -c 'cd /home/Projects/catalog && program'
Icon=/home/Projects/cadence.png
Terminal=false
StartupWMClass=Cadence
Type=Application
Categories=Development;

When i copy this desktop file on my Centos 7.8 i has trouble:

if i click to start program from menu or from panel - it work, but if i copy icon to desktop or try it start oer Thunar - it doesn't work.
How it possible? What i do wrong?

On Centos 7.8 i use XFCE 4.12
on CentOs 7.7  also 4.12

Offline

#2 2020-10-17 12:11:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Icons trouble

Hello and welcome.

Yarra wrote:

if i click to start program from menu or from panel - it work, but if i copy icon to desktop or try it start oer Thunar - it doesn't work.

What happens when you try? Do you get an error message?
Does "/home/Projects/catalog/program" exist?

What happens when you run it manually in the terminal like:

xdg-open $HOME/Desktop/NAME.desktop

...where NAME is the name of the .desktop file?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-10-18 04:47:02

Yarra
Member
Registered: 2020-10-15
Posts: 8

Re: Icons trouble

ToZ wrote:

Hello and welcome.
What happens when you try? Do you get an error message?

Nothing. No any error.

ToZ wrote:

Hello and welcome.
Does "/home/Projects/catalog/program" exist?

What happens when you run it manually in the terminal like:
...where NAME is the name of the .desktop file?

Yes, of course exist. If i run .desktop file manually from console or midnight commander - all works fine.
Also it work if i run manually from console with xdg-open.

Offline

#4 2020-10-18 11:19:30

Yarra
Member
Registered: 2020-10-15
Posts: 8

Re: Icons trouble

Okay.
I think i uderstand what happend.

In my .bashrc i use next construction:

if [ -f /home/bashrc ]; then
    . /home/bashrc
fi

I use it for multiuser system for copy  bash settings.

And when i start any script from Xfce gui, it does not work. but why?
All PATH settings, which i use in /home/.bashrc doesnt read by system.
When i work in terminal all is ok.
On other system it works fine. What i do wrong?

Offline

#5 2020-10-18 16:06:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Icons trouble

Does your .bashrc contain only that information? Or is there more content?

Do you have access to the /home/.bashrc file? By default, only root has access to that file unless you change permissions.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2020-10-18 16:23:40

Yarra
Member
Registered: 2020-10-15
Posts: 8

Re: Icons trouble

ToZ wrote:

Does your .bashrc contain only that information? Or is there more content?

Do you have access to the /home/.bashrc file? By default, only root has access to that file unless you change permissions.

Not only that information. some variables too.
Of course i have access. I cad read and write this file.

I changed my desktop file as follows:

Exec= bash -c ". /home/.bashrc && cd /home/Projects/catalog && program"

and it works!
But I think this is not the right decision.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 535.3 KiB (Peak: 536.15 KiB) ]