How do I find the target of a desktop launcher? How do I edit an existing launcher?
In Windows, all you have to do is right click on a menu or desktop shortcut and click properties. One of the resulting tabs tells you what directory and what program or batch file the shortcut supposed to run.
I have not found any way to see the target of linux launchers in either the applications menu or my desktop. Where do I look for the path and target of a launcher? If it matters, I am using the mate desktop on devuan linux. The next thing I want to do is make an existing launcher point to a shell script rather than a program. How do I edit a launcher? [end question] [begin rant] The reason I'm asking this is I installed Neverwinter Nights using a pair of scripts named play-neverwinter-nights.sh and play-anything.sh that I found here: https://wiki.dotslashplay.it/en/game...rwinter-nights Running these scripts resulted in a launcher, Applications -> Games -> Neverwinter Nights. The thing is, there is a massive amount of user created downloadable content that goes with the pre-canned game, and I needed to know where the game was installed in order to add this content. As far as I can tell, the launcher gives no clue where the program (or whatever) it points to is installed. I had to decipher the install scripts to find where the game was installed. Fortunately, I was able to locate the directory where Neverwinter is installed. The reason I want to edit the Neverwinter Nights launcher is I want to change the CD keys based upon the userid. I have multiple licenses for use in multiplayer mode. Each license corresponds to a set of CD keys. If I can change the CD keys based upon the userid that is logged on, that means whoever the user is, he or she gets presented with the proper avatar they created in the game independent of the computer where they are sitting. It would be fairly straightforward to write a shell script to switch out the CD keys file depending on the userid. [rant over] Thanks! |
That's odd, because right-clicking works for me. The launcher file will be in the ~/Desktop folder. You'll probably find you can't edit one working from the file-manager, but you can from the terminal:
$ pluma Desktop/whatever.desktop The menu uses .desktop files, which are probably in ~/.config/autostart or somewhere like that. |
right mouse -> properties
If it's in the desktop icons / taskbar / and such. In the menu it can depend on the distro. For debian based ones, menu / libremenu manages the menu items. Normally with menu entries in /usr/share/menu/. But depending on the environment it could be other places like a .menu file in /etc/xdg/menus/ (XFCE4?). YMMV |
Most games will be in the /usr/games directory. :)
|
Quote:
[The icon picture] Name: Neverwinter Nights Description: [blank] Command: neverwinter-nights Comment: [blank] Type: desktop configuration file (application/x-desktop) Size: 185 bytes (185 bytes) Location: /home/TNAndy/Desktop Volume: unknown Accessed: Sat 13 Jan 2018 10:00:24 AM EST Modified: Sat 13 Jan 2018 10:00:23 AM EST There's an Emblems tab with a bunch of generic icons. There's a Permissions tab that says I own it (read and write) and everyone else can only read it. The Notes tab is blank. What I glean from this is the launcher name is "Neverwinter Nights". The location of the launcher is /home/TNAndy/Desktop. The target command is "neverwinter-nights". The specific problem is I don't know where, in the Linux directory tree, the command "neverwinter-nights" is located. I found the directory /usr/local/share/games/neverwinter-nights where all the game files are located, but not the shell script "neverwinter-nights" that appears to be the target of the launcher. Well, I assume "neverwinter-nights" is a shell script since the Linux executable is called nwmain . When I tried to edit the launcher, there were no contents to the file--it was blank. $ pluma /home/TNAndy/Desktop/"Neverwinter Nights" There was nothing there. By the way, for this discussion, I substituted "TNAndy" for my actual user name which obviously contains no capital letters. |
Quote:
Code:
which neverwinter-nights |
Quote:
$ ls /Desktop |
Quote:
Code:
$ which neverwinter-nights THANK YOU, ondoho! |
Quote:
Code:
$ ls /Desktop Code:
$ ls ./Desktop Code:
#!/usr/bin/env xdg-open THANK YOU, DavidMcCann! |
$(which) includes the $PATH and the executable that it defaults to. The one that it finds "first". The one that will execute if you ONLY enter the executables name on the command line. There could be multiple versions of said executable, and changing the $PATH variable sequence can make it "default" to a different one. Not that there are, but if one user starts X and another launches that executable, there "could be" differences. Unlikely though. Except for dev types that might put $HOME/compiled/thing/ in $PATH before /usr/src/ and /usr/local/src/ while "testing" changes. Although these days a VM or filesystem with snapshots might be the path of least resistance. Except in work environments where a developer is just another "user" with "some" access to things like a compiler.
|
All times are GMT -5. The time now is 07:33 PM. |