|
rt4 posted:I've got a lone entry in my root crontab Is tue an actual valid entry for a day of the week in crontab? I've always gone on day of the week in numeric format. 0=Sunday, 6=Saturday. Try changing the "tue" to 2 and see if it works.
|
# ? Mar 31, 2010 04:57 |
|
|
# ? Apr 28, 2024 03:49 |
|
Just because it's in root's crontab doesn't mean it runs with root's login environment. Is your program making assumptions about environment variables?
|
# ? Mar 31, 2010 05:00 |
|
Rastor posted:Just because it's in root's crontab doesn't mean it runs with root's login environment. Is your program making assumptions about environment variables? Turns out it was kinda related to this. I had tried the exact command, but I had been trying it from the directory where the program resides. I hadn't been keeping logs so I had no idea my program was dying because it required a file from a relative path. Thanks for the help!
|
# ? Mar 31, 2010 05:05 |
|
rt4 posted:Turns out it was kinda related to this. I had tried the exact command, but I had been trying it from the directory where the program resides. I hadn't been keeping logs so I had no idea my program was dying because it required a file from a relative path. Was gonna say. Some scripts will work from a browser, but if you run them with a full path they won't work because of the way they are coded. You can change the cron to to something like this: 50 20 * * tue cd /var/www/vhosts/example.com/httpdocs/cron/ ; php -f program.php Or run it using lynx/wget instead if it works from a browser.
|
# ? Mar 31, 2010 05:18 |
|
Adding MAILTO=whatever@example.com at the beginning of a crontab will send the stdout/err to that address (if the host knows how to send emails that is). Use it at work for all our jobs, it's very quick to see if something failed and why.
|
# ? Mar 31, 2010 06:31 |
|
Carthag posted:Adding MAILTO=whatever@example.com at the beginning of a crontab will send the stdout/err to that address (if the host knows how to send emails that is). Use it at work for all our jobs, it's very quick to see if something failed and why. Without that it will send to the user the cronjob runs on, which depending on your environment might be nothing.
|
# ? Mar 31, 2010 07:22 |
|
After using Windows for practically all my life, but I finally made the switch to Linux after XP finally crapped out on me. I installed Linux Mint 8, and so far it's been running like a dream. There is one problem though, my wireless network does not seem to show up at all in the wireless list. About 10 of my neighbor's connections seems to show up just fine, so it doesn't appear to be my adapter at fault. My laptop detects my connection just fine, and I know it's not configured to hidden, so I really can't tell what's up with it right now. It seems to be a semi-common occurence as I read a few threads about it on google, but no one seemed to come up with any solutions. Anyone here know?
|
# ? Mar 31, 2010 07:56 |
|
Rastor posted:Just because it's in root's crontab doesn't mean it runs with root's login environment. Is your program making assumptions about environment variables? I often run the command as part of an `su -` option exactly for this reason.
|
# ? Mar 31, 2010 12:11 |
|
Dumbass Linux newbie question: I love the cp command. It's retard powerful and no text command has any business being this useful. I've started using cp -Ru to backup all my documents to my Dropbox folder and my external HDD. I've set up an alias so that I can just type backup_docs into terminal and watch my backups get neatly archived. However, I still have to do this manually. I know there is a way to get BASH to automatically execute commands on login/logout. My goal is to get cp -Ru ~/Documents etc. to execute every time I end a user session, so that if the unthinkable happens I always have a current backup. Anyone know what the best way to do this is? edit: Running Xubuntu 9.10 Karmic Koala Hydraulic Edwardian fucked around with this message at 16:46 on Mar 31, 2010 |
# ? Mar 31, 2010 16:33 |
|
Hydraulic Edwardian posted:Dumbass Linux newbie question: .bashrc contains the startup commands You might want to look into tar (and compressing them), instead of cp'ing everything
|
# ? Mar 31, 2010 16:54 |
|
Hydraulic Edwardian posted:Dumbass Linux newbie question: I think something like .bash_login and .bash_logout (just read the man page, those are correct) get exectued at login and logout. And for maximum mind blowing, checkout rsync. You should just be able to replace the 'cp' part of your command with 'rsync' and everything will keep on working. Except it will run a hash on the files on both sides and only copy stuff that has changed, saving yourself a nice chunk of time.
|
# ? Mar 31, 2010 17:11 |
|
Bob Morales posted:.bashrc contains the startup commands Thanks. I will. Right now my documents folder is pretty small, so I can afford to just raw cp it. Once I start working on backing up my Music and such I'll get on that. Would putting a command in .bash_logout also work?
|
# ? Mar 31, 2010 17:12 |
|
Hydraulic Edwardian posted:Thanks. I will. Right now my documents folder is pretty small, so I can afford to just raw cp it. Once I start working on backing up my Music and such I'll get on that. The whole thing about .bashrc and .bash_login (and .profile) is a little confusing: man bash posted:When bash is invoked as an interactive login shell, or as a non-inter‐ctive shell with the --login option, it first reads and executes com‐mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. So when you login to the GUI, or SSH in, That's a login shell: .bash_profile, .bash_login, or .profile is executed, whichever it finds first. And when your GUI or SSH session ends, .bash_logout is executed. If you open a terminal from within your GUI enviroment, or I suppose launch an xterm from your SSH session, that's an interactive session. In that case, .bashrc is read. The way Ubuntu (and I assume Xubuntu) does it by default is it creates .profile and .bashrc, all the good stuff goes in .bashrc, and .profile just executes .bashrc (and also puts ~/bin in your path). I think you would want to put your backup command in .bash_logout, since it makes sense that you'd want to backup on exit.
|
# ? Mar 31, 2010 17:19 |
|
No seriously, rsync is what you should be using for this. Go get yourself some rsync.
|
# ? Mar 31, 2010 17:19 |
|
But but but using the terminal makes me feel so DIY and special.
|
# ? Mar 31, 2010 18:04 |
|
Hydraulic Edwardian posted:But but but using the terminal makes me feel so DIY and special. rsync is a terminal command.
|
# ? Mar 31, 2010 18:14 |
|
HFX posted:rsync is a terminal command. Yeah, and about a zillion times more powerful than cp. Just try replacing the 'cp' in your alias with 'rsync' and see how that goes for you.
|
# ? Mar 31, 2010 18:42 |
|
Rastor posted:No seriously, rsync is what you should be using for this. Go get yourself some rsync. This. rsync -a <source>/ <dest>/ The trailing slashes are useful.
|
# ? Apr 1, 2010 01:02 |
|
I'm using the Ubuntu 10.04 beta, and am having a headache with the built in Gnome Remote Desktop (vino). I can connect to the server via ssh tunnel, or direct if I open the ports - but beyond that, I get nothing. It takes my password, then does not even begin to draw the screen or provide dimensions to the client. I know there's been issues with vino and certain xorg drivers (nvidia) that are resolved by disabling desktop effects, compiz, and using noxdamage when/where possible. I've tried the first two, and can't figure out how to try the third without physical access to the machine. Any ideas or suggestions?
|
# ? Apr 1, 2010 16:04 |
|
My suggestion is to forget about VNC and use NX. It's the fastest remote desktop thing I've ever used. In fact, I'm posting from it right now. If you already have a working sshd, then all you need to do is install the Ubuntu packages from nomachine.com and it's ready to go.
|
# ? Apr 1, 2010 17:14 |
|
rt4 posted:My suggestion is to forget about VNC and use NX. It's the fastest remote desktop thing I've ever used. In fact, I'm posting from it right now. Yep, it is basically awesome. I've got it setup on my server to start a session on boot of the machine. It's a bit of a hack, but I can post the script if you're interested.
|
# ? Apr 1, 2010 17:16 |
|
FISHMANPET posted:I've got it setup on my server to start a session on boot of the machine. It's a bit of a hack, but I can post the script if you're interested. Why do you start an NX session on boot? Couldn't you just start whatever session you want when you connect?
|
# ? Apr 1, 2010 17:28 |
|
FISHMANPET posted:Yep, it is basically awesome. I'm interested in this script!
|
# ? Apr 1, 2010 19:38 |
|
Can you hook the NX session in to the existing desktop session locally (like Remote Desktop does) or does it require it's own unique X session ala; x11vnc or vnc4server?
|
# ? Apr 1, 2010 20:03 |
|
Lukano posted:Can you hook the NX session in to the existing desktop session locally (like Remote Desktop does) or does it require it's own unique X session ala; x11vnc or vnc4server? Your local session can be connected to in the "shadow" mode, but you need to be root to do it, even if you're logged in as a normal user.
|
# ? Apr 1, 2010 20:05 |
|
Here is my scriptcode:
nbv4 fucked around with this message at 21:01 on Apr 1, 2010 |
# ? Apr 1, 2010 20:59 |
|
nbv4 posted:It works fine if I run it manually, but from within a cron job, it fails. The problem is that the ssh and scp commands rely on my rsa key to work correctly, which isn't a problem for me at my shell, but from within a cron job, it fails. What do I need to do to make it work? http://support.svi.nl/wiki/ScpBatchMode
|
# ? Apr 1, 2010 21:03 |
|
rt4 posted:Why do you start an NX session on boot? Couldn't you just start whatever session you want when you connect? I have GUI programs that I want started at boot. And here's how I did it: http://ubuntuforums.org/showthread.php?t=1034807 (that's not me)
|
# ? Apr 1, 2010 22:33 |
|
Edit: Double Post
maskenfreiheit fucked around with this message at 21:03 on Mar 13, 2017 |
# ? Apr 2, 2010 14:43 |
|
GregNorc posted:Cross posting this in the linux thread, trying to get some opinions. No sense/joy in centos/RHEL as a desktop. Suggest simply ubuntu for the desktop experience on your thinkpad + virtualization for anything else.
|
# ? Apr 2, 2010 14:53 |
|
GregNorc posted:Cross posting this in the linux thread, trying to get some opinions. If you are considering FreeBSD, you might as well take a look at Gentoo. It all depends on how much headache you want. Ubuntu is pretty good until you get sick of all the morons in the community.
|
# ? Apr 2, 2010 20:20 |
|
Bob Morales posted:http://support.svi.nl/wiki/ScpBatchMode hmm that doesn't work. here is my script now: code:
code:
|
# ? Apr 2, 2010 22:40 |
|
nbv4 posted:hmm that doesn't work. when you're running under cron, you don't have an ssh-agent to connect to, so you're being prompted for your key or remote system password.
|
# ? Apr 3, 2010 13:09 |
|
GregNorc posted:Cross posting this in the linux thread, trying to get some opinions. I'd suggest Ubuntu as well. You can go feral and switch over to Gentoo or Slackware later, but if you're just getting started - it'll be the easiest transition from Windows. A wealth of online resources, and it's just easy and works.
|
# ? Apr 3, 2010 17:33 |
I'm running Fedora 12 and have limited linux knowledge. How do I get gkrellm to start on boot? Can I use add startup program? If so, what command do I enter?
|
|
# ? Apr 4, 2010 09:04 |
|
Anphrax posted:I'm running Fedora 12 and have limited linux knowledge. How do I get gkrellm to start on boot? Can I use add startup program? If so, what command do I enter? Easiest way for someone relatively new to do it, is make sure it's running, and when logging out make sure you have "save session" clicked (I haven't used fedora 12, I know in previous fedoras it was actually in one of the settings under system-preferences or something). Log out, log back in, then uncheck the save session.
|
# ? Apr 4, 2010 14:38 |
|
Edit: Double Post
maskenfreiheit fucked around with this message at 21:00 on Mar 13, 2017 |
# ? Apr 4, 2010 23:54 |
|
enotnert posted:Easiest way for someone relatively new to do it, is make sure it's running, and when logging out make sure you have "save session" clicked (I haven't used fedora 12, I know in previous fedoras it was actually in one of the settings under system-preferences or something). Log out, log back in, then uncheck the save session. That's kind of a dirty hack. I think you can specify programs that get run when you login. I don't think you actually want that to run at login, not start up. Having a GUI problem run at boot doesn't make any sense, because at boot there's no GUI to put it in.
|
# ? Apr 5, 2010 03:38 |
|
IanMalcolm posted:If you are considering FreeBSD, you might as well take a look at Gentoo. Migrating to Gentoo to get away from morons is like running to Auschwitz to escape from the Nazis GregNorc posted:So I'm basically looking for something that's the best balance between "relatively simple to set up" and supporting more advanced users. Right now I've narrow it to two choices... I'm debating between Ubuntu and FreeBSD. I think the documentation for Ubuntu is way better especially if you're working with obscure stuff, bleeding edge features like NTFS-3G works very well and there are a lot of useful scripts in the official repositories, for example a usb automounter that I worked with a while back. Out-of-the-box support for full disk encryption, all sorts services it can pull right from the installer, great hardware support, I think it seals the deal. I really like the headless edition, lightweight and a great way to learn without being coddled by any sort of GUI.
|
# ? Apr 5, 2010 04:03 |
|
|
# ? Apr 28, 2024 03:49 |
enotnert posted:Easiest way for someone relatively new to do it, is make sure it's running, and when logging out make sure you have "save session" clicked (I haven't used fedora 12, I know in previous fedoras it was actually in one of the settings under system-preferences or something). Log out, log back in, then uncheck the save session. I suppose I didn't really explain myself well enough. I installed Fedora to learn linux, I have no problem solving my issue the hard way; care to explain more in-depth?
|
|
# ? Apr 5, 2010 09:07 |