Reinitailizing a variable after executing a command sequence
I am trying to set a condition where when a command is sent to a particular operation that it will only do it once and then stop until the command is sent again. The operation in LV resides in a while loop with many other simultaneous operations, so if the command is not changed or reset, it would contiune to execute while I dont want it to. The command is a string that is sent by an external device at irregular intervals.
If I were doing something like this in VB or C, the command sequence would look something like:
IF command = "xyz" then
{does the operations}
command = ""
END IF
I have included 2 examples for you (in LV 6.0).
The first illustrates how to compare the current string with the past string using a shift register. This vi enables you keep the string showing the last setting, but if you want to repeat this same setting then it wouldn't work.
The second vi shows how to reset the string to an empty string, so if the string contains something then the operation will run. The last setting will be lost using this method, but repeats will work.
I hope this makes things a little clearer for you..
Kim
Attachments:
String_selector.vi 17 KB
String_selector_2.vi 17 KB
Similar Messages
-
HT204389 In hands free mode, why does Siri lock my phone after executing a command?
Anytime I'm using Siri in my car in hands free mode, she locks my phone immediately after executing my command. Then I can't access certain abilities without unlocking first - which obviously is missing the point of hands free mode.
Thank you!May have found a solution for part of this. In the first senario when the two names are presented, repeat request with a verb and a noun. Say call John.
As for the 2nd senerio, I have not been able to find a solution.
Siri appears to be a toy and an advertizing campain talking voice but little else. Upsetting as it was one of the reasons for choosing this platform. It will get better but not soon enough.
For now considering turning it off and using regular voice control agumented by Plantronics Vocalast service. I can possibly go on business trips and use my phone hands free whith the state Siri is in right now. -
Problem in using Command sequences in Javascript in WAD
Hi,
I have created a WAD template in BEx 3.5 with multiple Web items (Tables & Charts). On the WAD there is an input field wherein the user enters the date and clicks on a button. The button click invokes a Javascript function to process certain commands (build together in a command sequence).
The command sequence is as follows:
SAP_BW_URL_Get() + "&CMD=PROCESS_VARIABLES" + "%26SUBCMD%3DVAR_SUBMIT" + "%26VAR_NAME_1
%3DZTD_LODT" + "%26VAR_VALUE_EXT_1%3D" + datef.DATE_1.value + "%26VAR_NAME_2%3DZTD_DTR" +
"%26VAR_VALUE_EXT_2%3D" + datef.DATE_1.value + "&CMD_1=ITEM%3DCHART_1%26CAPTION%3D" + c_hdr_1
+ "&CMD_2=ITEM%3DCHART_2%26CAPTION%3D" + c_hdr_2;
Note: datef.DATE_1.value, c_hdr_1 and c_hdr_2 are custom run time variables declared in my HTML / Javascript function.
The data providers by default are executed for the current date if no date is entered by the user which is the case when the web application is first executed.
The first command is to re-execute the Data Providers to get the data as per the date entered by the user. This command is for changing the relevant variables in the variable screen and executing it to get the data from the data providers.
The second and third command modify the caption of the web items CHART_1 and CHART_2 respectively.
When i execute the command sequence the first command seems NOT to be executed(expected change in data not visible in the web items) while the second and third command seem to be executed as the heading of web items is modified.
Before building the command sequence i had tested the each of the commands in isolation and it worked as expected i.e.
First Command: The data in the web items changed as per the date entered by the user
Second & Third Command: Heading of the web item changed
Why is the first command in the command sequence not getting executed with the desired result?
Looking forward to your views / clues which might help resolve this issue.
regards
NiteshHi Bala,
Refer the below thread...
Web Application Designer -
Terminal - make it exit after running a command
I am looking for a way to exit terminal after executing a command.
I have tried this sort of thing
Open Terminal.
File -> Save As...
Save as "My Command FIle"
Choose "Where". Desktop is easy to find. Move it later.....
Under "Execute this Command", put your command line in there.
example
ls -l >gj.out
ls -l >gj.out; exit
combinations of the above using different options under Terminal- Window Settings - Shell { Process, ..}
close on exit etc. have not worked for me.
I get the command to execute; however, it sits in terminal.
I need it to exit. ?killall will kill every instance of Terminal running on the machine, not just the one that this script is running in. You might want to try as a test script:
ps auxwwww | egrep $(echo $PPID)
which, hopefully will list the Terminal that the script is running in. Then you can use the PPID (Parent Process ID) as an argument to kill to kill only your instance of Terminal.
Roger -
[Solved] "slim: failed to execute login command" after awesomewm updat
Hi,
i updated some weeks ago via pacman -Syu, where also awesome wm was updated from 3.4.* to 3.5.* so I updated my rc.lua as it is told on their wiki, but i cant login with my rc.lua anymore i got the failed to execute login command error from slime. If i use the shipped efault rc.lua it works fine, can someone help me to figure out whats wrong with my rc.lua?
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local vicious = require("vicious")
function fullscreens(c)
awful.client.floating.toggle(c)
if awful.client.floating.get(c) then
local clientX = screen[1].workarea.x
local clientY = screen[1].workarea.y
local clientWidth = 0
-- look at http://www.rpm.org/api/4.4.2.2/llimits_8h-source.html
local clientHeight = 2147483640
for s = 1, screen.count() do
clientHeight = math.min(clientHeight, screen[s].workarea.height)
clientWidth = clientWidth + screen[s].workarea.width
end
local t = c:geometry({x = clientX, y = clientY, width = clientWidth, height = clientHeight})
else
--apply the rules to this client so he can return to the right tag if there is a rule for that.
awful.rules.apply(c)
end
-- focus our client
client.focus = c
end
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
-- beautiful.init("/home/kili/Repositories/awesome-themes/arch/theme.lua")
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvt"
editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.floating,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5}, s, layouts[1])
end
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal }
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })
-- {{{ Wibox
-- Create a textclock widget
batwidget = wibox.widget.textbox()
vicious.register(batwidget, vicious.widgets.bat,
function(widget,args)
local formatstring = " Bat: "..args[1]..args[2] .."%".. " "..args[3] .. " "
if args[2] <= 25 and args[1] == "-" then
return "<span color=\"red\">".. formatstring .. "</span>"
end
return formatstring
end, 60, "BAT0")
netwidgetETH = wibox.widget.textbox()
netwidgetWIFI = wibox.widget.textbox()
vicious.register(netwidgetETH, vicious.widgets.net, ' eth0:<span color="#CC9393">${eth0 down_kb}</span> <span color="#7F9F7F">${eth0 up_kb}</span>', 3)
vicious.register(netwidgetWIFI, vicious.widgets.net,' wlan0:<span color="#CC9393">${wlan0 down_kb}</span> <span color="#7F9F7F">${wlan0 up_kb}</span>', 3)
menubar.utils.terminal = terminal
mytextclock = awful.widget.textclock()--{ align = "right" })
-- Create a systray
mysystray = wibox.widget.systray()
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, function(t) awful.tag.viewnext(aweful.tag.getscreen(t)) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(aweful.tag.getscreen(t)) end)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
c.minimized = false
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt()--{ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(mylauncher)
left_layout:add(mytaglist[s])
left_layout:add(mypromptbox[s])
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(netwidgetWIFI)
right_layout:add(netwidgetETH)
right_layout:add(batwidget)
right_layout:add(mytextclock)
right_layout:add(mylayoutbox[s])
-- Now bring it all together (with the tasklist in the middle)
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_middle(mytasklist[s])
layout:set_right(right_layout)
mywibox[s]:set_widget(layout)
-- Add widgets to the wibox - order matters
--mywibox[s].widgets = {
-- mylauncher,
-- mytaglist[s],
-- mypromptbox[s],
--layout = awful.widget.layout.horizontal.leftright
-- mylayoutbox[s],
-- mytextclock,
-- batwidget,
-- netwidgetETH,
-- netwidgetWIFI,
-- s == 1 and mysystray or nil,
-- mytasklist[s],
-- layout = awful.widget.layout.horizontal.rightleft
end
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show() end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
awful.key({ modkey, "Control" }, "n", awful.client.restore),
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey }, "x",
function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
end),
-- Multimedia
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 2dB-") end),
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 2dB+") end),
awful.key({ }, "XF86AudioNext",function () awful.util.spawn( "mocp -f" ) end),
awful.key({ }, "XF86AudioPrev",function () awful.util.spawn( "mocp -r" ) end),
awful.key({ }, "XF86AudioPlay",function () awful.util.spawn( "mocp -G" ) end),
awful.key({ }, "Print", function () awful.util.spawn("ksnapshot") end),
awful.key({ }, "", function () awful.util.spawn("slimlock") end)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
-- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end),
awful.key({ modkey, "Shift" }, "f", fullscreens)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber))
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- Set Firefox to always map on tags number 2 of screen 1.
-- { rule = { class = "Firefox" },
-- properties = { tag = tags[1][2] } },
-- {{{ Rules
if screen.count() > 1 then
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
-- border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
{ rule = { class = "Xdialog" },
properties = { floating = true } },
{ rule = { class = "Firefox" },
properties = { tag = tags[1][1] } },
{ rule = { name = "Thunderbird" },
properties = { tag = tags[1][2] } },
{ rule = { instance = "plugin-container" },
properties = { floating = true } },
{ rule = { class = "Luakit" },
properties = { floating = true } }
else
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
-- border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
{ rule = { class = "Firefox" },
properties = { tag = tags[1][2] } },
{ rule = { name = "Thunderbird" },
properties = { tag = tags[1][3] } },
{ rule = { instance = "plugin-container" },
properties = { floating = true, fullscreen = true } },
{ rule = { class = "Dolphin" },
properties = { floating = false, fullscreen = false, tag = tags[1][4] } },
{ rule = { class = "Luakit" },
properties = { floating = true } },
{ rule = { class = "Pidgin" },
properties = { tag = tags[1][5] } }
end
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c, startup)
-- Add a titlebar
-- awful.titlebar.add(c, { modkey = modkey })
-- Enable sloppy focus
c:connect_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
local titlebars_enabled = false
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(awful.titlebar.widget.iconwidget(c))
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
right_layout:add(awful.titlebar.widget.floatingbutton(c))
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
right_layout:add(awful.titlebar.widget.stickybutton(c))
right_layout:add(awful.titlebar.widget.ontopbutton(c))
right_layout:add(awful.titlebar.widget.closebutton(c))
-- The title goes in the middle
local title = awful.titlebar.widget.titlewidget(c)
title:buttons(awful.util.table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
client.focus = c
c:raise()
awful.mouse.client.resize(c)
end)
-- Now bring it all together
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_right(right_layout)
layout:set_middle(title)
awful.titlebar(c):set_widget(layout)
end
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
Here is also my slime config and my initrc
ls -lisa .xinitrc
3276814 4 -rwxr-xr-x ...
#!/bin/sh
xrdb -merge ~/.Xresources
wicd-client --tray &
exec awesome #>> ~/.cache/awesome/stdout 2>> ~/.cache/awesome/stderr
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path /bin:/usr/bin:/usr/local/bin
default_xserver /usr/bin/X
xserver_arguments -nolisten tcp vt07
# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd /usr/sbin/suspend
# Full path to the xauth binary
xauth_path /usr/bin/xauth
# Xauth file for server
authfile /var/run/slim.auth
# Activate numlock when slim starts. Valid values: on|off
numlock on
# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor false
# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd exec /bin/sh - ~/.xinitrc %session
login_cmd exec /bin/bash -login ~/.xinitrc %session
# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
# sessionstart_cmd some command
# sessionstop_cmd some command
# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon yes
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions awesome,xfce4,icewm-session,wmaker,blackbox
# Executed when pressing F11 (requires imagemagick)
screenshot_cmd import -window root /slim.png
# welcome message. Available variables: %host, %domain
welcome_msg Welcome to %host
# Session message. Prepended to the session name when pressing F1
# session_msg Session:
# shutdown / reboot messages
shutdown_msg The system is halting...
reboot_msg The system is rebooting...
# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user kili
# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
focus_password yes
# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login no
# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme archlinux-simplyblack
# Lock file
lockfile /var/lock/slim.lock
# Log file
logfile /var/log/slim.log
Thanks in advance!
Edit:
Besides a lot of other errors the problem was the systray. It was created 2 times, now login works again. I figured that out via enabling logging for awesome in the xinitrc again.
Last edited by stubb (2013-01-08 23:20:05)Hi,
I have the same kind of issue after updated slim from v1.3.4-4 to v1.3.5-1.
see my topic here :
https://bbs.archlinux.org/viewtopic.php?id=156792
Last edited by cedricl (2013-01-24 17:16:42) -
Execute a command after 3 seconds...
hey guys... there´s a way on AS to execute a command like.... menu2items.selectedIndex = 2; after some seconds?
cya....Example code:
import flash.utils.Timer;
import flash.events.TimerEvent;
// create a timer that executes after 3 seconds, only once
public var timer:Timer = new Timer( 3*1000, 1 );
public function init():void
// add event listeners
timer.addEventListener( TimerEvent.TIMER, handleTimerEvent );
// start the timer
timer.start();
public function handleTimerEvent( event:TimerEvent ):void
menu2items.selectedIndex = 2;
Let me know if that helps...
Ben Edwards -
Unable to execute update commands after improper shutdown
Hi!
It sounds a little strange.
I am unable to execute update commands from my application. My machine was shutdown improperly. Then I loaded the datastores again. I was able to execute select commands but unable to execute update commands. It was working fine before shutdown.
Regards
/AhmadHi Chris!
SQLExecute method of ODBC is returning -1.
I have checked the syntax of the query its also correct. I am also very confused on it why is this happening. If I execute the update command from ttisql it works ok.
The code is the same that we discussed in our previous conversation.
The steps I did after improper shutdown:
1. Started TimeTen daemon >ttdaemonadmin -start
2. Loaded the Data store >ttAdmin -ramLoad spiderM
3. Executed the code
The output of ttstatus is as follows:
TimesTen status report as of Fri Jun 29 21:45:41 2007
Daemon pid 8273 port 17001 instance tt70
TimesTen server pid 8284 started on port 17003
TimesTen webserver pid 8280 started on port 17005
Data store /tmp/spiderM
There are 6 connections to the data store
Data store is in shared mode
Shared Memory KEY 0x08004f3c ID 557070
Type PID Context Connection Name ConnID
Subdaemon 8278 0x0000000000570520 Worker 2042
Subdaemon 8278 0x00000000005dc4d0 Flusher 2043
Subdaemon 8278 0x000000000060d5d0 Checkpoint 2044
Subdaemon 8278 0x000000000063e5a0 Aging 2045
Subdaemon 8278 0x000000000066f570 HistGC 2046
Subdaemon 8278 0x00000000006a0430 Monitor 2047
RAM residence policy: Manual
Data store is manually loaded into RAM
Replication policy : Manual
Cache agent policy : Manual
Data store /usr/users/spider/TimesTen/tt70/info/TT_tt70
There are no connections to the data store
Replication policy : Manual
Cache agent policy : Manual
Access control enabled.
End of report
Regards
/Ahmad -
Error 801 when executing external command on
Hello,
I have installed CCMS agents and CCMS ping in my system yesterday. And activated the CPH BGD jobs for SL reporting purpse. Now I am getting an error "Error 801 when executing external command on" under class LC 2. I am not able to find any relevant note or help for this error. Any idea why this happens? How can I solve this? The details as follows:
EXTERNAL COMMAND: rc = Error 801
SXPG_COMMAND_EXECUTE(LONG):
<timestamp>: 20100310144206
COMMANDNAME: PING
ADDITIONAL_PARAMETERS: s-sapcae
LONG_PARAMS:
OPERATINGSYSTEM: AIX
TARGETSYSTEM: sapasmc1
DESTINATION:
SY-SUBRC: 801
Regards,
RajeevHi,
I have activated the trace level to 3 and now I get some messages in dev_cp which is as follows:
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 720
2010-03-11 08-52-09 : Before BtcXpgDetach
> Function: BtcXpgDetach < Function: BtcXpgDetach Accept RFC connection from R/3 system
2010-03-11 08-52-09 : Before RfcAccept
2010-03-11 08-52-09 : RfcAccept returned OK
Begin of check_if_security_list
security check switched OFF
End of check_if_security_list
Begin of check_trace_option
End of check_trace_option
Install RFC call SAPXPG_START_XPG
Install RFC call SAPXPG_START_XPG_LONG
Install RFC call SAPXPG_END_XPG
Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
2010-03-11 08-52-09 : Before first call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user = TT4WNUC
sapxpg_logon_check: rfc_attr.user = TT4WNUC
rfcexec_logon_check: client = 100
2010-03-11 08-52-09 : After first call of RFCDispatch
2010-03-11 08-52-09 : Before call of RfcClose (sequencing error)
2010-03-11 08-52-09 : After call of RfcClose (sequencing error)
< Function: main
2010-03-11 08-52-09 : End of SAPXPG: main
I think the issue is with the user TT4WNUC. Could you please let me know from where I can change this user?
Rajeev -
Reading columns after a "fetch_rows" command
Dear All:
Could somebody help me with this issue?
The following is a sample code to declare, open and fetch a Dynamic Cursor using BIND_ARRAY command ...
declare
c number;
d number;
n_tab dbms_sql.Number_Table;
indx number := -10;
begin
c := dbms_sql.open_cursor;
dbms_sql.parse(c, 'select cod from emp order by 1', dbms_sql);
dbms_sql.define_array(c, 1, n_tab, 10, indx);
d := dbms_sql.execute(c);
loop
d := dbms_sql.fetch_rows(c);
/* The problem is here ...... */
/* After to read the first row, I can not identify a way to read the following row fetched, how can I read the first 10 rows fetched and stored in n_tab variable? */
dbms_sql.column_value(c, 1, n_tab);
exit when d != 10;
end loop;
dbms_sql.close_cursor(c);
exception when others then
if dbms_sql.is_open(c) then
dbms_sql.close_cursor(c);
end if;
raise;
end;
The problem is that I can not identify a way to read each row fetched in n_tab after the fetch_rows command, It's supposed that n_tab store 10 rows each time, but how can I read these 10 rows? Is it enough with the column_value command? after this Do I have to reference each row by n_tab[1], n_tab[2] .... n_tab[10] to read the codes fetched?
Thank you to everybody for your attention
Regards
JosiDear All:
Could somebody help me with this issue?
The following is a sample code to declare, open and fetch a Dynamic Cursor using BIND_ARRAY command ...
declare
c number;
d number;
n_tab dbms_sql.Number_Table;
indx number := -10;
begin
c := dbms_sql.open_cursor;
dbms_sql.parse(c, 'select cod from emp order by 1', dbms_sql);
dbms_sql.define_array(c, 1, n_tab, 10, indx);
d := dbms_sql.execute(c);
loop
d := dbms_sql.fetch_rows(c);
/* The problem is here ...... */
/* After to read the first row, I can not identify a way to read the following row fetched, how can I read the first 10 rows fetched and stored in n_tab variable? */
dbms_sql.column_value(c, 1, n_tab);
exit when d != 10;
end loop;
dbms_sql.close_cursor(c);
exception when others then
if dbms_sql.is_open(c) then
dbms_sql.close_cursor(c);
end if;
raise;
end;
The problem is that I can not identify a way to read each row fetched in n_tab after the fetch_rows command, It's supposed that n_tab store 10 rows each time, but how can I read these 10 rows? Is it enough with the column_value command? after this Do I have to reference each row by n_tab[1], n_tab[2] .... n_tab[10] to read the codes fetched?
Thank you to everybody for your attention
Regards
Josi -
LC 2 Error 1003 when executing external command brconnect on (xpgid=0,con
Dear all,
I am getting error in sm21.Please suggest .
Details Page 2 Line 23 System Log: Local Analysis of clusa 1
Time Type Nr Clt User TCode Grp N Text
10:00:32 DIA 000 600 DDIC LC 2 Error 1003 when executing external command brconnect on (xpgid=0,convid=.)
Error 1003 when executing external command brconnect on (xpgid=0,convid=.)
Details
Recording at local and central time........................ 10.05.2010 10:00:32
Task...... Process User...... Terminal Session TCode Program Cl Problem cl Package
06952 Dialog work process No. 000 DDIC 1 SAPMSSY1 S Operation Trace SBTC
No documentation for syslog message LC 2 exists
Parameter
1 .... xpgid=0,convid=.
Technical details
File Offset RecFm System log Grp N variable message data
224 260640 LC 2 brconnect & &Error 1003 & & &
Regards,
KumarDear Juan,
Please find the logs.Please suggest.
dev_cp log
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 720
2010-05-10--09-33-29 : Before BtcXpgDetach
> Function: BtcXpgDetach < Function: BtcXpgDetach Accept RFC connection from R/3 system
2010-05-10--09-33-29 : Before RfcAccept
2010-05-10--09-33-29 : RfcAccept returned OK
Begin of check_if_security_list
security check switched OFF
End of check_if_security_list
Begin of check_trace_option
End of check_trace_option
Install RFC call SAPXPG_START_XPG
Install RFC call SAPXPG_START_XPG_LONG
Install RFC call SAPXPG_END_XPG
Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
2010-05-10--09-33-29 : Before first call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user =
sapxpg_logon_check: rfc_attr.user = BASIS
rfcexec_logon_check: client =
> Function: BtcXpgStartXpgLong
2010-05-10--09-33-29 : Beginning of BtcXpgStartXpgLong
> Function: BtcXpgStartXpgImportLong > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgTable < Function: BtcXpgTable < Function: BtcXpgStartXpgImportLong
BtcXpgStartXpgLong: special_trace_flag = <6>
> Function: BtcXpgStartXpgInt > Function: BtcXpgItTransfer Content of source log table:
Line Text
<No StdOut/StdErr output reported>
Target log table is not identical to source
ItGetLine terminated with NULL
< Function: BtcXpgItTransfer > Function: BtcTrcReset < Function: BtcTrcReset Call mode: VIA RFC
Input arguments of BtcXpgStartXpg:
External program: brtools
tracecntl = : 6
Display of Parameter string switched off !!
Contents of control flags:
StdIn control flag: redirect StdIn
StdOut control flag: store StdOut output in memory
StdErr control flag: store StdErr output in memory
Trace control flag: unknown contents
Termination control flag: control program will wait for termination
> Function: BtcXpgCheck > Function: BtcXpgArgv
parameter number 1:
parameter number 2:
parameter number 3:
parameter number 4:
parameter number 5:
parameter number 6:
parameter number 7:
Total number of arguments scanned: 7
Argument argv[0]: brtools
< Function: BtcXpgArgv < Function: BtcXpgCheck > Function: BtcXpgSigInst < Function: BtcXpgSigInst > Function: BtcXpgStart Rearrange stderr to be collected in memory
Rearrange stdout to be collected in memory
Redirect stdin, read from NUL:
> Function: BtcTrcInit< Function: BtcXpgStartStart status of external program: external program successfully started
Id of external process: 0000005296
StdOut/StdErr collected in memory
Line Text
<No StdOut/StdErr output reported>
< Function: BtcXpgStartXpgInt> Function: BtcXpgStartXpgExport > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam< Function: BtcXpgStartXpgExport
2010-05-10--09-33-29 : End of BtcXpgStartXpgLong
< Function: BtcXpgStartXpgLong
2010-05-10--09-33-29 : After first call of RFCDispatch
Wait for RFC call SAPXPG_END_XPG
2010-05-10--09-33-29 : Before second call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user =
sapxpg_logon_check: rfc_attr.user = BASIS
rfcexec_logon_check: client =
> Function: BtcXpgEndXpg
2010-05-10--09-33-29 : Beginning of BtcXpgEndXpg
> Function: BtcXpgStartXpgExport > Function: BtcXpgTable < Function: BtcXpgTable < Function: BtcXpgEndXpgImport > Function: BtcXpgEndXpgInt > Function: BtcXpgItTransfer Content of source log table:
Line Text
<No StdOut/StdErr output reported>
Target log table is not identical to source
ItGetLine terminated with NULL
< Function: BtcXpgItTransfer > Function: BtcXpgReadChild Output of external command not written to log !!
Process executing external program has terminated
< Function: BtcXpgReadChild > Function: BtcXpgEnd < Function: BtcXpgEnd Termination status of external program: no errors reported
StdOut/StdErr collected in memory
< Function: BtcXpgEndXpgInt > Function: BtcXpgEndXpgExport > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam < Function: BtcXpgEndXpgExport
2010-05-10--09-33-30 : End of BtcXpgEndXpg
< Function: BtcXpgEndXpg
2010-05-10--09-33-30 : After second call of RFCDispatch
2010-05-10--09-33-30 : After call of RfcClose (wait)
< Function: main
2010-05-10--09-33-30 : End of SAPXPG: main
dev_xpg
Trace file of External Program (trace level 3)
< Function: BtcTrcInit> Function: BtcXpgStart External program: brtools -sid prd -F printout alert_log 20100401000000 0128
Regards,
Kumar -
Hi
I realise there is a Runtime class to help execute Unix commands from within Java code, but how would this work if the command required a password.
For example, were I to try to execute:
ssh -Y myserver.domain.com -u Myself -p
How would this work with supplying the password (which is prompted for after the command is sent to the shell)?
Thanks
Davefrom the ssh man page under "environment variables": SSH_ASKPASS
If ssh needs a passphrase, it will read the passphrase from the
current terminal if it was run from a terminal. If ssh does not
have a terminal associated with it but DISPLAY and SSH_ASKPASS
are set, it will execute the program specified by SSH_ASKPASS
and open an X11 window to read the passphrase. This is particu-
larly useful when calling ssh from a .xsession or related
script. (Note that on some machines it may be necessary to
redirect the input from /dev/null to make this work.) -
Go_block doesn't wait after execute query.
Hi All,
I have an issue with go_block and execute query sequence. I have a code
snippet which is in a program unit called form key-exeqry trigger. As per
the expected behaviour the cursor should wait on the block for user input.
But it just shows the block with the details and moves to the next code
after execute-query. I added few debug messages in when-new-block-instance
and pre-query triggers for the block, but none of them get executed.
This block is being displayed through an another flow and there it waits .
Please help!!
Thanks in advance
Ashok
if l_cnt >0 then
message('condition matched');pause;
l_where := 'acct_no = 1114';
go_block('sel_acct');
clear_block(no_validate);
set_block_property('sel_acct',DEFAULT_WHERE,l_where);
execute_query;
message('after sel_acct');pause;> As per the expected behaviour the cursor should wait on the block for user input.
You are confusing Enter_Query with Execute_Query.
If you change your Execute_Query to Enter_Query, the process will stop and allow the user to enter query values. However, your next line,
message('after sel_acct');pause;
will never execute.
But, you should NOT code the Enter_Query command in a process called by Key-Exeqry, since the user needs to press Key-Exeqry after he enters query values. Your process above should be initiated by a Key_EntQry trigger instead. -
Vbs script called from a service cannot execute certain commands
We have a service, running as domain admin user on Win Svr 2008 std ed, that must execute vb scripts. The scripts execute, but calls to SETX.exe using Shell.Run fail to set environment variables. However, SETX returns no errror
msg.
If I run the same script within a CMD window with elevated privilege (e.g. Administrator), the script works as expected and environment variables are set.
What is going on? File creation fails as well.
The call looks like this:
gnReturnCode= RunCmd("setx.exe UD_UPGRADING_RELEASE "True" /m",True)
Where RunCmd is as follows:
' Function: RunCmd( ByVal strCmd, ByVal bWait)
' desc: Execute a command string and wait for result if indicated
Function RunCmd( ByVal strCmd, ByVal bWait)
Dim nReturnCode, strWholeCmd
nReturnCode= 0
strWholeCmd= "%comspec% /c "&strCmd&" >"&gcsLogFile2
nReturnCode= goShell.Run(strWholeCmd,0,bWait)
WriteLog( "RunCmd("&strCmd&","&bWait&") returned "&nReturnCode)
RunCmd= nReturnCode
End Function
Mark Maddox Sr. Tech SpecialistI did the following and am providing comments on each:
Run setx.exe from a Command Prompt.
RESULT: This works and can be seen by new processses regardless of privilege provided they are done under the same credentialed user.
Run a really simple script from the Command Prompt, e.g. the one below, and check if it works.
Set oWshShell = CreateObject("WScript.Shell")
sCMD = "cmd /c setx.exe Test %time% /m"
wscript.echo "Error code=" & oWshShell.run(sCmd, 0, true)
RESULT: This works and result can be seen by new processes regardless of privilege provided they are done under the same credentialed user. My attempts to user another credentialed user failed with a permission to access reegistry path not
granted.
Run the same script as a scheduled task, using the same account as you use for your service, then check if it worked.
RESULT: Script ran, but only new processes with elevated privilege could see the change. New processes without elevated privilege could not see the change. I had to log out and log back in for new processes without elevated privilege
to pick up the change.
Run that script as a service, then check again if it worked.
RESULT: Script ran, but only new processes with elevated privilege could see the change. New processes without elevated privilege could not see the change. I had to log out and log back in for new processes without elevated privilege
to pick up the change.
Mark Maddox Sr. Tech Specialist
P.S. I also created an application that gets called after the the script has made environment variable changes. It broadcasts the WM_SETTINGCHANGE message. I did this in hopes that something would refresh in the Windows OS allowing non-privileged
users to see the change. It did not help. Here's the C++ line that I executed:
LRESULT error1 = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)
"Environment", SMTO_ABORTIFHUNG,
5000, &dwReturnValue); -
Problems passing timestamp variable to block-SQL command not properly ended
Can you please help me answer or direct me to resources in answering the following.
I'm attempting to pass a timestamp variable to a block but am getting errors with every method I've tried yet.
The example below is attempting to generate a list of all sales dates for orders after the 21st of March 2000.
DECLARE
BeginDate Orders.PurchaseDate%TYPE :=to_date('21-3-2000', 'dd-mm-yyyy');
Target Orders.PurchaseDate%TYPE;
BEGIN
DBMS_OUTPUT.PUT_LINE(to_char(BeginDate));
SELECT Distinct PurchaseDate from Orders into Target WHERE PurchaseDate>BeginDate;
END;
When running it - it returns
ORA-00933: SQL command not properly ended ORA-06512: at line 8Please advise-- I"m still trying to get a timestamp into an execute immediate statement.
Declare
BeginDate Orders.PurchaseDate%TYPE :=to_date('21-3-2000', 'dd-mm-yyyy');
var_date Orders.PurchaseDate%TYPE ;
BEGIN
DBMS_OUTPUT.PUT_LINE(to_char(BeginDate,'DD.MM.YYYY'));
sql1 = 'SELECT MAX(PurchaseDate) INTO Target from Orders WHERE PurchaseDate> :var_date';
Execute Immediate sql1 Using BeginDate;
DBMS_OUTPUT.PUT_LINE(to_char(Target,'DD.MM.YYYY'));
END;
Thanks again for the replies, I'm still not there yet even after re-reading the documentation that applies to this,
Using what follows below the Execute Immediate line/syntax is the problematic part of this...
to quote the block line still returning errors.
This line which would seem natural...
Execute Immediate sql1 Using BeginDate;returns -- missing keyword
Modified with this line attempts to pass another variable to the block also errors.
Execute Immediate sql1 Using BeginDate, var_date;returns -- ORA-01006: bind variable does not exist
Perhaps I'm not getting some key concept here, but I would think passing a variable into execute immediate would be
as simple as passing a string or int into a *.bat,*.sh file or function/procedure in any other language.
And/or I'm missing a key element or understanding to how this syntax should work.
Thank you very much for your previous replies any other ideas welcome. -
How to Execute shell commands in OSB
Team,
My Requirement:
I have two sftp servers name ServerA and ServerB. Need to copy files from ServerA and place it on ServerB and change the file permissions to 777 after placing the files.
The user i am connecting to ServerB has the access to override file permissions.
Steps
1. With help of FTP adapter in OSB I am reading files from ServerA and writing on to ServerB -- Completed and is working.
2. How to override file permissions after placing the file ????? -- Yet to implement.
Please suggest me how can i accomodate 2nd step.
Thanks,
Suman V.If by "execute shell commands" you mean actually
running a shell process (as opposed to just forking
and executing specified programs) then I'd advise
against it. The last thing you want is for the
clients to be running arbitrary commands on the
server. You don't want to make it possible for the
client to run "rm -fr /" on your server.Right.
I was assuming (perhaps with more optimism than is really warranted) that the OP was going to be in complete control of which commands were executed--that there'd be a small, fixed set in response to certain user actions.
Maybe you are looking for
-
Preloading in Flash CS3/Actionscript 3
I am wondering if anyone know why this is happening: I built a preloader based on code from the net. Once the preloader plays through (in simulated download) it opens to the first "stop();" in the MC timeline instead of starting at frame 1. Here is t
-
FCP X multiclip dropped frames?
After playing a multiclip for a few seconds, it begins to drop frames, then freezes. And up comes this image. What's up? It's on my new 8gig iMac
-
Editing map lines in iPhoto book
I am trying to draw 3 separate lines terminating in the same place on a map in an iPhoto book. That is a line from point a to point b to point z; another from c to d to z and a third from e to f to z. When I add the locations in order (abzcdzefz) I g
-
Hi, We are upgrading our exisiting database (9.2.0.8.) to Oracle Database 11g R2, it has got spatial and non spatial data, i need to know best approch to migrate the database. Thanks !!
-
Como hago para Activar mi iphone?
Hola, Actualice mi iphone 3gs y se cargo y todo pero cuando entro me pide el idioma, el pais la Wifi y arranca el proceso de Activar el Iphone pero me sale un error que imposible activarlo, no me deja seguir y solo me dice reintentar.