LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-16-2021, 11:12 AM   #1
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Desktop files


I've been a KDE user for a while but am trying Gnome again in hopes they have fixed custom application launching. desktop files seem ok except for Bitwarden, which ships as a self-updating AppImage file. The problem is that on every update, it's name changes to the new version. Currently Bitwarden-1.26.3-x86_64.AppImage. desktop files don't seem to accept wildcards, so I had to call a separate shell script which in turn starts the app. Was wondering if anyone can think of a solution where the script isn't needed.

Code:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Bitwarden
Comment=Password Manager
Exec=/home/smallpond/bin/bitwarden.sh
Icon=/home/smallpond/bin/bitwarden.ico
Terminal=false
Code:
#!/bin/bash
AI=$HOME/bin/Bitwarden-*.AppImage
$AI
 
Old 05-16-2021, 11:43 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
I can only give a general answer.

I don't see how that will work.
Code:
touch myapp-1234.AppImage

AI=$HOME/myapp-*.AppImage

echo "$AI"
/home/me/myapp-*.AppImage

a=$(find . -name 'myapp-*.AppImage')
echo "$a"
./myapp-1234.AppImage

echo "Hello there" > myapp-1234.AppImage

cat "$AI"
cat: '/home/me/myapp-*.AppImage': No such file or directory

cat "$a"
Hello there
 
Old 05-16-2021, 12:06 PM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Original Poster
Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Thanks for taking a look. Double quotes prevents the wildcard expansion, which is why I don't use them in my script when running the AppImage.

The script actually does work in Gnome. It just doesn't seem very robust.
 
Old 05-16-2021, 12:24 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
My point was, in this line
Code:
Exec=/home/smallpond/bin/bitwarden.sh
Instead of just a $path, can that be a string of commands, and then run that. Haven't used Gnome for 15 years.

For example: "find.. | do something"
 
Old 05-16-2021, 12:45 PM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Original Poster
Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Good idea! Unfortunately, it looks like the first thing after the "exec=" has to be a simple path or else it doesn't even show up in the activities menu. I don't think I can put commands in there.

It would be nice if I could put a wildcard in a symlink, but that doesn't work either.
 
Old 05-16-2021, 02:24 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
From the spec:
Quote:
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. The name or path of the executable program may not contain the equal sign ("="). Arguments are separated by a space.
 
Old 09-15-2021, 10:28 AM   #7
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Original Poster
Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
My separate script works, and it looks like my original request is not possible, so I am marking the thread as solved.
 
  


Reply

Tags
gnome 3



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
the files in root/desktop don't appear on the desktop matthiasz Puppy 8 03-13-2019 01:43 PM
ubuntu-desktop vs. kubuntu-desktop vs. xubuntu-desktop vs. lubuntu-desktop vs. unity Kenny_Strawn Ubuntu 18 05-13-2011 09:20 AM
gnome desktop icons appear as desktop text files nick623 Linux - Software 2 12-15-2006 02:05 PM
Files in Desktop folder don't appear on Desktop hand of fate Linux - Software 3 10-04-2005 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration