Programming :: Send A Run Program Command To Shell Thats Located In /home/user/myapp Using ./myapp From Irssi?
Mar 26, 2010
I am currently working to develop a perl script for irssi that will capture data from irc channel hold it in memory as variable and send it to a shell. Does anyone know a good irssi irc scripting guide? something that will include $botname, $msg, $nick, $channel etc scripting explanation. Is it possible to send a run program command to shell thats located in my /home/user/myapp using ./myapp from irssi? i am using bash. I've only just started, so i dont have any code written yet,
I am going to add following line to the /etc/fstab file /dev/sda4 /MyApp ext3 noatime, errors=remount-ro 0 5 Does it also create directory "MyApp"? Or which kernel file is responsible for creating the directories? Also on linux, which kernel file is able to create some soft links and additional directories?
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 18.104.22.168-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?
I have 2 computers with linux, How can i send with ftp files from computer1 to computer2 them(shell command)? Steps that i think should be done (miss shell commands): find inner ip of computer1 open the ftp port (21) of computer1 (make computer1 ftp server) send file from computer2 to computer1 with shell command
Is there an easy to use program that I can use to send mail from the command line? I want to be able to create a batch script to send mail from different text files. What I'm looking for is something like: mailapp mailserveraddress destinationmailaddress mymailaddress filetosend
I'm building a Linux From Scratch system and partially automating it. I will likely want to do it again, and I would like to try to almost completely automate it.
My current approach is a script that takes an input file and sequentially runs each line in a new instance of bash. If one fails, it gives me the number of the step that failed so that I can use the "--step" option to resume after I fixed the issue.
This has some problems: A varible created on one line will not be accessible on the next line. This is because each line is run in a separate shell (the reason for this is so that the commands in the input file and the script's internal variables can't interfere). You can't switch users or use chroot, again because each line is run in a separate shell.
What would be nice is to be able to start a bash process in the background and send commands to its stdin. I guess that a named pipe would work, but the named pipe will be gone after a chroot. Is there a way to do it without relying on the filesystem? Also, how do I know if the command failed?
Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.
The short version: I have to manage some virtual machines using php shell_exec function, so far I cant do this because apache is run by the user www-data and virtualbox by the user vboxuserFrom what I've read so far, I've thought of 3 possible solutions: 1.- Create a script on my vboxuser that I can call from php to manage the Virtual Machines.2.- Change the apache user from www-data to vboxuser so I can manage the Virtual Machines through php 3.- Reinstall VirtualBox, this time using www-data as my user. I'm not sure if any of these will work and I'm not too sure of which would be the best solutionNow the longer more detailed version:
I have a remote server running Ubuntu 10.04.2, in that server I have set up VirtualBox so I can run several instances of WinXP to perform different tasks. Everything is setup and I can manage the virtual machines through SSH. If I want to run them as a different user than the one that created them (a user that so far only has been used to create the Virtual Machines) I have to do sudo -u vboxuser.Now, I need to create a PHP script to manage these virtual machines (I know about phpVirtualBox, but it's not what I need). If I try to run the virtual machines using shell_exec() from php, I get no answer at all (And I have tested that shell_exec is working on my server).
In below program I want to add (as part of the valid_cmds string) the pwd (print working directory), lo (logout), and cd (change directory) commands. However when I add those into original program ; char *valid_cmds = " ls ps df pwd lo cd"; they are not working I have the cout message huh? Original source code is below code...
Why would rsync insert a user's home directory path in variable expansion when run via cron, but not when run manually. The gory details... Red Hat Enterprise Linux AS release 4 (Nahant Update 6) Linux 2.6.9-67.0.20.ELsmp The script (parts anyway, and simplified)...
I want to send something through the serial port, for example
the point here is send some numbers to a couple of 7 seg displays, so I will wire a RS232 chip on a protoboard, the logic after the RS232 is not an issue, but how can I assure the data is being sent right from my linux box to the RS232 chip, the one on the protoboard? Do I have to write a C program to read the strings and then send them to the serial port?For example if I wanted to send this to the displays:
So I guess the simplest way is (Supposing I can deal with the stream so it is filtered and only display the number array) $ ifstat > /dev/ttyS0 But, how do I know if the RS232 will take them as the right characters?
Is there a non-root shell command that can tell me if a user's account is disabled or not? note that there is a fine distinction between LOCKING and DISABLED:
LOCKING is where you prepend ! or * or !! to the password field of the /etc/passwd file. On Linux systems that shadow the passwords, this marker flag may be placed in /etc/shadow instead of /etc/passwd. Password locking can be done (at a shell prompt) via password -l username (as root) to lock the account of username, and the use of the option -u will unlock it.
DISABLING an account is done by setting the expiration time of the user account to some point in the past. This can be done with chage -E 0 username, which sets the expiration date to 0 days after the Unix epoch. Setting it to -1 will disable the use of the expiration date.
The effect of locking to to prevent the login process from using a supplied password to hash correctly against the saved hash (by virtue of the fact that the pre-pended marker character(s) are not valid output character(s) for the hash, thus no possible input can ever be used to generate a hash that would match it). The effect of disabling is to prevent any process from using an account because the expiration date of the account has already passed.For my situation, the use of locking is not sufficient because a user might still be able to login, e.g. using ssh authentication tokens, and processes under that user can still spawn other processes. Thus, we have accounts that are enabled or disabled, not just locked. We already know how to disable and enable the account - it requires root access and the use of chage, as shown above.To repeat my question: is there a shell command which can be run without root privileges which can output the status of this account expiration info for a given user? this is intended for use on a Red Hat Enterprise 5.4 system.The output is being returned to a java process which can then parse the output as needed, or make use of the return code.
I recently installed Ubuntu 11.04 with Unity as the default desktop environment, but I wanted Gnome 3 instead. So the installation of Gnome 3 and Gnome Shell went through, and I'm presented with a nice "gnomeish" gdm, but when I type my user password and try to log in all I get is this:
Code: Could not update ICEauthority file /home/pontus/.ICEauthority And all I can click is a button that logs me out.
I've tried from the terminal to change owner and rights and I've even tried to delete the file, but I still get this dialog every time I log in.
In Windows, I was able to use IE as a user interface because I could code a WSF (Windows equivalent to shell script) to respond to events in IE.Now that I've moved to Linux/Firefox, I'd like to use Firefox in a similar way. Specifically, I would like to write a bash script to run lsdvd with XML output, use XSL to transform the XML for Firefox, then take an action (encode a selected track on the DVD) based on the user's selection. I would be happy if I could make Firefox write something somewhere that the script could read, but I suspect that security measures would prevent that.