Problem using Inotify to send a file to Print [Solved]

You have a problem with Salix? Post here and we'll do what we can to help.
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: Problem using Inotify to send a file to Print

Post by paul »

Hello knome,
Good the hear from you. I used gedit on Ubuntu for the original file and geany on Salix to edit this on this machine.
I am aware of the <cr><lf> conundrum with Windows editors. My entry of a <cr><lf> at the end of a line was intentional in order to generate an error so I could see whether inotify picked up the shell script. Which it did.
Geany has a facility to automatically change these to <lf> only. Very neat actually. I would like to set geany as my default text editor; as Salix asks for gedit, which is not installed by default, which is slightly irritating.
By the way, I have tried the same syntax I used in my shell script above on Ubuntu, but it does not work, it expects the "while" command after the "|" character rather than at the beginning of the line. Strange.
What I would love to know is the interpreter language used in my shell script; I copied it from someone else and knowing a bit more about the language would be useful.
Paul.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Problem using Inotify to send a file to Print

Post by mimosa »

That would be bash ... unless I have misunderstood your question. Am I right in thinking you use a lot of scripts, but generally adapt them from other sources? That's a great way to learn and so is writing your own from scratch. I can recommend www.linuxcommand.org as a very rich source of digestible information.

Default applications can be changed easily in the menu (somewhere under settings, I think, or if not, try system). You're right that the default should be installed! How did the situation arise, that is, what were you doing that made Salix attempt to open the non-installed editor, and what was the task?

Geany is indeed an excellent editor.
User avatar
gapan
Salix Wizard
Posts: 6362
Joined: 6. Jun 2009, 17:40

Re: Problem using Inotify to send a file to Print

Post by gapan »

paul wrote:I would like to set geany as my default text editor; as Salix asks for gedit, which is not installed by default, which is slightly irritating.
Salix does not ask for gedit. That would be your user configuration in ubuntu messing up your Salix system. I'm guessing you re-used the same user account. In any case, you can easily change filetype assignments by right clicking on the file and using the appropriate options in there to set the app to open it with.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Problem using Inotify to send a file to Print

Post by mimosa »

"That would be your user configuration in ubuntu messing up your Salix system. I'm guessing you re-used the same user account."

If so, that might explain many of the other problems you've been having. home contains all sorts of configurations that generally can't be straightforwardly copied over even if it is the same distro. Better to start from scratch and (judiciously) transfer individual bits and pieces (such as browser configuration). Even then, you need to take care over file permissions and ownership.
User avatar
Salixified
Posts: 20
Joined: 23. Mar 2013, 22:58
Location: Florida, USA
Contact:

Re: Problem using Inotify to send a file to Print

Post by Salixified »

gapan wrote:
paul wrote:I ...That would be your user configuration in ubuntu messing up your Salix system. I'm guessing you re-used the same user account. In any case, you can easily change filetype assignments by right clicking on the file and using the appropriate options in there to set the app to open it with.
The first time I tried Salix I didn't format the /home directory from my old Xubuntu installation. While it preserved my documents and pictures and such, it also retained some incompatible configuration stuff which messed up the look of my Salix desktop. Editing them "the Xubuntu way" messed things up even further. I took the easy path and just reinstalled, formatting the /home partition and recopying the pictures and documents and stuff from backup media. Like I should have done to begin with, lol.
Another totally Salixified customer!
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: Problem using Inotify to send a file to Print

Post by paul »

Hello mimosa, had a look at the link you gave me and got some good hints. Have since edited out the shell script I gave earlier in my post, because it contained a flaw. It now works flawlessly rather than intermittent.
And gapan is quite right, Salix does not ask for gedit; but Gnome Commander, the file manager I use, does. I obviously was confused by it all. So have changed that in Gnome commander, thank you. But as far as Ubuntu is concerned, I run this on another machine and the only thing I have used from Ubuntu are the shell scrips. I have also used the same layout for any added directories to keep "consistency" between machines, and have copied to Salix the binary of the DosBox SVN version with printing capabilities that I compiled for Ubuntu, which runs perfectly on Salix. But beyond that all things on Salix have not been touched in any way by Ubuntu.
It would nevertheless be handy if one could select what programs to use to open particular files. Thunar file manager gives a few choices if you right-click and select "open with". For me just having the appropriate one listed would be nice. Paul.
Post Reply