3

So... New to this Ubuntu thing. On 16.04.

I will try to explain this as best I can with what computer knowledge I have. I have searched for a while and can't find an answer that works.

I purchased a computer with intentions of upgrading my business computer. Using Ubuntu because the reseller had wiped the OS. I am running DOSbox for my POS system and Wine for the .Exe that the POS system uses to print reports from Dos. I need to be able to have those programs executable from desktop icons because it needs to be as EASY as possible for employees.

My problem is this: All files for this program are written and read from my POS folder. When creating a link icon for my printer.exe file, the "LINK TO PRINTER.EXE" file is not reading the data from the POS folder. Instead it wants me to configure printers like it was started for the first time. If those printers are configured from the desktop "link", DOSbox does not recognize them because, I can only assume, the link is more like a copy instead of a shortcut to the file inside of the folder.

Printer.exe, when clicked, opens automatically with Wine, so I figured I could lock the icon to the launch bar. After closing the application, The icon changes to a question box and will not open printer.exe.

DOSbox is dedicated to my POS, so I used the autoexec lines in dosbox.conf to start the POS from the DOSbox icon automatically. I figured I could add "printer" before "pos" in the autoexec lines to make the printer automatically open right before the pos. DOSbox says no and tells me the printer.exe file cannot run because it is a Win32 program. Well, printer.exe isn't a dos program. What was I thinking?? Why am i typing this???

Is there some way to create a link to printer.exe and edit the file path to be directed to the printer.exe file in the POS folder? I do not want to give employees a reason to open the POS folder in fear something may be deleted!

Thanks!

edwinksl
  • 24,109

1 Answers1

0

Unlike GNU/Linux apps, Windows apps rarely separate its configs from binaries (and no, putting configs into a subdir around binaries, and calling it a separation, is like tightly shove things into a cupboard, lock it up with mop, and say "the room is cleaned"). And they assume that they being ran from the directory where they installed, in part because .lnk files on Windows automagically set base directory there (the link is just an example, I didn't mean to recommend a .net based language).

There're a few solutions I see off the top of my head:

  • Create a script which would cd into the directory with the app, then would run it.
  • Search for a command line argument, of the particular app you want to run, allowing to set a directory with configs. Then write a script which would run the app with that argument.
  • Create a .desktop file with Path= variable being set, which sets the working directory to run the app in. In your case of giving the access to employees, it's probably the most appropriate of the listed methods, as it allows to set an icon.
Hi-Angel
  • 4,810