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
Viscart
Oct 25, 2017

hooah posted:

Did you have time to look into this?
Honestly, I've tried such things in many different ways, but the only way that ends up working for me is Xmodmap. Figuring out keycodes rather than key aliases can help if there is no apparent reason for lack of success.

Adbot
ADBOT LOVES YOU

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
Comedy answer: just monkey patch the kernel to tweak your keys, like this guy:
https://blog.cloudflare.com/how-to-monkey-patch-the-linux-kernel/

Truga
May 4, 2014
Lipstick Apathy

hooah posted:

Did you have time to look into this?

poo poo sorry, forgot all about this. What you want to do should be pretty simple. Basically, you want to run setxkbmap -print.

You'll want to look at the symbols line, that'll tell you what file to edit, it should look something like pc+us+inet(evdev)+blablabla on most distros. Open the first file (in fedora's case it's called "pc"), scroll down to <PGUP> and <PGDN> and swap em out. That should make it work. If it's not present in the first file, look in the second, and so on.

Ubuntu also used to have xkb cache in /var/lib/xkb/, dunno if this is still a thing (I haven't used ubuntu in a couple years now) so check it out and delete everything in there if it exists. Then do anything to your keyboard settings (change layout, set an option, lock screen/relog/reboot, whatever) and it should be working. It'll work until the next time those files get updated by the system.

Obviously this isn't ideal, ideally you'd want a permanent solution, but setting up literally anything with a custom xkb setup never works, because xkb keeps resetting to default settings every time your computer sleeps, locks, you change a layout, and also at random time intervals, so you need to change the system files, rather than just keep a small file in your homedir or /etc/ or whatever. No, I do not know why. XKB keeps getting worse with time.

I dunno what was wrong with xmodmap, but poo poo's hosed as far as non-standard keyboards or keyboard layouts go on linux right now, and it really sucks. Yes, xmodmap is crude, but it actually loving works.

minato posted:

Comedy answer: just monkey patch the kernel to tweak your keys, like this guy:
https://blog.cloudflare.com/how-to-monkey-patch-the-linux-kernel/
I have a chomebook laptop and the amount of poo poo xkb gave me to get all the keys I wanted, I'd likely be better off just doing that. Making a custom shift state that works correctly in xkb is a gigantic loving pain in the rear end.

Truga fucked around with this message at 05:19 on Oct 29, 2017

Dr. Fishopolis
Aug 31, 2004

ROBOT

minato posted:

Comedy answer: just monkey patch the kernel to tweak your keys, like this guy:
https://blog.cloudflare.com/how-to-monkey-patch-the-linux-kernel/

See, that's silly because if he just built his own keyboard controller with an arduino clone he could do what he wants in hardware. There's even open source firmware: https://github.com/tmk/tmk_keyboard

obviously an expensive and time consuming solution but then he just has a magical keyboard that does all his nerd poo poo and he can use whatever system he wants.

Dr. Fishopolis
Aug 31, 2004

ROBOT
edit: doublepost

hooah
Feb 6, 2006
WTF?

Truga posted:

xkb stuff

Thanks, that worked like a charm.

Now for a strange graphical thing. Some windows (terminal, file browser, settings, Ubuntu Software) have a dark bar under them and a weirdly-shaded bar on top, as you can see in this screen shot of the terminal:



What's going on with the shadow here? Firefox, at least, doesn't do it, nor does KeePass2.

Plasmafountain
Jun 17, 2008

gvFgPNCtWC0ukNeqCniL
K3rLVZb8kGKm14vObUv9
vKwnCEKwJpnJnHyDlWyM
cpo59BtWzO7mzFC1O6GE
Rl2rnByDM2ISqOFXGCJb
CuHpQ6HOzklimCQSA6QU
YLZfxFVzMtPrMZA9BizQ
psHNowiO2DdLshpGMlVD
R8HMQ89IOqKbiT5xnuRP
qygXTRBO5bn9kJZXALgP

Plasmafountain fucked around with this message at 23:56 on Feb 27, 2023

RFC2324
Jun 7, 2012

http 418

Zero Gravitas posted:

Im throwing in the towel after another few hours of frustration.

I tried this:

https://www.hiroom2.com/2016/06/26/fedora-24-install-samba-and-share-with-windows-10/

and this:

https://www.server-world.info/en/note?os=Fedora_26&p=samba

I'm now at the point where Colossus (fedora machine) is now being seen by my W10 machine but cant be accessed for anything.

I get the feeling its due to some poo poo with the IP specified in samba.conf. It currently looks like this:
code:

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.


[global]
	unix charset = UTF-8
	security = user
	workgroup = WORKGROUP
	passdb backend = tdbsam
	hosts allow = 194.168.124.0
	map to guest = Bad User
	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw

[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = root
	create mask = 0664
	directory mask = 0775
[Share]
	path = /home/share
	writable = yes
	guest ok = yes
	guest only = yes
	create mode = 0777
	directory mode = 0777

My route table looks like this:

code:
[chris@colossus ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    100    0        0 enp5s0
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 enp5s0
192.168.124.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
I've used both the 10.- and the 192.- addresses in the samba conf. Neither have worked.

My F26 machine is plugged into my router with an ethernet cable and my W10 machine is connected via wifi.

My W10 machine IP via ipconfig is some 169. - address which doesnt appear on the F26 route table. Theres another address for the wireless adapter thats 10.0.0.27 but I get the feeling thats just an auto assigned address depending on the order of devices that have connected to my wireless lan.

If someone can help me stop going in circles and just get one poxy sharing folder sorted out I'll be ever so grateful.

Well, to start with the 169 address is local only(meaning that adapter isn't getting a valid IP address from DHCP and doesn't have one defined statically). Also the hosts allow line should be

194.168.124.

not
194.168.124.0

That latter is only allowing that specific IP address to connect, which is not is use.

Most likely you actually need to allow 10.0.0.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Is there something free that compares to lansweeper that I can run on my linux home server?

To save you a click, lansweeper is basically a network scanner with fingerprinting and all that jazz that serves up a nice web ui.

Of course, I could just shove lansweeper in a VM and run it there, but it'd be nicer to have something native...

Volguus
Mar 3, 2009

Thermopyle posted:

Is there something free that compares to lansweeper that I can run on my linux home server?

To save you a click, lansweeper is basically a network scanner with fingerprinting and all that jazz that serves up a nice web ui.

Of course, I could just shove lansweeper in a VM and run it there, but it'd be nicer to have something native...

You want the web ui or the scanner? Because the scanner is nmap. Console only (no idea if there's a UI for it). Lansweeper most likely is using nmap themselves (just a shot in the dark).

An Enormous Boner
Jul 12, 2009

Volguus posted:

You want the web ui or the scanner? Because the scanner is nmap. Console only (no idea if there's a UI for it). Lansweeper most likely is using nmap themselves (just a shot in the dark).

There's zenmap for nmap but it doesn't meet his needs at all. It is cool, however.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Volguus posted:

You want the web ui or the scanner? Because the scanner is nmap. Console only (no idea if there's a UI for it). Lansweeper most likely is using nmap themselves (just a shot in the dark).

I can use nmap via ssh. I'm interested in the web ui.


edit: here's what the web ui for lansweeper is like

https://www.youtube.com/watch?v=jImF2GoOJm8&t=4s

Thermopyle fucked around with this message at 23:34 on Nov 1, 2017

Xik
Mar 10, 2011

Dinosaur Gum
I replaced the OS hard drive of my media center with an SSD (a hand-me-down from my primary pc upgrade). Just on a whim, I decided to try LibreELEC instead of the Debian/XFCE/Kodi setup I had previously and holy poo poo it was a smooth experience.

It has a PCI-E AC Wifi card and is connected to a TV via HDMI cable. Hardware video decoding, audio over HDMI, wifi , avahi all working out of the box. I literally went from a USB with install media to working install in like 3 (?) minutes, loving magical.

Ihmemies
Oct 6, 2012

How do I boot Linux from an usb stick? I "burn" a linux image to usb stick with win32 disk writer or unetbootin, no difference. Linux mint says "GRUB GRUB" and reboots from any key. Stresslinux just gives a 0% progress bar for 2 minutes and reboots.

This can't be that hard. I have Asus Z370 motherboard and a 8700K. I want to test memory stability but Google's stressapptest is linux only.

Any ideas? I thought these live linux usb sticks were a non-issue these days :confused:

Furism
Feb 21, 2006

Live long and headbang
I don't know about the specifics of your problem but always use Rufus to create a bootable USB drive.

And if you need Linux to run just one binary, install Ubuntu on Windows (if you're running Win 10 that is) or just use a VM.

Ihmemies
Oct 6, 2012

Thanks, maybe the apps I used were outdated and just plain sucked! I'll try rufus next :)

Problem with VM's etc is that you can't get maximum memory allocation if/when you want to test the maximum amount of memory for stability issues.

At least rufus has a ton of options to adjust the file system etc. while the apps I used were basically "select an image to write to usb disk".

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Ihmemies posted:

Thanks, maybe the apps I used were outdated and just plain sucked! I'll try rufus next :)

Problem with VM's etc is that you can't get maximum memory allocation if/when you want to test the maximum amount of memory for stability issues.

At least rufus has a ton of options to adjust the file system etc. while the apps I used were basically "select an image to write to usb disk".
If you are writing an image to a USB disk using Rufus, apply the image and those settings will be configured based on the image. You can change them (e.g. when you want to change a disk from FAT to NTFS or vice versa), but that happens after you select the image.

The Phlegmatist
Nov 24, 2003

Ihmemies posted:

Any ideas? I thought these live linux usb sticks were a non-issue these days :confused:

UNetbootin is really janky and often fails to create bootable USBs but I've never had issues with Win32DiskImager as long as the ISO is an isohybrid image. Which most modern distributions are.

Some USB sticks just won't boot, though. Older SanDisks had this problem.

RFC2324
Jun 7, 2012

http 418

YUMI still works, which surprised me.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
I always had problems when doing it the other way round: using one of my Linux machines to create a Windows USB stick from a Windows ISO.

I still have a Windows 10 stick that I eventually managed to create that's well over a year out of updates and just use that on the odd occasion that I want to install Windows. Then I wait an age for it to do the automatic updates once it's installed.

I can't quite remember why I had problems but it involved getting the newly created stick to boot. Something to do with the way Linux doesn't dd the bootloader the way Windows likes it??

Sheep
Jul 24, 2003
Having a wonky issue with mdadm: built a RAID 5 array and moved a bit of data over, decided I might as well toss in another drive and up it to RAID 6 (while the reshape for RAID 5 was going on, if that matters), and now I'm sitting with one spare rebuilding, the fourth slot in the array listed as removed, and the new drive listed as spare.

[stuff removed because of edit below]

Edit: fixed it myself by doing an 'echo frozen' and then 'echo reshape' > /sys/block/md0/md/sync_action. Both drives reshaping now, though it did appear to blow away everything already on the array despite the original drives still being in active sync.

Sheep fucked around with this message at 11:46 on Nov 9, 2017

Furism
Feb 21, 2006

Live long and headbang

The Phlegmatist posted:

UWin32DiskImager as long as the ISO is an isohybrid image. Which most modern distributions are.

Rufus will sort that poo poo out for you, and change to the right mode if needed. It Just Works. Use Rufus guys.

The Phlegmatist
Nov 24, 2003

apropos man posted:

I can't quite remember why I had problems but it involved getting the newly created stick to boot. Something to do with the way Linux doesn't dd the bootloader the way Windows likes it??

Yeah, Windows ISOs don't have the same isohybrid magic that Linux ISOs do. When you dd a Windows ISO to a USB stick your BIOS won't find a bootloader and will get scared.

This is how you can do it manually, although you'll likely need to compile ms-sys from source since MS got pissy about licensing and got it pulled from a lot of distributions' repos.

You can also use WoeUSB to automate the process.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

The Phlegmatist posted:

Yeah, Windows ISOs don't have the same isohybrid magic that Linux ISOs do. When you dd a Windows ISO to a USB stick your BIOS won't find a bootloader and will get scared.

This is how you can do it manually, although you'll likely need to compile ms-sys from source since MS got pissy about licensing and got it pulled from a lot of distributions' repos.

You can also use WoeUSB to automate the process.
If you're installing Windows 10, you should be able to boot from GPT. Linux should be able to create a GPT partition table.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Trying to make a jenkins build that will fail if ssllabs-scan returns anything but an A grade. What's goin on with my exit code here?

(the domain is some random one from their "recent worst" board just for testing)

code:
$ /usr/local/bin/ssllabs-scan --grade --hostfile ssllabs_hosts.txt 1>&2 | grep -E '": "[B-F]-*"'
2017/11/09 17:48:50 [INFO] SSL Labs v1.29.7 (criteria version 2009o)
2017/11/09 17:48:50 [NOTICE] Server message: This assessment service is provided free of charge by Qualys SSL Labs, subject to our terms and conditions: [url]https://www.ssllabs.com/about/terms.html[/url]
2017/11/09 17:48:52 [INFO] Assessment starting: [url]www.yui-amagi.com[/url]
2017/11/09 17:50:48 [INFO] Assessment complete: [url]www.yui-amagi.com[/url] (1 host in 113 seconds)
    61.208.205.231: F
"www.yui-amagi.com": "F"

2017/11/09 17:50:48 [INFO] All assessments complete; shutting down
bash-4.2$ echo $?
1
I thought grep would return exit code 0 if lines are found?

Geop
Oct 26, 2007

I've got a general question about something I'm running in to. I'm kind of self-taught on the Linux front, and I'm not a developer, so pardon any misnomers or poor wording :v:

SHORT VERSION: could someone recommend a Linux (RHEL 6.8+ preferably) command or software which can monitor run-time, disk IO values, and/or maximum memory usage for batch commands? This information would need to be saved per command (ie: average tracked info). Basically intended for regression and benchmarking checks.

My software can run in batch submits (provided environments are established), which makes queuing up a group of them rather simple. For general QA, I dug up a command to quickly print out run-time and a maximum memory-used command for batch submits; it'd be like the below:

code:
/usr/bin/time -v run_job jobname1.dat |& tee -a job_run.txt;
/usr/bin/time -v run_job jobname2.dat |& tee -a job_run.txt;
etc
I'd basically line up a long list of these, get a text output, and then I'd just grep for what's needed (building/populating spreadsheets manually). The issue, though, is that two things happened at once (OS change and developer-related changes). One of them caused the Maximum resident set size (correlates to peak memory usage) to be sent out as a flat value for all tests; 12188, for example. I THINK it is because the "run_job" command as I call it is now an executable rather than a script, but that's just a huge guess. Anyhow, do you guys have anything that comes to mind which I could possibly use in-place of this?

The main concern is just getting something that can monitor a long group of batch commands and output general info to a text-file. I can finesse something past that point. Still in the process of digging around on Google, but I'm not quite able to find what I'm looking for here. Maybe I'm not phrasing the search info properly.

Geop fucked around with this message at 19:47 on Nov 9, 2017

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
Some places run atop in non-interactive mode, which snapshots all process info every few seconds to disc, and then there are some tools you can use to extract meaningful stuff out of the raw data.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I feel like I may have asked this before, but I can't remember any answers...

I've got some continually-running lovely scripts I've got from another party that sometimes freeze. They output a bunch of stuff to stdout as they're working, but when they freeze the output stops.

Is there a good way to monitor these and kill/restart them if they don't output anything to stdout for X minutes or something?


I mean, I can just whip up something in python with subprocess and monitor their output that way, but I'm just curious if there's a Linux Way of doing this.

SamDabbers
May 26, 2003



Thermopyle posted:

I've got some continually-running lovely scripts...

I mean, I can just whip up something in python...

I think you answered your own question. Rewrite the lovely scripts in Python.

Geop
Oct 26, 2007

minato posted:

Some places run atop in non-interactive mode, which snapshots all process info every few seconds to disc, and then there are some tools you can use to extract meaningful stuff out of the raw data.
Ahh, this might be a winner. I'll give it a go; thanks for the recommendation! :shobon:

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

The Phlegmatist posted:

Yeah, Windows ISOs don't have the same isohybrid magic that Linux ISOs do. When you dd a Windows ISO to a USB stick your BIOS won't find a bootloader and will get scared.

This is how you can do it manually, although you'll likely need to compile ms-sys from source since MS got pissy about licensing and got it pulled from a lot of distributions' repos.

You can also use WoeUSB to automate the process.

Nice find for WoeUSB! Thanks.

jre
Sep 2, 2011

To the cloud ?



Thermopyle posted:

I feel like I may have asked this before, but I can't remember any answers...

I've got some continually-running lovely scripts I've got from another party that sometimes freeze. They output a bunch of stuff to stdout as they're working, but when they freeze the output stops.

Is there a good way to monitor these and kill/restart them if they don't output anything to stdout for X minutes or something?


I mean, I can just whip up something in python with subprocess and monitor their output that way, but I'm just curious if there's a Linux Way of doing this.

https://mmonit.com/monit/

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender

Thermopyle posted:

I feel like I may have asked this before, but I can't remember any answers...

I've got some continually-running lovely scripts I've got from another party that sometimes freeze. They output a bunch of stuff to stdout as they're working, but when they freeze the output stops.

Is there a good way to monitor these and kill/restart them if they don't output anything to stdout for X minutes or something?

The systemd way of doing this would be to configure WatchdogSec in the service file, and then have your scripts periodically call systemd-notify as a keep-alive ping.

The bash way might be to do something like this:

code:
shitty_script &
while true; do
  timeout 10m inotifywait -e modify /path/to/output/file
  if [[ $? == 124 ]]; then
     # 124 means it timed out.
     killall -9 myshittyscript
     shitty_script &
  fi
done

minato fucked around with this message at 01:17 on Nov 10, 2017

evol262
Nov 30, 2010
#!/usr/bin/perl
Or write a jankier shell script which attaches to the open FD of the process and kills it if there's no output in so many seconds.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I think I'll just write a python script that calls these thousand+ line shell scripts via subprocess and monitors their output.

xzzy
Mar 5, 2009

Cool so now you're reinventing threads!

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

That's not what a thread is!

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
I configured email alerting with mdadm so that I find out when it's degraded but it doesn't seem to be working. Over the weekend I replaced two disks which forced a degraded event, I never got the emails but if I login as root and check the dead letter queue I see all the notifications that should have been sent as email.



If I generate a test notification with "mdadm --monitor --scan --test -1" I get an email so that part seems to be working. Email notifications are routed via postfix and from what I know it should just queue up, I did disconnect it from the internet at the beginning but later reconnected it so the emails should have gone through.

Anyone know why this happened and how I can prevent it in the future?

Ashex fucked around with this message at 14:39 on Nov 15, 2017

Wicaeed
Feb 8, 2005
Currently work for a firm that is 99% Windows (AD DNS/DHCP, Auth, PKI), but is working on an accelerated timeline for moving many of their applications over to Containers running on Linux. Before Devs ask to start just throwing Linux boxes into our environment, I want to be aware of any gotchas before we start deploying stuff, things pre-populating UIDs/GIDs to make sure they match across environments, patch management, system imaging, etc.

Most likely it will be a RHEL environment, and I'm sure RedHat is more than happy to charge $$$ for consultants to tell us all this, but I thought I'd ask if anyone has any good information here.

Thanks.

Adbot
ADBOT LOVES YOU

xzzy
Mar 5, 2009

Get a local registry running before anything else.

That's the only growing pain we had when spinning this stuff up.. docker makes it super easy to freewheel your implementation so you get a nice proof of concept running and then you realize it's time to open it up to other people and the real work has only just begun.

Also if your machines need to have local firewalls, don't let docker manage iptables rules. Its default behavior is to do godzilla over the forward chain and anything else you got in there may as well not exist. Dev response is "whelp if you want a firewall, do it yourself!"

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