Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Longinus00
Dec 29, 2005
Ur-Quan

wooger posted:

And Adobe don't package it, so you'll have to install Chrome and point Chromium to the pepper flash .so file, or else grab it from an unofficial repo depending on your OS.

In debian/ubuntu at least it should be as easy as apt-get install pepperflashplugin-nonfree which automates all that for you.

Adbot
ADBOT LOVES YOU

FateFree
Nov 14, 2003

I have a java jar that runs inside a while loop forever. It has a memory leak after 24 hours that I don't care enough to debug. I wrote a simple bash script that does two things:

code:
killall -9 java
java blah -jar
The idea was the first line kills the existing process and the second line fires it up again. I scheduled a cronjob to run it every 2 hours or so. The cron job works, the script runs, killall stops the old process and then never starts the second process. I tried putting a sleep 10 after the killall in hopes that would prevent it from killing the new process, but it doesn't seem to work. Why won't the script start up the process again?

Cidrick
Jun 10, 2001

Praise the siamese
I believe killall will match any process by its name - does your bash script have java in the name, by chance? Here's an example of what I mean:

code:
[matt@host ~]$ cat foo
#!/bin/bash
killall foo
ps -ef | grep foo
echo 'foo'
[matt@host ~]$ ./foo
Terminated
It's killing itself, since the script is named "foo" so it never actually gets to the second or third line of the script because killall is matching the name of the script.

Edit: Try looking at something like pgrep/pkill to do what you're looking for. Killall is a bit heavy-handed for most practical scenarios.

Cidrick fucked around with this message at 20:49 on Feb 25, 2015

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
just do "pkill -9 java && java blah -jar"

if your java is being run by some script or is in argv, use pkill -f -9 java instead.

FateFree
Nov 14, 2003

Bhodi posted:

just do "pkill -9 java && java blah -jar"

if your java is being run by some script or is in argv, use pkill -f -9 java instead.

Well I gave this a try but I think this fails the first time when the process isnt running so it never starts. I tried putting them on separate lines and im awaiting the result of that. I investigated the reply above, but whats strange is if I invoke the script manually, it works fine. I can open two terminals and run the script in both, it will always kill the previous process and start a new one no problem. It only seems to kill and do nothing in the cronjob.. I'm not sure what could be different there.

evol262
Nov 30, 2010
#!/usr/bin/perl

FateFree posted:

Well I gave this a try but I think this fails the first time when the process isnt running so it never starts. I tried putting them on separate lines and im awaiting the result of that. I investigated the reply above, but whats strange is if I invoke the script manually, it works fine. I can open two terminals and run the script in both, it will always kill the previous process and start a new one no problem. It only seems to kill and do nothing in the cronjob.. I'm not sure what could be different there.

Past the actual cronjob, please. And what user it's running as

Megaman
May 8, 2004
I didn't read the thread BUT...
A few more Debian questions, now that I have an automated SID installation:

1) Is the preferred driver install for ATI cards 'apt-get install glx-alternative-fglrx'?

2) How does everyone else run automated commands after the install? I'm using late command in the preseed but I'd rather write an actual script instead of putting everything on one line.

3) When I install debian base with zero additional software, install firefox dependencies, then run firefox, all the tab and menu fonts are insanely small. How can I increase these particular font sizes? All other fonts appear to be the correct size? I've fooled with .Xdefaults, it seems to work once, but if I close firefox and open it again, it appears to be reset. Anyone else run into this small font problem?

FateFree
Nov 14, 2003

evol262 posted:

Past the actual cronjob, please. And what user it's running as

script.sh

code:
#!/bin/bash
pkill -9 java;
java -Xss1000k -Xms2500m -Xmx2500m -jar parser.jar
sudo crontab -e

code:
0 */1 * * * /home/adp/script.sh
I had it in just crontab -e earlier but I figured sudo couldnt hurt.. If I run the script manually it works as expected, but not from the cron.. appreciate any ideas.

Docjowles
Apr 9, 2009

"java" probably isn't on the path. Try specifying the full, absolute path to java. Cron jobs typically run with a very limited or even empty PATH environment variable unless you set one explicitly in the crontab.

FateFree
Nov 14, 2003

Hmm I changed that and thought that was a good lead.. but I'm seeing the same results. I ran the script once in a terminal and waited an hour to see the output. Finally I saw this in the terminal:

code:
./script.sh: line 3:  2837 Killed                  /usr/bin/java -Xss1000k -Xms2500m -Xmx2500m -jar parser.jar
And then it stops after that.. I tail the log file afterwards but it never gets updated again and jps -m comes up empty so I know its not starting up. Why does it say killed and paste the next line of the script in the console? Is it trying to interpret it as one line?

evol262
Nov 30, 2010
#!/usr/bin/perl

FateFree posted:

Hmm I changed that and thought that was a good lead.. but I'm seeing the same results. I ran the script once in a terminal and waited an hour to see the output. Finally I saw this in the terminal:

code:
./script.sh: line 3:  2837 Killed                  /usr/bin/java -Xss1000k -Xms2500m -Xmx2500m -jar parser.jar
And then it stops after that.. I tail the log file afterwards but it never gets updated again and jps -m comes up empty so I know its not starting up. Why does it say killed and paste the next line of the script in the console? Is it trying to interpret it as one line?

Your script never finishes because java never returns.

Either write a proper startup script which daemonizes or prepend the "java -m"... line with nohup

FateFree
Nov 14, 2003

evol262 posted:

Your script never finishes because java never returns.

Either write a proper startup script which daemonizes or prepend the "java -m"... line with nohup

I don't know anymore, I added nohup and the only difference is I don't see any message in the terminal when the process gets interrupted, it still never starts up. This is turning out to be way harder than it should be. Maybe I need a full path to the java jar... I am going to try that next.

Edit - that full path to the jar file seems to have done the trick (as well as maybe the other solutions which I left) thanks everyone!

FateFree fucked around with this message at 14:19 on Feb 26, 2015

Thalagyrt
Aug 10, 2006

FateFree posted:

I don't know anymore, I added nohup and the only difference is I don't see any message in the terminal when the process gets interrupted, it still never starts up. This is turning out to be way harder than it should be. Maybe I need a full path to the java jar... I am going to try that next.

Edit - that full path to the jar file seems to have done the trick (as well as maybe the other solutions which I left) thanks everyone!

Is there any reason you're using kill -9 instead of a normal SIGTERM? You're not letting the application gracefully shut down and could damage your data. It might be better to kill it with sigterm, keep checking for its existence for 30-60 seconds, then kill with sigkill if it still hasn't exited.

spankmeister
Jun 15, 2008






I would really try to build a nice init script around it that makes a pidfile and uses that to manage the process.

Docjowles
Apr 9, 2009

spankmeister posted:

I would really try to build a nice init script around it that makes a pidfile and uses that to manage the process.

There's even a tool to generate init scripts for you these days.

funny way to spell
Nov 4, 2012
KDE, Xfce, or Cinnamon for desktop environments?

Tigren
Oct 3, 2003

funny way to spell posted:

KDE, Xfce, or Cinnamon for desktop environments?

In the same vain, emacs or vim for text editing?

Use whatever you like. You'll get twice as many answers as you give choices.

CHEF!!!
Feb 22, 2001

I'm looking for recommendations about my file server's backup solution. First, some background:

I have a personal file server, 12 2TB drives in RAIDZ2 under CentOS 7, which itself is running on a separate SSD, connected via GigE. Long story short, it contains all my media I've been encoding, obtaining, etc. since about 2001, shared out via Samba. The kind of server that, if I lost it in a fire and didn't have backups, I'd probably die from alcohol poisoning shortly thereafter. Until a few months ago it was running an ancient install of Windows Server 2008 R2, with the drives on a hardware controller running a RAID-6 array. The backup program I used, whose name escapes me, handled everything rather nicely. It handled my external drives as a pool, if I moved a file around and/or renamed it, it would move it instead of create a duplicate copy, etc. Right now my backup solution is primitive, to put it mildly; ~/scripts/BackupX, which runs an rsync command to move one or more directories to the external drive mounted at the time. The limitations of this should be obvious.

Anyway, does anyone have any recommendations for a better solution? I dicked around with what I found in the CentOS repos, but wasn't particularly impressed by what I found. Should I bite the bullet and setup Bacula from scratch? I've administered existing installs in the past, for what it's worth. Comedy "build a duplicate server, backup to that, and bury it in an open field until the next backup" option? Regardless, my cruddy stop-gap solution needs to go.

effika
Jun 19, 2005
Birds do not want you to know any more than you already do.

funny way to spell posted:

KDE, Xfce, or Cinnamon for desktop environments?

No love for Mate? :colbert:

Cinnamon is nice; but there are some things that you'd think would be tweakable (notification pop-up location, for example) that aren't.

spankmeister
Jun 15, 2008






I use Cinnamon right now and I like it well enough. I tried gnome-wayland and that's a much smoother experience although I don't really like the gnome interface.
A cinnamon-wayland would be ideal for me.

XFCE is fine, I've used it in the past but I prefer Cinnamon because it seems better integrated and just a bit more modern than XFCE.
I never liked KDE but I've heard good things about Plasma 5 so I might give it a spin sometime.


It all boils down to personal preference anyway, so just try it out and see what you like.

FlapYoJacks
Feb 12, 2009

FateFree posted:

script.sh

code:
#!/bin/bash
pkill -9 java;
java -Xss1000k -Xms2500m -Xmx2500m -jar parser.jar
sudo crontab -e

code:
0 */1 * * * /home/adp/script.sh
I had it in just crontab -e earlier but I figured sudo couldnt hurt.. If I run the script manually it works as expected, but not from the cron.. appreciate any ideas.

I would personally grab the actual process ID from ps and then kill that explicitly. For some reason people hate ask but you could do something like:

ps -aux |grep [p]arser |awk {print $2} to grab the process id and then run kill on just that.

Longinus00
Dec 29, 2005
Ur-Quan

CHEF!!! posted:

I'm looking for recommendations about my file server's backup solution. First, some background:

I have a personal file server, 12 2TB drives in RAIDZ2 under CentOS 7, which itself is running on a separate SSD, connected via GigE. Long story short, it contains all my media I've been encoding, obtaining, etc. since about 2001, shared out via Samba. The kind of server that, if I lost it in a fire and didn't have backups, I'd probably die from alcohol poisoning shortly thereafter. Until a few months ago it was running an ancient install of Windows Server 2008 R2, with the drives on a hardware controller running a RAID-6 array. The backup program I used, whose name escapes me, handled everything rather nicely. It handled my external drives as a pool, if I moved a file around and/or renamed it, it would move it instead of create a duplicate copy, etc. Right now my backup solution is primitive, to put it mildly; ~/scripts/BackupX, which runs an rsync command to move one or more directories to the external drive mounted at the time. The limitations of this should be obvious.

Anyway, does anyone have any recommendations for a better solution? I dicked around with what I found in the CentOS repos, but wasn't particularly impressed by what I found. Should I bite the bullet and setup Bacula from scratch? I've administered existing installs in the past, for what it's worth. Comedy "build a duplicate server, backup to that, and bury it in an open field until the next backup" option? Regardless, my cruddy stop-gap solution needs to go.

If you're already doing the zfs thing then zfs send/receive is probably the "best" way of doing things.

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."
Uh, I guess that's a question worth asking.

If under Windows I register and buy music on iTunes, will I be able to copy it over and play it under Linux (or simply play off the Windows partition, although I haven't had uncouraging results with such operations)? I've read that iTunes music doesn't have any DRM, but I'd like to be certain.

Double Punctuation
Dec 30, 2009

Ships were made for sinking;
Whiskey made for drinking;
If we were made of cellophane
We'd all get stinking drunk much faster!

supermikhail posted:

Uh, I guess that's a question worth asking.

If under Windows I register and buy music on iTunes, will I be able to copy it over and play it under Linux (or simply play off the Windows partition, although I haven't had uncouraging results with such operations)? I've read that iTunes music doesn't have any DRM, but I'd like to be certain.

Depending on your distribution, you may need to install an AAC codec because of patents. You can buy a codec pack or download a codec for free if you don't mind the legal risk. Alternatively, install Chrome or transcode your files to FLAC, and you'll be able to play them.

Longinus00
Dec 29, 2005
Ur-Quan

dpbjinc posted:

Depending on your distribution, you may need to install an AAC codec because of patents. You can buy a codec pack or download a codec for free if you don't mind the legal risk. Alternatively, install Chrome or transcode your files to FLAC, and you'll be able to play them.

AAC -> FLAC ?...

If you bought music before they switched to no DRM then you need to make sure you delete and re-download those tracks, Itunes doesn't do a conversion for you. http://www.wired.com/2014/03/kill-itunes-drm/

Megaman
May 8, 2004
I didn't read the thread BUT...

Megaman posted:

A few more Debian questions, now that I have an automated SID installation:

1) Is the preferred driver install for ATI cards 'apt-get install glx-alternative-fglrx'?

2) How does everyone else run automated commands after the install? I'm using late command in the preseed but I'd rather write an actual script instead of putting everything on one line.

3) When I install debian base with zero additional software, install firefox dependencies, then run firefox, all the tab and menu fonts are insanely small. How can I increase these particular font sizes? All other fonts appear to be the correct size? I've fooled with .Xdefaults, it seems to work once, but if I close firefox and open it again, it appears to be reset. Anyone else run into this small font problem?

Bump

CaptainSarcastic
Jul 6, 2013



funny way to spell posted:

KDE, Xfce, or Cinnamon for desktop environments?

I use pretty much exclusively KDE nowadays. Ran Gnome 2 for years, and used to run XFCE a fair amount, but on my current machines I run KDE. Even my netbook handles it nicely now.

ewe2
Jul 1, 2009

Hot tip for Debian users: if you back off systemd to systemd-shim (current jessie systemd borked on my system for some reason), keep an eye on your system logs, I lost 3gb and a full /var before I understood why squid wasn't starting up.

Docjowles
Apr 9, 2009


For #2, at work we do the time-honored "wget a shell script and pipe it to bash". Which is generally a terrible idea, but fine on a controlled private network.

Liam Emsa
Aug 21, 2014

Oh, god. I think I'm falling.
So a new version of Ubuntu 15.04 beta is out. How does one "upgrade" to it?

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."

dpbjinc posted:

Depending on your distribution, you may need to install an AAC codec because of patents. You can buy a codec pack or download a codec for free if you don't mind the legal risk. Alternatively, install Chrome or transcode your files to FLAC, and you'll be able to play them.

Ubuntu. I see faac which is an "AAC encoder", in my synaptic, but no "decoder" and I'm guessing that's the problem.

Oh, there's also "gstreamer0.10-plugins-bad-multiverse 0.10.21-1ubuntu3". Its name includes "plugins for AAC", so if I install this I probably should be good?

Longinus00
Dec 29, 2005
Ur-Quan

Liam Emsa posted:

So a new version of Ubuntu 15.04 beta is out. How does one "upgrade" to it?

Are you already on 15.04? If you are then you don't have to do anything. Otherwise https://help.ubuntu.com/community/Upgrades#Upgrading_to_development_releases. If you're currently on 14.04 or earlier then you'll need to do some extra work.

supermikhail posted:

Ubuntu. I see faac which is an "AAC encoder", in my synaptic, but no "decoder" and I'm guessing that's the problem.

Oh, there's also "gstreamer0.10-plugins-bad-multiverse 0.10.21-1ubuntu3". Its name includes "plugins for AAC", so if I install this I probably should be good?

https://help.ubuntu.com/community/RestrictedFormats

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."
I... didn't have them? Odd... That's an awful lot of packages, yet I've been playing music without any problems. How come?

Oh, except this installation Banshee has stopped playing nice with .it files. Suppose this'll fix it? Nope. Or maybe yes? After I restarted it.

supermikhail fucked around with this message at 08:15 on Feb 27, 2015

Mudlark
Nov 10, 2009
I just spent the last 6 hours figuring out a way to install ArchLinux on the old EeePC 701 I found in my closet and making it run properly.

What is wrong with me.

E: I did have a question:

People at work are having a hard time figuring out some connectivity problems with a project at work. I've basically impressed people with the voodoo of cross-compiling tcpdump to work with our architecture, and so debugging things has fallen on me.

Any suggestions on how I should poke at Linux for info on what's going on down in wlan0 land?

Mudlark fucked around with this message at 08:44 on Feb 27, 2015

wooger
Apr 16, 2005

YOU RESENT?

supermikhail posted:

Uh, I guess that's a question worth asking.

If under Windows I register and buy music on iTunes, will I be able to copy it over and play it under Linux (or simply play off the Windows partition, although I haven't had uncouraging results with such operations)? I've read that iTunes music doesn't have any DRM, but I'd like to be certain.

It doesn't have DRM so should work OK. You can read/write to the windows partition reliably with NTFS-FUSE.

Downsides:
Why pay apple when you can buy MP3s elsewhere for cheaper, direct from Linux?

iTunes is a problem: any playlists and tagging changes you make are tied up in their proprietary database in the app, rather than written to the files themselves. So you may find things look different / wrong in Linux, or just in any other player app.

funny way to spell posted:

KDE, Xfce, or Cinnamon for desktop environments?

Nice troll attempt ;)

I've never been happy with KDE: too many options in different places, horrible default appearance. It may be configurable to look nice, but I've never seen it.

XFCE is struggling for development resources, and doesn't really have much worth right now imo as it's surprisingly heavy. If you want something light & traditional, use LXDE.

Cinnamon is alright, but I'd prefer to use Gnome with a few extensions to be honest.

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."

wooger posted:

It doesn't have DRM so should work OK. You can read/write to the windows partition reliably with NTFS-FUSE.

Downsides:
Why pay apple when you can buy MP3s elsewhere for cheaper, direct from Linux?

iTunes is a problem: any playlists and tagging changes you make are tied up in their proprietary database in the app, rather than written to the files themselves. So you may find things look different / wrong in Linux, or just in any other player app.

I used to buy music from Bandcamp, but Paypal now requires registration if you're in Russia, and I'm a bit stuck between two evils. And iTunes has a wider selection, I suppose, although I pretty much only know of two Linux-compatible music sites, the other of which is something called "cdbaby"? Which I haven't used for a while because it's kind of laggy.

Precambrian Video Games
Aug 19, 2002



wooger posted:


I've never been happy with KDE: too many options in different places, horrible default appearance. It may be configurable to look nice, but I've never seen it.

XFCE is struggling for development resources, and doesn't really have much worth right now imo as it's surprisingly heavy. If you want something light & traditional, use LXDE.

Cinnamon is alright, but I'd prefer to use Gnome with a few extensions to be honest.

I'm of the same mind, even though I've complained about Gnome 3 a bunch of times here. The extensions make it close to what I'd want and the dark theme looks fine with minimal effort. I tried KDE and found the same issues, and while Cinnamon was fine, compiling a newer, C++14-compliant version of GCC was a nightmare on Mint, so I stuck with Fedora's rapid package updates.

spankmeister
Jun 15, 2008






i use cinnamon on fedora

works4me

spankmeister
Jun 15, 2008






funny way to spell posted:

KDE, Xfce, or Cinnamon for desktop environments?

in any case your pathetic troll attempt failed, mr fyad poster

Adbot
ADBOT LOVES YOU

Truga
May 4, 2014
Lipstick Apathy
I really like what KDE is trying to accomplish, but nearly 10 years ago I went about configuring e17 to my tastes (took almost an hour!) and haven't liked anything else so much since, so I still use that :shrug:

I think I'm old :(

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply