Re: [gentoo-user] Switching current java-vm for a single application
Problem is, the SenchaCmd script runs java directly, which resolves to /usr/bin/java, which itself is a script that checks the user choice regarding the selected java-vm: setting JAVA_HOME does nothing to fix that. I can edit the SenchaCmd script to run java directly, that would be the quickfix. Thanks for the input. Em seg, 1 de fev de 2016 às 13:41, Alon Bar-Levescreveu: > On 31 January 2016 at 19:17, Leonardo Guilherme > wrote: > > > > Hello. > > > > I'm using OpenJDK JVM regularly on my machine instead of Oracle's one, > primarily because of the infinality patches and because I prefer open > source software. > > > > There are some applications, though, that do not play ball with it > (namely, SenchaCmd) and I have to keep switching back and forth between > installed java-vms just to run it. > > > > I know nothing about Java or its environment, is there a way to specify > the java-vm just for this application instead of doing "eselect java-vm set > user 1; sencha *stuff*; eselect java-vm set user 3" everytime? > > > > Is there a set of environment variables that can do this? Shall I wrap > the command in a shell script? Ideas? > > Usually, every [well behaved] java application has JAVA_HOME or > similar environment variable to tell it where java is. > You can find a valid java homes at /usr/lib/jvm/*/jre or if you > manually extracted oracle it will probably live in /opt/xxx. > > What you should do is go over this SenchaCmd startup script and find > what it expects. > > Regards, > Alon > >
Re: [gentoo-user] ls config file?
Hello, On Tue, 02 Feb 2016, Raffaele BELARDI wrote: >Andrew Tselischev wrote: >> On Tue, Feb 02, 2016 at 09:54:37AM +0100, Raffaele BELARDI wrote: >>> The option that controls this is --quoting-style, so >>> can alias 'ls' to include this option but was wondering if there is a >>> global configuration file controlling such behaviour. >> >> There is no configuration file for ls(1), but we can still solve the >> problem. It is free software, after all! >> >> Put the file fix.patch in /etc/portage/patches/sys-apps/coreutils-8.25/ >> and apply the following changes to the ebuild (in the function src_prepare): > >fantastic! > >but I think I'll stick with the alias approach ;-) Whatever happened to LS_OPTIONS? But: # ltrace -e getenv ls >/dev/null ls->getenv("QUOTING_STYLE") = nil ls->getenv("COLUMNS")= nil ls->getenv("TABSIZE")= nil ls->getenv("LS_BLOCK_SIZE") = nil ls->getenv("BLOCK_SIZE") = nil ls->getenv("BLOCKSIZE") = nil ls->getenv("POSIXLY_CORRECT")= nil ls->getenv("BLOCK_SIZE") = nil And there we go: $ for f in *; do echo ">>$f<<"; done >>foo *" ' bar*<< >>foo *" ' bar*<< >>foo" ' bar<< >>more<< $ QUOTING_STYLE=literal ls -1 foo *" '? bar* foo *" ' bar* foo" ' bar more $ QUOTING_STYLE=shell ls -1 'foo *" '\''? bar*' 'foo *" '\'' bar*' 'foo" '\'' bar' more $ QUOTING_STYLE=c ls -1 "foo *\" '\n bar*" "foo *\" ' bar*" "foo\" ' bar" "more" $ QUOTING_STYLE=escape ls -1 foo\ *"\ '\n\ bar* foo\ *"\ '\ bar* foo"\ '\ bar more Where and how you set QUOTING_STYLE (/etc/*, ~/.*) is up to you. Or use an alias. HTH, -dnh, who consideres strace and ltrace as _basic_ tools ;) -- Bored? Want hours of entertainment? Just set the initdefault to 6! Whee!
Re: [gentoo-user] Switching current java-vm for a single application
If all what script is doing is executing "java", just add the right JRE to your PATH as first element. On 3 February 2016 at 01:04, Leonardo Guilhermewrote: > Problem is, the SenchaCmd script runs java directly, which resolves to > /usr/bin/java, which itself is a script that checks the user choice > regarding the selected java-vm: setting JAVA_HOME does nothing to fix that. > I can edit the SenchaCmd script to run java directly, that would be the > quickfix. > > Thanks for the input. > > Em seg, 1 de fev de 2016 às 13:41, Alon Bar-Lev > escreveu: >> >> On 31 January 2016 at 19:17, Leonardo Guilherme >> wrote: >> > >> > Hello. >> > >> > I'm using OpenJDK JVM regularly on my machine instead of Oracle's one, >> > primarily because of the infinality patches and because I prefer open >> > source >> > software. >> > >> > There are some applications, though, that do not play ball with it >> > (namely, SenchaCmd) and I have to keep switching back and forth between >> > installed java-vms just to run it. >> > >> > I know nothing about Java or its environment, is there a way to specify >> > the java-vm just for this application instead of doing "eselect java-vm set >> > user 1; sencha *stuff*; eselect java-vm set user 3" everytime? >> > >> > Is there a set of environment variables that can do this? Shall I wrap >> > the command in a shell script? Ideas? >> >> Usually, every [well behaved] java application has JAVA_HOME or >> similar environment variable to tell it where java is. >> You can find a valid java homes at /usr/lib/jvm/*/jre or if you >> manually extracted oracle it will probably live in /opt/xxx. >> >> What you should do is go over this SenchaCmd startup script and find >> what it expects. >> >> Regards, >> Alon >> >
Re: [gentoo-user] [OT] Manipulating a mobile external harddisk
Dale[16-02-02 09:28]: > meino.cra...@gmx.de wrote: > > Hi, > > > > for storing not so often used data I bought a 2.5" external USB > > harddisk. > > > > This little beast has a very small timespan before it goes idle > > and (from the time needed to be woken up) it seems, it parks its > > heads then. > > > > The main usage of the disk to be connected to my PC from time to > > time, copy some data and unconnect it again. It will never be used > > with a laptop or such (accu driven machinery). > > > > Is it advisable to try to longen the active time before the disk > > goes idle to prolong the lifetime ? > > Is it possible to do this with hdparm? > > It is a sane idea? ;) > > > > Thank you very much in advance for any help ! > > Best regards, > > Meino > > > > > > I'm no expert by any means. I've read all sort of opinions on this. > I've read that it is better to leave puters running 24/7 so that there > is no cool/hot cycles and that it makes things last longer. I've also > read just the opposite for different reasons. Which is true, not sure. > I know I leave my machine running 24/7 and hardware wise, it has worked > well plus I don't have to wait for boot up and such either. I might > add, I'm on my puter a LOT. Even when I am asleep, I have it > downloading something, usually TV shows or something. That is why I > have a 3TB drive that is almost full. I do have a backup drive now > tho. ;-) > > I would also suspect that this may also depend on how the drive is made > and what it is engineered to handle. If a drive is made with a good > solid design for parking those heads a lot, then it should handle them. > If it is not designed to handle it, well, it may not end well. Maybe > research that model and see if you can find the limits on it, if there > is any, info or limits. > > Alan usually has some good info to share on this sort of topic. He > deals with a lot of servers and other hardware. Maybe he can provide > more info or a link to some. It's a interesting question tho. > > Dale > > :-) :-) > > Hi @all, thanks for the infos so far. Just to correct me if I got it wrong expressed (sorry, I am no native english speaker...) The harddisk in question is this little external USB hd, which is used for data storage only. It is by far no server disk or anything else high-end-24/7-thingy... ;) Best regards, Meino
Re: [gentoo-user] [OT] Manipulating a mobile external harddisk
meino.cra...@gmx.de wrote: > Hi, > > for storing not so often used data I bought a 2.5" external USB > harddisk. > > This little beast has a very small timespan before it goes idle > and (from the time needed to be woken up) it seems, it parks its > heads then. > > The main usage of the disk to be connected to my PC from time to > time, copy some data and unconnect it again. It will never be used > with a laptop or such (accu driven machinery). > > Is it advisable to try to longen the active time before the disk > goes idle to prolong the lifetime ? > Is it possible to do this with hdparm? > It is a sane idea? ;) > > Thank you very much in advance for any help ! > Best regards, > Meino > > I'm no expert by any means. I've read all sort of opinions on this. I've read that it is better to leave puters running 24/7 so that there is no cool/hot cycles and that it makes things last longer. I've also read just the opposite for different reasons. Which is true, not sure. I know I leave my machine running 24/7 and hardware wise, it has worked well plus I don't have to wait for boot up and such either. I might add, I'm on my puter a LOT. Even when I am asleep, I have it downloading something, usually TV shows or something. That is why I have a 3TB drive that is almost full. I do have a backup drive now tho. ;-) I would also suspect that this may also depend on how the drive is made and what it is engineered to handle. If a drive is made with a good solid design for parking those heads a lot, then it should handle them. If it is not designed to handle it, well, it may not end well. Maybe research that model and see if you can find the limits on it, if there is any, info or limits. Alan usually has some good info to share on this sort of topic. He deals with a lot of servers and other hardware. Maybe he can provide more info or a link to some. It's a interesting question tho. Dale :-) :-)
[gentoo-user] ls config file?
After a recent update of coreutils to version 8.25, 'ls -l' started displaying names containing spaces enclosed in single quotes, e.g.: drwxr-xr-x 6 belardi users 4096 May 21 2012 'Audio Libraries' drwxr-xr-x 2 belardi users 4096 Jun 10 2014 Brochure The option that controls this is --quoting-style, so --quoting-style=literal returns to the old behaviour (which I prefer). I can alias 'ls' to include this option but was wondering if there is a global configuration file controlling such behaviour. thanks, raffaele
[gentoo-user] Re: Java 8 and remote access
> >> >> > > I need to run a Java 8 app remotely. Can this be done on Gentoo? > >> > > Bummer. FYI guys, Amazon Workspaces, Amazon Appstream, and Microsoft > Azure RemoteApp kinda work the way I've described but they all have > limitations which exclude them from working for me in this case. It > looks like I'll be admin'ing another remote Gentoo system for this. > Do any cloud VM providers have Gentoo as an OS option? If not, is there a good one that lets you install your own OS? BTW since Java is a VM I'm surprised there is no service that lets you just upload a Java app and run it remotely on the service without any OS management. Am I missing anything there? - Grant
Re: [gentoo-user] ls config file?
On Tue, Feb 02, 2016 at 09:54:37AM +0100, Raffaele BELARDI wrote: > The option that controls this is --quoting-style, so > --quoting-style=literal returns to the old behaviour (which I prefer). I > can alias 'ls' to include this option but was wondering if there is a > global configuration file controlling such behaviour. There is no configuration file for ls(1), but we can still solve the problem. It is free software, after all! Put the file fix.patch in /etc/portage/patches/sys-apps/coreutils-8.25/ and apply the following changes to the ebuild (in the function src_prepare): --- old/sys-apps/coreutils/coreutils-8.25.ebuild2016-01-30 15:56:16.0 + +++ new/sys-apps/coreutils/coreutils-8.25.ebuild2016-02-02 10:18:38.985961581 + @@ -72,6 +72,8 @@ touch src/dircolors.h touch ${@/%x/1} fi + + epatch_user } Don't forget to regenerate the manifest ebuild .../sys-apps/coreutils/coreutils-8.25.ebuild manifest and recompile! ;-) diff a/src/ls.c b/src/ls.c --- a/src/ls.c +++ b/src/ls.c @@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv) if (isatty (STDOUT_FILENO)) { format = many_per_line; - set_quoting_style (NULL, shell_escape_quoting_style); /* See description of qmark_funny_chars, above. */ qmark_funny_chars = true; }
Re: [gentoo-user] [OT] Manipulating a mobile external harddisk
On 02/02/2016 12:38 AM, meino.cra...@gmx.de wrote: > Hi @all, > > thanks for the infos so far. > > Just to correct me if I got it wrong expressed > (sorry, I am no native english speaker...) > > The harddisk in question is this little external > USB hd, which is used for data storage only. > It is by far no server disk or anything else > high-end-24/7-thingy... ;) > > Best regards, > Meino > > > > Also, USB disks will have a USB timeout before the port itself sleeps. It could be that the USB drive firmware itself sleeps the drive when the USB port goes to sleep. Dan
Re: [gentoo-user] [OT] Manipulating a mobile external harddisk
meino.cra...@gmx.de wrote: > Is it advisable to try to longen the active time before the disk > goes idle to prolong the lifetime ? > Is it possible to do this with hdparm? I have three external USB disks. Two of them are going to sleep after a few minutes, one is always spinning. All of them ignore the hdparm commands. That means I could not change any of the disk parameters with hdparm. -- Regards wabe
Re: [gentoo-user] ls config file?
On Tue, Feb 02, 2016 at 10:47:04AM +, Andrew Tselischev wrote: > [...] > Don't forget to regenerate the manifest > > ebuild .../sys-apps/coreutils/coreutils-8.25.ebuild manifest > > and recompile! > [...] I forgot to mention, that if you seriously want to take that approach, you'd need to mirror coreutils' ebuilds in your own portage overlay. The changes to the ebuild (and Manifest) will get overwritten next time you sync the tree.
Re: [gentoo-user] ls config file?
Neil Bothwickwrote: > On Tue, 2 Feb 2016 11:07:02 +, Andrew Tselischev wrote: > > > I forgot to mention, that if you seriously want to take that approach, > > you'd need to mirror coreutils' ebuilds in your own portage overlay. The > > changes to the ebuild (and Manifest) will get overwritten next time you > > sync the tree. > > > > There's no need for that. Just create /etc/env/portage/sys-apps/coreutils > containing > > post_src_unpack() { > cd "${S}" > epatch_user > } Is it not /etc/portage/env instead? -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com
Re: [gentoo-user] ls config file?
On Tue, 2 Feb 2016 11:07:02 +, Andrew Tselischev wrote: > I forgot to mention, that if you seriously want to take that approach, > you'd need to mirror coreutils' ebuilds in your own portage overlay. The > changes to the ebuild (and Manifest) will get overwritten next time you > sync the tree. > There's no need for that. Just create /etc/env/portage/sys-apps/coreutils containing post_src_unpack() { cd "${S}" epatch_user } -- Neil Bothwick WinErr 001: Windows loaded - System in danger pgpHnza2dyZdh.pgp Description: OpenPGP digital signature
Re: [gentoo-user] ls config file?
Andrew Tselischev wrote: > On Tue, Feb 02, 2016 at 09:54:37AM +0100, Raffaele BELARDI wrote: >> The option that controls this is --quoting-style, so >> --quoting-style=literal returns to the old behaviour (which I prefer). I >> can alias 'ls' to include this option but was wondering if there is a >> global configuration file controlling such behaviour. > > There is no configuration file for ls(1), but we can still solve the > problem. It is free software, after all! > > Put the file fix.patch in /etc/portage/patches/sys-apps/coreutils-8.25/ > and apply the following changes to the ebuild (in the function src_prepare): > fantastic! but I think I'll stick with the alias approach ;-) raffaele
[gentoo-user] Re: ls config file?
On 02/02/16 10:54, Raffaele BELARDI wrote: After a recent update of coreutils to version 8.25, 'ls -l' started displaying names containing spaces enclosed in single quotes, e.g.: drwxr-xr-x 6 belardi users 4096 May 21 2012 'Audio Libraries' drwxr-xr-x 2 belardi users 4096 Jun 10 2014 Brochure The option that controls this is --quoting-style, so --quoting-style=literal returns to the old behaviour (which I prefer). I can alias 'ls' to include this option but was wondering if there is a global configuration file controlling such behaviour. This is done with aliases. Actually, the "ls" command should by default be an alias. If you just enter: $ alias you are shown current aliases. "ls" should actually be defined as: alias ls='ls --color=auto' If you actually enter "/bin/ls", you'll see that by default ls doesn't even show colors. So Gentoo's default install provides an alias for that. You can provide your own alias in /etc/bash/bashrc, which is sourced by all interactive shells. All you need to do is provide your own alias. You can do that in your ~/.bashrc file by adding this: alias ls="ls --color=auto --quoting-style=literal" Logout and in again and you're done.
Re: [gentoo-user] ls config file?
On Tue, 02 Feb 2016 06:55:31 -0500, cov...@ccs.covici.com wrote: > > There's no need for that. Just > > create /etc/env/portage/sys-apps/coreutils containing > > > > post_src_unpack() { > > cd "${S}" > > epatch_user > > } > > Is it not /etc/portage/env instead? Of course it is. I was just checking if anyone was paying attention, as I clearly was not. -- Neil Bothwick The best things in life are free, but the expensive ones are still worth a look. pgp6H74_GoqM1.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Re: Java 8 and remote access
On 02/02/2016 02:50 PM, Grant wrote: I need to run a Java 8 app remotely. Can this be done on Gentoo? > >> Bummer. FYI guys, Amazon Workspaces, Amazon Appstream, and Microsoft >> Azure RemoteApp kinda work the way I've described but they all have >> limitations which exclude them from working for me in this case. It >> looks like I'll be admin'ing another remote Gentoo system for this. >> > > > Do any cloud VM providers have Gentoo as an OS option? If not, is there a > good one that lets you install your own OS? > > BTW since Java is a VM I'm surprised there is no service that lets you just > upload a Java app and run it remotely on the service without any OS > management. Am I missing anything there? > > - Grant > linode.com and kimsufi.com lets you install gentoo. There might be many more. You might want to look into something like cfengine, puppet or chef to lessen your workload of running multiple machines. I've used linode for a couple years and its never been any problem, I do see that I'm probably paying for more than I need, but that's another story. signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] [OT] Manipulating a mobile external harddisk
On Tuesday 02 Feb 2016 09:38:33 meino.cra...@gmx.de wrote: > The harddisk in question is this little external > USB hd, which is used for data storage only. > It is by far no server disk or anything else > high-end-24/7-thingy... ;) > > Best regards, > Meino I was running a 350GB WD Passport plugged into an embedded SoC device, for 6 years non-stop, except when power cuts caused the embedded device to stop/crash, or when I rebooted it (less than a dozen times a year). When it died on me I replaced it with another WD Passport, this time 1TB. It's been running for 1.5 years so far. I have never interfered with whatever its own USB controller wants to do with its spin cycles. I never saw a reason to. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
[gentoo-user] Re: Switching current java-vm for a single application
Hi Leonard, Leonardo Guilherme wrote: > Hello. > > I'm using OpenJDK JVM regularly on my machine instead of Oracle's one, > primarily because of the infinality patches and because I prefer open > source software. > > There are some applications, though, that do not play ball with it > (namely, SenchaCmd) and I have to keep switching back and forth between > installed java-vms just to run it. > > I know nothing about Java or its environment, is there a way to specify > the java-vm just for this application instead of doing "eselect java-vm > set user 1; sencha *stuff*; eselect java-vm set user 3" everytime? > > Is there a set of environment variables that can do this? Shall I wrap the > command in a shell script? Ideas? Either the application uses already a script to start and you can modify JAVA_HOME there or you may wrap it in a shell script. Simply set JAVA_HOME using Gentoo's java-config command: = %< == #! /bin/bash JAVA_HOME=`java-config --select-vm=oracle-jdk-bin-1.8 -o` command = %< == The option -o prints the JRE home, see the --help option to see alternatives. The selection name is the name used in eselect, so you may update the package without touching the script. Cheers, Jörg
Re: [gentoo-user] Record sizes of directories of a directory tree (huge) most efficiently
On Wed, Jan 27, 2016 at 05:25:37PM +0100, meino.cra...@gmx.de wrote: > Hi, > > I want to determine the size of the contents of all directories of a > tree of directories on a hexacore AMD64 machine with 4GB RAM an one > harddisk (containing that tree) -- most efficiently (least time > consuming). A bit late to the game, but here is my way for this. For a one-off thing, I use the already-mentioned excellent ncdu, which provides vi-style navigation and even offers interactive deletion. du is a viable option for quick use on smaller lists. But when it comes down to actual comparable lists to be stored and archived, I like to use tree. In particular, I use it to store lists of content of my external harddisks, so I can find out what I stored where without having to turn the disks on, including used disk space. For that purpose, I use two different outputs. One paints the tree as such using ascii art, showing the size next to the indented name: tree -ax -n --du -h --dirsfirst The other one is a tabular format that is easier to look at in long lists, because it aligns size and date and prints the whole path, which also makes it easier to diff: tree -afx -DFins --dirsfirst --du --timefmt "%F %T" Tata -- Gruß | Greetings | Qapla’ Please do not share anything from, with or about me on any social network. I had a problem and used Java. Now I have a ProblemFactory. signature.asc Description: Digital signature
Re: [gentoo-user] Record sizes of directories of a directory tree (huge) most efficiently
Frank Steinmetzger wrote: > On Wed, Jan 27, 2016 at 05:25:37PM +0100, meino.cra...@gmx.de wrote: >> Hi, >> >> I want to determine the size of the contents of all directories of a >> tree of directories on a hexacore AMD64 machine with 4GB RAM an one >> harddisk (containing that tree) -- most efficiently (least time >> consuming). > A bit late to the game, but here is my way for this. > For a one-off thing, I use the already-mentioned excellent ncdu, which > provides vi-style navigation and even offers interactive deletion. > > du is a viable option for quick use on smaller lists. But when it comes down > to actual comparable lists to be stored and archived, I like to use tree. In > particular, I use it to store lists of content of my external harddisks, so > I can find out what I stored where without having to turn the disks on, > including used disk space. > > For that purpose, I use two different outputs. One paints the tree as such > using ascii art, showing the size next to the indented name: > tree -ax -n --du -h --dirsfirst > > The other one is a tabular format that is easier to look at in long lists, > because it aligns size and date and prints the whole path, which also makes > it easier to diff: > tree -afx -DFins --dirsfirst --du --timefmt "%F %T" > > Tata Have you seen this tool? sys-fs/treesize It seems to be a tool more along the lines of what you are doing. I just noticed it in portage myself and thought it may be something that would interest you. I might add, there are other tree variations on this too. You may find eix tree interesting to look at. Dale :-) :-)