Software :: Right Order And Grouping Of Sudo, Nice, Output Redirection And "&" To Start A Program?
Mar 1, 2010
I have an X11 GTK program, let's name it "foo".I would like to start it from command line, either from a text console, or from an ssh log-in. I want to run foo with Administrator privileges and in higher priority, and I need redirect standard output and standard error. Standard errors must go to syslog, except "libglade Warning" messages and empty line messages. Standard output is redirected to a file.I wrote a script, called "foo-start". The "foo" program must run continously, so the "foo-start" script should not wait for "foo"'s termination.The scrip actually looks likelike this:
I have a program that writes to stdout. Is there a way that I can redirect the output to the linux diff command or do I have to write the output to a file and then compare that. For example I have a bunch of test input files for a program and the corresponding expected output in another set of files. And I'd like to do something like ./program < t1.input | diff t1.expected.
Code: # dbus-monitor --system >> /data/eject.txt This one works as expected ... dbus-monitor never terminates and whenever it outputs new lines, they are
I'm working on some scheduled task script files to keep nightly backups of some of our database information in place, and it's a bit annoying when they blow up. I know how to redirect stdout and stderr to a flat file I can view when I come in, and I know that 2>&1 maps them both to the same file (whatever was named in 1). However, I'm running into some cron-time situations where it's easier to have the two streams together, and other cron-time situations where it's easier to have them separated. I can't really tell which is going to happen; is there some way I could create both kinds of output file for my scripts, so that I've got a std_err only file and an interleaved std_out/std_err file?
Note: I've looked at the 'tee' command, but I don't think it will work for what I'm after. 'tee' appears to only work with stdout; I'm trying to work with stderr.
In principle my java installation works perfect now I tried to increase priority with nice. So I put special user rights to nice: chmod u+s /usr/bin/nice
And then tried: nice -n -20 java something but this gives me the error that libjli.so is missing.
If i login to my home server with ssh -X, and open close gui program. I cannot exit the shell normaly with ctrl+d. I think now there to many connection not closed correctly. So now i get the message:
ssh_exchange_identification: Connection closed by remote host
Is there a prober way to close the connection, after using a gui program?
I've a program which manages my pdf and references. I wish to put some of the information on my website but that program (Mendeley) does export only in XML (or bibtex). I'd like to simply convert the XML output files to SQL in order to create or update an SQL database.I'm not an expert in either XML or SQL (use only PHPMyadmin). Does someone get help me to figure out?
I worte somewhere in time here about this, but I cant find it.. I have a problem, when starting KDE, it begins to start applications, usually the ones that were open (thanks God)... however, order is a bit screwed... It opens Skype, KTorrent, Kopete, Sound, Keyboard and finally, NetworkManager...I would like to put Network to be ran 1st.
In Windows 7, the options are pretty nice - ability to change track name, artist, composer, album, song number in album, etc., all from "Properties." In Ubuntu 10.10, Properties really gives you the bare minimum. Is there a program to download in order to get the same sort of basic options as one does from Properties in Windows 7?
I have made two source files named as sum.c and average.cI have included sum.c in average.c both files in Documents directory.when i compile average.ot followingerror"average.c:4:22: fatal error: sum.c: No such file or directorycompilation terminated.How to solve this issue?I have tried to copy sum.c to usrinclude folder but unable to copy
as i am planning to buy a new computer at the end of this month i am willing to give fedora 15 a try. right now im trying out gnome, xfce and the kde release on my laptop.i really like the feature of kde to set window behaviour for whole applications but i couldnt find one setting that i hoped i would.on mac os x, different windows of, lets say, the browser are all spawned behind one another but a little shifted to the bottom right. does kde have this feature, too?
Certain commands like: fdisk -l nmap -sT 192.168.0.1/24 iftop
require administrator privileges to run. A while ago i read a post(forgot where i read it) about being able to let a user run these commands in a script (that contains the desired command) created by the administrator/root without the user having to do a sudo and entering a password. Does anyone know how i can go about doing this?
I need to add a program to my startup menu (webserver which needs sudo for port80). I follow their directions, but it breaks the program and no pages are served. I will not be home to guide wife and kids every time they boot the machine to sudo start the program. How do you start a program at boot, as root or sudo start.
I am running an Ubuntu Server 10.10. I have installed Apache2, I put my perl script in /var/lib/cgi-bin. When I run this perl script from the terminal it works fine. When go to a web browser it doesn't. When I look at Apache's error log, I see this line :"sudo no tty present and no askpass program specified"I tried editing the sudoers file, with the user www-data ALL=(ALL) NOPASSWD:/path_to_my_script. But nothing changed. What am I doing wrong?
I'm having an issue with my AWN dock where I have enabled it to'group similarapplications', i.e multiple windows of the the same applicationIn 9.10, AWN distinguished between different WINE applications and used their native icons.In 10.04 AWN doesn't distinguish, see the pic belowScreenshot-2.jpgs you can see AWN groups my WINE applications under one icon, the spotify icon and you can see the MS Word logo to the right. This is very irritating since I would like to have separate WINE shortcuts on my taskbar! I'm sure this will affect some other users too.Anyone know how to sort this out?N.B I can't use cairodock as I have issues with freezing and icons not appearing, and i feel docky isn't up to speed with the same functionality as the others for the time being.
I am running a fresh install of Lucid 64bit with Desktop effects enabled and the latest driver from Nvidia 195.36.24 (but had the problem also with the ubuntu repo driver. The issue can be reproduced as follows. Set AWN to group common windows (I believe this is the default) Open several gedit windows (or any other app) Then open firefox and maximize the window (or simply move the window so it's directly above your gedit dock icon.) In the AWN dock, select the gedit icon and try and select an open gedit window. When you click the gedit icon in the AWN dock, you'll see a popup with all of your gedit windows. If you move the mouse to attempt and select one of the gedit's, the menu disappears and you can't select anything.
How would I list 4 users ID numbered 10, 11, 12 and 13 from my users list and output them to a file busers where their names are numbered by ascending order? How would I accomplish that on a one line command?
I cannot figure how to make a program start-up when Ubuntu boots. I want the "sudo firestarter" command to run so the firestarter icon appears in the panel.
I am unable to start apache on my linux machine with following errors Starting httpd: Syntax error on line 117 of /etc/httpd/conf/httpd.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration I am using CentOS5 with apache version httpd-2.2.13
I seem to only be able to start checkgmail as root. I have it listed as a startup application, and in the command line I entered gksudo [path to file]. How do I make it remember the password at each startup?
The GUI design of Ubuntu 11.04 really drives me nuts. It was completely silly and nonsense, especially the auto-hide feature. For instance, whenever I open Gvim, the toolbar is automatically hidden, I'm like wth, I need "this bar". Another annoying this is I can't keep track of which tab that I'm currently working on, they grouped all together on the left hand side, and the size of these icons are ridiculously huge. How could I change it back to the bottom and keep each tab separate from each other?
well yesterday I upgraded my karmic to lynx. So far so good, overall much improved plus I love the new theme. Now the problem, I share my Firefox/Thunderbird profile (stored in my secondary HD) with WinXP (dual boot box). Since karmic, before I opened Firefox/Thunderbird, I had to mount the 2ndary HD which of course prompted me for a password and then everything worked fine. In case I forgot to mount the disk then Firefox popped the following msg: Firefox is either opened or in use.Now, lucid strangely mounts my HD without a password, more peculiarly I have r-w-e permissions and on top of that Firefox/Thunderbird gives me the silly msg!
Tried to unmount/mount back but still no password. I end up believing that this Firefox hesitation to start (based on karmic experience) is related with the password thing...or not?
I just installed TuxGuitar - very cool - and to get the sound to work I had to install Timidity++ as well. Before I start TuxGuitar I have to execute:timidity -iA -Osin a terminal window first, which is kind of a pain to do every time I run TuxGuitar.How do I get this line to execute on startup such that timidity is running when I start up? I tried adding that line to rc.local
i'm using Fedora 11 which i installed a couple of days back... i added my user name to the sudoer list but everytime i run the sudo command it takes at least 20 + seconds before anything happens... this happens everytime i run sudo... in comparison to running su things happen immediately... anyone else experiencing this? now everytime i install or run a command requiring root access i just use su...