- Posts: 2
- Thank you received: 0
Xtt start with desktop shortcut
1 week 2 days ago #93
by Mika K
Xtt start with desktop shortcut was created by Mika K
I have single machine system where operator interface, development and data storage runs on same Ubuntu workstation. I'm wondering if there is a way to create desktop shortcut to start Xtt all the way. At the moment my shortcut will open console and bring runtime monitor up:
Is there a way to automate runtime start? Like forcing it to push Start RunTime button and finally automatically selecting OpPlace:
One last question, is it even necessary to show the console?
Is there a way to automate runtime start? Like forcing it to push Start RunTime button and finally automatically selecting OpPlace:
One last question, is it even necessary to show the console?
Please Log in or Create an account to join the conversation.
1 week 1 day ago #94
by jds
Replied by jds on topic Xtt start with desktop shortcut
Hello Mika,
yes you can do this but first you'll have to install the runtime package along with the already installed package.
You can make proview start at runtime enabling the pwrp service (sysctl enable pwrp). Something to notice: the script /etc/init.d/pwr needs one adjustment, change the "flock -w 180 10" to "flock -w 180 9" and further in the same script (a few lines below ) "10>$LOCKFILE" to ) "9>$LOCKFILE" or it will fail to run.
Also change the busnumber in the /etc/proview.cnf file to for ex. 1 (standard 517, but when you use the auto project creating, the bus nr. 1 and 999 are used)
Distribute your load to your own PC (production node on bus 1) and the next time you restart (if the service is enabled) your load will start automaticly in the background.
If you want your operator interface to start with a shortcut, create a shortcut refering to $pwrp_exe/rt_xtt -qn Op & In this line there are the options -qn (ex. q to don't show the license window, have a look at the man_opg $4.1) "Op" is the interface you like to start, and the "&" is to fork the interface otherwise the shell will be open all the time and yor interface will close when you'll close the shell. Also don't forget to source /etc/pwrp_profie in your start script
When you"ll start your op interface, you"ll see that the navigator will open also automaticly, this can be disabled creatinga file called "xtt_setup.rtt_com" into your home dir with in the file the command "close navigator".
Of course you can make an autostart script for this one to so the interface will start automaticly.
What I did is create an seperate script called xtt_autostart with in there the following code:
the I create an desktop file (xtt.desktop) in the autostart dir (in my case /etc/xdg/autostart), in this file:
It could be possible that on Ubuntu some things are slightly different, I use myself debian and for my op station (I use seperate op stations) LXDE to be as lightweight as possible. Of course since this is an op station in an industrial enviornment my op stations are complete jailed. Also keep in mind that when you logon as "pwrp" and you've setted to use the users as logged on, the full fleged options are available into your op screen, If you want it to be a bit more dummy proof, use one of the build in users to auto logon (ex. op1).
I'll hope you'll find some usefull info in the text above, it will be a starting point to be tuned at your own needs.
yes you can do this but first you'll have to install the runtime package along with the already installed package.
You can make proview start at runtime enabling the pwrp service (sysctl enable pwrp). Something to notice: the script /etc/init.d/pwr needs one adjustment, change the "flock -w 180 10" to "flock -w 180 9" and further in the same script (a few lines below ) "10>$LOCKFILE" to ) "9>$LOCKFILE" or it will fail to run.
Also change the busnumber in the /etc/proview.cnf file to for ex. 1 (standard 517, but when you use the auto project creating, the bus nr. 1 and 999 are used)
Distribute your load to your own PC (production node on bus 1) and the next time you restart (if the service is enabled) your load will start automaticly in the background.
If you want your operator interface to start with a shortcut, create a shortcut refering to $pwrp_exe/rt_xtt -qn Op & In this line there are the options -qn (ex. q to don't show the license window, have a look at the man_opg $4.1) "Op" is the interface you like to start, and the "&" is to fork the interface otherwise the shell will be open all the time and yor interface will close when you'll close the shell. Also don't forget to source /etc/pwrp_profie in your start script

When you"ll start your op interface, you"ll see that the navigator will open also automaticly, this can be disabled creatinga file called "xtt_setup.rtt_com" into your home dir with in the file the command "close navigator".
Of course you can make an autostart script for this one to so the interface will start automaticly.
What I did is create an seperate script called xtt_autostart with in there the following code:
Code:
#!/bin/bashsource /etc/pwrp_profile while true; do if [ $(systemctl is-active pwr) = "active" ]; then break fi sleep 1done $pwr_exe/rt_xtt -qn Op &
the I create an desktop file (xtt.desktop) in the autostart dir (in my case /etc/xdg/autostart), in this file:
Code:
[Desktop Entry]Version=1.0Name=XttExec=sh -c '/home/pwrp/xtt_autostart'Icon=utilities-terminalTerminal=trueType=Application
It could be possible that on Ubuntu some things are slightly different, I use myself debian and for my op station (I use seperate op stations) LXDE to be as lightweight as possible. Of course since this is an op station in an industrial enviornment my op stations are complete jailed. Also keep in mind that when you logon as "pwrp" and you've setted to use the users as logged on, the full fleged options are available into your op screen, If you want it to be a bit more dummy proof, use one of the build in users to auto logon (ex. op1).
I'll hope you'll find some usefull info in the text above, it will be a starting point to be tuned at your own needs.
Please Log in or Create an account to join the conversation.
1 week 1 day ago #95
by jds
Replied by jds on topic Xtt start with desktop shortcut
I see that the code fragments are formatted strange and I can't edit
startup script (xtt_autostart):
#!/bin/bash
source /etc/pwrp_profile
while true; do
if [ $(systemctl is-active pwr) = "active" ]; then
break
fi
sleep 1
done
$pwr_exe/rt_xtt -qn Op &
xtt.desktop file:
[Desktop Entry]
Version=1.0
Name=Xtt
Exec=sh -c '/home/pwrp/xtt_autostart'
Icon=utilities-terminal
Terminal=true
Type=Application
startup script (xtt_autostart):
#!/bin/bash
source /etc/pwrp_profile
while true; do
if [ $(systemctl is-active pwr) = "active" ]; then
break
fi
sleep 1
done
$pwr_exe/rt_xtt -qn Op &
xtt.desktop file:
[Desktop Entry]
Version=1.0
Name=Xtt
Exec=sh -c '/home/pwrp/xtt_autostart'
Icon=utilities-terminal
Terminal=true
Type=Application
The following user(s) said Thank You: Mika K
Please Log in or Create an account to join the conversation.
4 days 4 hours ago #100
by Mika K
Replied by Mika K on topic Xtt start with desktop shortcut
jds, thank you for detailed instructions! I will be testing it hopefully next week.
Please Log in or Create an account to join the conversation.
Time to create page: 0.438 seconds