Main Board > Programming

Linux User Help


Ron Klassen:
I have a customer running OpenSuse 42.1 and I haven't done much on the linux side for some time, so I could use a little help.
The current value of 'WHO' is root and first of all, where within PxPlus is that set, and second, is it advisable to leave it as root or can that be changed?

Mike King:
There are a couple of ways to address this.

If  you are using the Simple CS program for your connections launch the Simple CS Host program on the desired user.  This will result in all the spawned processes using that user id.  There is however a slight caveat and that is most Linux distributions will not allow any process other than those running as 'root' to monitor any well-known port number (that is ports under 1024).  Now generally this will be fine for the CS host program as its default if 4093 but if you are using a lower port number you may have to change.

If you want different processes to run on different user-ids then in your application, once you know what user-id you want to use you can issue a DEF UID=xxx (and optionally DEF GID=xxx) in order to change the user-id that the processes run on.

Another option is to simply have your users use WindX to directly sign-on to the Linux server and have a .profile (or .bash_profile) in their starting directory that launches PxPlus.  This will have the users maintain their user-id and security settings.  If your application needs to spawn additional WindX processes, you simply need to set the global variable %PXPLUS_HOST to "*hostaddr;port" where hostaddr is the Host Linux servers address as seen by the workstations, and port is the port number to use.  (See the note at the bottom of  for details).

Ron Klassen:
Thanks Mike,
I'm using the Simple CS on port 4093 but I'm not exactly sure what I would do for the first option, so I'll try the second option and see how that works.

Mike King:
If all you want to do is have all *plus/cs/host clients run under a single, common non-root userid then you could either use the Linux 'su' command to change the userid for the command that started *plus/cs/host or you might even be able to write a small program that does a DEF UID prior to running *plus/cs/host and launch that instead.


[0] Message Index

Go to full version