Need desktop link or autorun for tinySpell

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
paul1149
Level 2
Level 2
Posts: 27
Joined: Sat Sep 18, 2010 8:50 pm

Need desktop link or autorun for tinySpell

Post by paul1149 »

Hi,
I'm on Linux Lite, ubuntu spawn. I'm trying to either create a desktop launcher for the tinySpell utility or place it in autoruns.

I already ticked TS's autorun option, leading to this:
/home/paul/.wine/dosdevices/c:/users/paul/Start Menu/Programs/StartUp/tinySpell.lnk

But it doesn't autorun.

So I tried creating a desktop link, with no success.

Any help would be appreciated. Thanks.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Need desktop link or autorun for tinySpell

Post by Bob Wya »

paul1149 wrote:Hi,
I'm on Linux Lite, ubuntu spawn. I'm trying to either create a desktop launcher for the tinySpell utility or place it in autoruns.

I already ticked TS's autorun option, leading to this:
/home/paul/.wine/dosdevices/c:/users/paul/Start Menu/Programs/StartUp/tinySpell.lnk

But it doesn't autorun.

So I tried creating a desktop link, with no success.

Any help would be appreciated. Thanks.
If you want an application to autostart with your Linux Desktop Environment then those .desktop files need to be in the directory:

Code: Select all

"${HOME}/.config/autostart/"
equivalent to:

Code: Select all

~/.config/autostart/
A Wine .desktop file has a similar anatomy for any application, e.g. something like:

Code: Select all

[Desktop Entry]
Name=tinySpell
Exec=/usr/bin/wine "C:\\windows\\command\\start.exe" "C:\\Program Files\\???"
TryExec=/usr/bin/wine
Type=Application
StartupNotify=true
Icon=???
Categories=X-Wine;Utility;
Categories

You can add in other categories - if you want your Wine application to say show up in other places in your Linux Desktop Environment's menu.
For example: the Utility category added above.

Icon

To find the png icon file that Wine extracts for an application (if you have winemenubuilder enabled), you can search for this in your Linux user's local directory:

Code: Select all

find ~/.local/share/icons -type f -iname "*tinyspell*.png"
You would use the filename (without the .png extension) after the Icon= field in your custom .desktop file.

Exec

You read the full path of the executable from a Windows (binary) .lnk file using:

Code: Select all

strings /home/paul/.wine/dosdevices/c:/users/paul/Start Menu/Programs/StartUp/tinySpell.lnk | awk '{gsub("\\","\\\\\\\\") ; if ($0 ~ "C:\\\\\\\\Program Files") print $0 }'
This path would be inserted after the Exec=wine start field in your custom .desktop file.
The little awk hack ensures that forward slashes (\) are correctly escaped (i.e. doubled up).

Finally the finished, custom .desktop file would put in:

Code: Select all

.local/share/applications
... or a subdirectory of this.

Bob
paul1149
Level 2
Level 2
Posts: 27
Joined: Sat Sep 18, 2010 8:50 pm

Re: Need desktop link or autorun for tinySpell

Post by paul1149 »

Quick reply: Thanks so much for that thorough answer. I'll do some work on it and get back.

Thanks again,
Paul
paul1149
Level 2
Level 2
Posts: 27
Joined: Sat Sep 18, 2010 8:50 pm

Re: Need desktop link or autorun for tinySpell

Post by paul1149 »

OK. A large part of my problem is that I was using the portable version of tinySpell. I thought I had rectified that, but I hadn't. I'm sure it could have been configured anyway, but the details were beyond me.

I installed it proper, and it placed a link that works on the desktop:

Code: Select all

[Desktop Entry]
Name=tinySpell
Exec=env WINEPREFIX="/home/paul/.wine" wine C:\\\\Program\\ Files\\ \\(x86\\)\\\\tinySpell\\\\tinyspell.exe 
Type=Application
StartupNotify=true
Path=/home/paul/.wine/dosdevices/c:/Program Files (x86)/tinySpell
Icon=EA9A_tinyspell.0
Next up is to see if its autorun works.
Locked