« first day (3254 days earlier)      last day (1695 days later) » 

12:10 AM
@EliahKagan Ugghhh I hate policy kits. Tried them with introduction of 16.04 for gksu, threw my hands up in the air and wrote my own stuff.
 
12:51 AM
Would people be open to new tags argument and parameter?:
0
Q: How to pass 2>/dev/null as variable

WinEunuuchs2UnixI have this code that works: # Hide irrelevant errors so chrome doesn't email us in cron if [[ $fCron == true ]] ; then google-chrome --headless --disable-gpu --dump-dom \ "$RobWebAddress" > "$DownloadName" 2>/dev/null else # Get silly error messages when running from terminal ...

 
1:16 AM
Hi @Zanna you're kind of an expert in this. What do you think of a new tag of argument and/or parameter?
 
 
2 hours later…
3:24 AM
0
Q: How to configure network in Ubuntu via SSH?

Dong NguyenI want to configure the following settings to a remote machine via SSH: IP address Default gateway Subnet mask Primary/Secondary DNS Target machine based on Ubuntu 16.04 and newer, maybe run any desktop environment. What's the best/simplest way to do that?

 
@WinEunuuchs2Unix bad. Way too vague. Nobody would be an expert specifically in that. Just use the tag for the command or shell you're using
 
 
4 hours later…
7:19 AM
@WinEunuuchs2Unix Is it here on the site? Better a duplicate then an off-topic.
 
 
1 hour later…
8:20 AM
1
Q: Procmail cyrillic convertation

GneissI wrote a script for fetchmail to take mail from an account and pipe the messages to procmail for it to apply filters and save attachments. I used filter for Subject of the message, but I have cyrillics in the source subject, so when fetchmail pipes the messages to procmail the final subject star...

 
 
2 hours later…
9:58 AM
0
Q: remote reboot a server with sbin folder unreadable due to disk failure

GioxI need to reboot an Ubuntu Server 16.04, from terminal, where the sbin folder is unreadbale due to a disk IO error. Now if I run shutdown -r I get command not found, as the sbin folder is not readable, also many other services are unresponsive due to this issue. Is there another way to call the...

 
10:32 AM
@Fabby No I mean the code in the question is a copy of the code I wrote for eyesome:
`### "-q"= quiet, "-O-" pipe output
echo $(wget -q -O- "$SunHoursAddress" \
| grep -oE 'Sunrise Today.{35}' | awk -F\> '{print $3}' | \
tr --delete "<") > /tmp/eyesome-sunrise
echo $(wget -q -O- "$SunHoursAddress" \
| grep -oE 'Sunset Today.{35}' | awk -F\> '{print $3}' | \
tr --delete "<") > /tmp/eyesome-sunset

## If network is down files will have one byte size
size1=$(wc -c < /tmp/eyesome-sunrise)
size2=$(wc -c < /tmp/eyesome-sunset)

if [[ $size1 -gt 1 ]] && [[ $size2 -gt 1 ]] ; then`
 
10:53 AM
@WinEunuuchs2Unix Only the wget command. But yay! That's a nice compliment still :)
 
@terdon No even the two comments are duplicated in his question's code :)
 
Well, yes, the comment was presumably copied along with the wget command.
 
11:15 AM
It's published for free so I'm glad it's getting some use. Getting sunrise and sunset times daily is crucial for automatically adjusting brightness and gamma across your monitors.
Actually @ByteCommander question is responsible for that 18 month long project.
Set initial startup background brightness depending on daytime and I guess it's really a 3 year old project now. How time flies!
 
@WinEunuuchs2Unix I never quite got the point of that. Surely it will depend on the weather, whether it's a bright day, a dark room, etc. Is it really useful for you to adjust these settings automatically?
Presumably yes, or you wouldn't have spent all this time on it.
 
It also depends on if the sun is setting over a rooftop or between two buildings. You set a transition period of say 120 minutes after sunrise and 90 minutes before sunset for gradual changes you never notice. It works for me now very well. I have thought of a dark stormy day setting as an improvement though.
The tricky part is defining the gamma which they call red light, or red shift or warm / cold color temperature. It takes lots of playing around with reds, greens and blues. But I've had my current settings for what feels like a year.
 
11:36 AM
1
Q: SSHing into system with ZSH as default shell uses interactive, non-login shell

nightsparcI'm experiencing a strange behavior on some of our machines atm. At least, it seems strange to me and my colleagues and we didn't find any explanation for it :) We're using bash and zsh here. So, when SSHing into some of the zsh-default-machines (plain ssh login@host) which are configured to use...

 
11:55 AM
1
Q: Swwitch display manager to lightdm

Marcel KoperaI downloaded lightdm for my ubuntu 18 (aarch64), installed it and set it as default. When I type cat /etc/X11/default-display-manager this is the output /usr/sbin/lightdm But desktop is still gdm3 even if I restart pc. Why?

 
12:35 PM
0
Q: unable to setup gunicorn deamon process

virusI am unable to setup the gunicorn daemon process in ec2 instance. Below are sample code and error/log messages. myproject-backend/gunicorn.conf import os import multiprocessing from dotenv import load_dotenv # load .env file APP_ROOT = os.path.dirname(__file__) dotenv_path = os.path.join(APP_...

 
 
1 hour later…
1:50 PM
@terdon @EliahKagan I've expanded a bit on my question re. find.
 
@DKBose That was you! I thought it was a new user!
@DKBose why don't you just run find on the target directories only then?
find  ~/Desktop ~/Documents ~/Dropbox -name foo
 
@terdon, I'm still a new user as far as CLI goes!
 
@DKBose Fair enough. Still, next time do put some more detail in the question! You're not a new user of AU :)
 
2:06 PM
@terdon fair enough! Actually, I'm trying to find a way to backup certain files selectively. And so I want to use find to return just the last file I modified without noise from other files that are automatically modified.
 
@DKBose I really think you need to explain all this in your question. You seem to be asking for one thing, then show a command which does something completely different. And the command shows you already know what both @EliahKagan and I spent time writing up into an answer :/
Which is kinda why it's really helpful to explain what you need from the beginning.
 
Okay, I'll do so. It will be a major rewrite!
 
@DKBose Well, at least explain what you need the command to do. I mean, what you already have and what's still missing. You originally asked if it is possible to exclude a specific directory but then you show that you already knew exactly how to do that.
So at this point I honestly have no idea what you have and what you're still missing.
 
@terdon, I'm rewriting it now. Hopefully it will be clearer.
 
Great, thanks!
 
2:31 PM
@terdon @EliahKagan I hope the rewrite makes sense. I myself aren't to clear about how to go about ensuring I don't get false positives.
 
2:49 PM
Thanks!
Did you really mean cp $(latest) there? That will attempt to run the command "latest"
Was that supposed to be cp "$latest"?
And what if there are >1 files with the same modification date?
 
0
Q: iptables difficulty

jkirk4I'm following the cuckoo docs to set it up on its own machine, which is connected to the network via LAN. I've created my first VM and created a host-only network to allow the VM to talk to the host. The guide then tells me to set up the ofllowing iptables rules: $ sudo iptables -t nat -A POSTRO...

 
@terdon I'll have to check! My head is spinning. Re. there being more than one file, that's the idea behind trying to eliminate such unwanted hits by narrowing down what find finds (I hope).
 
The code you're using will just pick one of two files if they were both modified at the same time. More importantly, don't you know what files you will be after? Or, at least, what directories?
And it sounds like you want to backup files that haven't been saved yet, is that right?
 
@terdon, instead of using the standard Ctrl+S, I'd use a shortcut pointing to the script that would save the original file and also create the timestamped backup.
 
@DKBose But that won't keep your changes. It will only keep the original before your changes. The changes aren't actually written to file until you Ctrl+S it.
 
2:56 PM
That's still to be figured out but shouldn't be too difficult?
 
@DKBose No, that's going to be a deal breaker. When you're editing a file in libre office, the data you are editing are either just in RAM or in a temp file somewhere but that could be in /tmp or anywhere.
It actually sounds like you want to use something like git instead.
 
@terdon but can't I have xdotool to do the Ctrl+S and follow it up with the backup?
 
Oh. I have no idea. I guess, yes.
It seems far simpler to just take regular backups of everything instead. Use rsync and only backup files that have changed.
 
@terdon, I used to use rsync a bit in the past (with crontab and an on-screen notification) but somehow stopped :(
 
3:12 PM
0
Q: Substituting with awk variables

GiannkasI have a file that contains it: P2_142_USD16089440L_HJM27DSXX_L3 P2_144_USD16089441L_HJM27DSXX_L3 P2_145_USD16089442L_HJM27DSXX_L3 P2_168_USD16089450L_HJM27DSXX_L3 P2_171_USD16089451L_HJM27DSXX_L4 P2_172_USD16089452L_HJM27DSXX_L4 P2_188_USD16089456L_HJM27DSXX_L4 P2_262_USD16089477L...

 
4
Q: Automatic flagging of "keto" users with Reputation == 1?

waltinatorI have not ever seen a question containing the word "keto" that was about Ubuntu. Is it possible to prevent Reputation 1 posters from posting a question containing "keto"?

 
 
3 hours later…
6:07 PM
:D
> And you could also alias jos=if niin=then soj=fi and then write all your if-statements in Finnish. I'm sure anyone reading the script would love you.
 
0
Q: How to get linux onto old IBM thinkpad?

personI have an IBM thinkpad 760LD which only has a floppy drive, a serial port, and a parallel port to communicate with. I would like to install minimal ubuntu on to the computer. I don't have another computer that can burn floppy disks. Is it possible to send data through the serial port to the hard ...

 
3
A: How to pass 2>/dev/null as a variable?

ilkkachu Why does a hard-coded argument work but not an argument as a variable? Because syntax items aren't interpreted from expanded variable values. That is, variable expansion isn't the same as replacing the variable reference with the text of the variable in the command line. (Stuff like ;, |, &&...

 
6:27 PM
@WinEunuuchs2Unix wow, and it’s even real oO karkat.de and ingo-karkat.de
 
7:07 PM
0
Q: Why is my network unreachable during boot?

PiotrCherninI recently upgraded Ubuntu 14.04 to Ubuntu 16.04, which includes the changeover from Upstart to systemd. Since then, when the system boots, about half the time it drops into an emergency shell. I've tracked this down to the system's attempt to mount a directory from a remote data server. From ...

 
 
3 hours later…
10:22 PM
@dessert why did you make this edit?
Not saying it was wrong, I'm just curious. The code was already indented, and the question was tagged with bash so it was already syntax highlighted, so why bother changing the markdown?
 
I wasn't involved in the edit but I imagine the reason for it is so that the second code block, which is an sh script, is highlighted as sh rather than as bash. (After the edit, the first code block is explicitly highlighted as bash code and the second is explicitly highlighted as sh code.) I'm not sure syntax highlighting on AU currently treats them differently (it ought to, but I'm not sure it currently does).
 
@EliahKagan I thought of that but as far as I know sh and bash are highlighted the same way.
Yeah, just tried and it doesn't make any difference. Nor should it, really, they have the same syntax after all.
Or, rather, sh is a subset of bash so bash's syntax coloring should also cover sh's.
Oh well. I'm off to bed, Byte will let us know tomorrow :)
 
11:09 PM
@terdon Is sh a subset of bash or is bash the bloated grandchild of sh which is why they say systemd folks prefer sh over bash for SPEED...
 
Perhaps "sh is a subset of bash" and "bash is the bloated grandchild of sh" are two ways of asserting the same set of facts but expressing different attitudes toward those facts. :)
 

« first day (3254 days earlier)      last day (1695 days later) »