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
FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams


I needed to make sure I had all the files from a set, but they were spread out in separate folders, so I did this:
code:
find . -name "*Thing*" | rev|cut -d\/  -f1 | rev | sort
rev reverses the output, cut splits it at the directory slash and gives me only the first column (which is actually the last column, aka the directory name) then rev again puts it forward, then sort it.

Adbot
ADBOT LOVES YOU

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost




Zom Aur posted:

Sometimes, wine doesn't play nice with pulse. What you can do is, use winecfg, switch to OSS output only, then you use padsp to launch wine.

Ergo, simply replace 'wine' with 'padsp wine' in your shortcuts, menus, or whatever you use to launch it.

(You could also give this a try, friends who like foobar seems to like that too)

Cross posting from the Ubuntu thread as this is what I used to do until I got sick of having to edit all my shortcuts and still having occasional audio issues with Wine. I ended up switching Wine to Esound and installing the esound->pulse bridge (pulseaudio-esound-compat, iirc) and havn't had a single issue with sound in Wine since then and I didn't have to mess with pulse.

ToxicFrog
Apr 26, 2008




taqueso posted:

cat `tail -n1 filelist.txt` | more

e: http://tldp.org/LDP/abs/html/commandsub.html

What's wrong with

code:
more `tail -n1 filelist.txt`
?

waffle iron
Jan 16, 2004


Is it weird that I've got into the habit of using $() instead of ``? I find it handy for the one or two times you need to nest the statements. That and it's a lot easier to type into the terminal emulator on my Motorola Droid.

pseudorandom name
May 6, 2007
INSOLENT


I always use $() because it is easier to see than backquotes.

taqueso
Mar 8, 2004









ToxicFrog posted:

What's wrong with

code:
more `tail -n1 filelist.txt`
?

That should work OK too

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams


They're both better than
code:
cat `tail -n1 filelist.xt` | less

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.


Please stop it with unnecessary cat! If you're going to pipe data in instead of passing the filename on the command line:

code:
less <$(tail -n1 filelist.txt)
(This is obviously a better example for xargs or some command that doesn't actually take a filename.)

Vulture Culture fucked around with this message at 02:58 on May 5, 2011

TheGopher
Sep 7, 2009


I prefer:

code:
rev `tail -n1 filelist.txt` > file.txt; rev file.txt | less

Erasmus Darwin
Mar 6, 2001


Misogynist posted:

Please stop it with unnecessary cat!

gently caress that.

It's one thing if you're avoiding 'cat' in order to pass the filename directly to 'more'. In that case, there's a real advantage to the user in that 'more' allows you to page backwards when it's provided with a filename instead of reading from stdin.

But if you're using <, then 'more' is at the same disadvantage as when it's getting its input piped from 'cat'.

Why 'cat' is good:

  • You're not one key away from obliterating your data. (< and > are right next to each other. Even with enough experience to tell them apart, typos happen.)
  • A nice, delineated flow from left-to-right -- cat input | process1 | process2 > output. The alternatives either result in a lack of boundaries between the input file and process1 ("<input process1 | process2 > output"), or they break up the flow ("process1 <input | process2 > output").
  • An extra 'cat' process means jack poo poo in terms of resources. Computer time is cheap. Programmer/user time is expensive. This has been a widely accepted maxim virtually everywhere EXCEPT for the useless cat issue.
  • I'm serious. Computer resources are cheap. I just copied a gigabyte of nothing from /dev/zero to /dev/null because I loving can. It took less than a second. If I can do that, an extra cat here and there ain't going to matter.

So as long as you understand why 'cat' isn't necessary, I say use it if you want. Go and do whatever makes you happy.

pram
Jun 10, 2001


Could it be.. a linux argument more tedious and pointless than editor wars??

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



Fresh install of OpenSUSE, how do you get KDE to 'forget' the last person to login? If I reboot, my username name automatically populates the login: field.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Bob Morales posted:

Fresh install of OpenSUSE, how do you get KDE to 'forget' the last person to login? If I reboot, my username name automatically populates the login: field.

From what I remember of KDE 3.1, you can manage default user logon and other session stuff in Control Centre's SU section. May have to combine that with disabling 'save session'. Or are you booting straight into runlevel 4?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



Underflow posted:

From what I remember of KDE 3.1, you can manage default user logon and other session stuff in Control Centre's SU section. May have to combine that with disabling 'save session'. Or are you booting straight into runlevel 4?

4 or 5, the display manager automatically comes up when I boot.

ExcessBLarg!
Aug 31, 2001


Erasmus Darwin posted:

An extra 'cat' process means jack poo poo in terms of resources. Computer time is cheap. Programmer/user time is expensive. This has been a widely accepted maxim virtually everywhere EXCEPT for the useless cat issue.
I'm in agreement, but furthermore:

There's maybe an argument to removing superfluous cats from shell scripts, although more from a readability standpoint.

But for one liners? Who gives a poo poo about how computationally inefficient they are? I write some of the most inefficient one-line abominations known to man and it doesn't matter since they finish in a blink instead of 1/10th a blink. Either way, I have to run it once, grab the results I need and move on with life.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.


You guys are easy

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Bob Morales posted:

4 or 5, the display manager automatically comes up when I boot.

Try escaping to the command line; then log in on another terminal with the same userid and start X with 'startx -- :2'. If it still happens, it should be something in your KDE config you can change in Control Centre in the superuser section.

Can't imagine it's something dictated by the SuSE config, but if it is and you can't change it (unlikely), perhaps you can just modify /etc/inittab to boot into runlevel 3 and start your X sessions manually. I use the ' -- :n' suffix on a per-user basis for multiple simultaneous X sessions using different WMs. It's pretty handy for separating work from play.

Ziir
Nov 20, 2004

by Ozmaugh


I'm about to install Arch on my Linux laptop now. Wish me luck

rt4
Feb 19, 2008


Grimey Drawer

If you have open source wifi drivers or an ethernet cable handy everything should be real easy. Just pay real close attention to the instructions on the wiki!

Defghanistan
Feb 9, 2010

2base2furious


Hello,

I have recently been tasked with figuring out how to patch our Ubuntu servers both in QA and production. I am pretty familiar with WSUS and MS's very nice tiered patching system with auto approval for certain classifications of patch, etc. but do not know of a smooth way to handle it in Ubuntu.

Does anyone have any suggestions for patch management in a linux server environment at or above 100 servers?

Currently my working plan is to use admins to monitor for vulnerabilities, and then patch our systems using a tool called Chef (http://opscode.com) which allows you to create separate environments for QA and production. Chef would deploy patches we approve from an internal apt repository that we'd have to setup:


1. We create and monitor RSS feeds for security vulnerabilities to some top security sites. We also subscribe to email notifications for our vendors.
2. A vulnerability/patch is reported
3. We download and install this patch on a test system(s) and wait a period of time
4. We add this patch to an environment like QA and then wait a period of time
5. If successful we can then push to any other environment we choose

Is this reasonable? Are there better ways to handle Ubuntu server patching in production? I appreciate any and all feedback.

Edit: I should also mention that the benefit of using chef for this is that as long as the chef server can assign its roles to the node server, we'll know that they are patched. It won't replace good ol' reporting and auditing but it would be better than nothing.

Defghanistan fucked around with this message at 17:47 on May 5, 2011

Ziir
Nov 20, 2004

by Ozmaugh


rt4 posted:

If you have open source wifi drivers or an ethernet cable handy everything should be real easy. Just pay real close attention to the instructions on the wiki!

It's downloading and installing packages right now but I'm getting a ton of errors saying it failed to get a file from the mirror I chose (I downloaded the netinstall version). Should I just let it run or how do I quit the download so I can choose another mirror?

HolyDukeNukem
Sep 10, 2008



Ziir posted:

It's downloading and installing packages right now but I'm getting a ton of errors saying it failed to get a file from the mirror I chose (I downloaded the netinstall version). Should I just let it run or how do I quit the download so I can choose another mirror?

sometimes you update while a server is updating its packages. Just reupdate and it should work fine.

rt4
Feb 19, 2008


Grimey Drawer

Ziir posted:

It's downloading and installing packages right now but I'm getting a ton of errors saying it failed to get a file from the mirror I chose (I downloaded the netinstall version). Should I just let it run or how do I quit the download so I can choose another mirror?

That's par for the course. If it keeps failing it should fallback to other mirrors, or at least that's how things work on my presently installed system...

Ziir
Nov 20, 2004

by Ozmaugh


Hmm, alright, I think I hosed something up. I left it sitting there to download the packages for a few hours and when I came back the percentage bar didn't move at all so I just assumed it froze up or something and rebooted the system. Now I'm trying to just restart the installer but when it tried to partition my hard drive it doesn't work.

So I get an error: "Error partitioning /dev/sda (see /dev/tty7 for details)" and tty7 says: "unrecognized bootable flag - choose - or *" and the next line: "sfdisk: bad input" and then the installer quits.

I restarted the installer again and now I'm getting a different message:

code:
Filesystem/blockdevice processor problem
Warning: Could not create all needed filesystems.
Either the underlying blockdevices didn't became available in
10 iterations, or profess_filesystem failed."
Then I get some mounting errors and the system rolls back.

poo poo, what did I do

e: I just wiped the hard drive with gparted and everything works now.

Ziir fucked around with this message at 22:52 on May 5, 2011

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



Underflow posted:

Try escaping to the command line; then log in on another terminal with the same userid and start X with 'startx -- :2'. If it still happens, it should be something in your KDE config you can change in Control Centre in the superuser section.

Can't imagine it's something dictated by the SuSE config, but if it is and you can't change it (unlikely), perhaps you can just modify /etc/inittab to boot into runlevel 3 and start your X sessions manually. I use the ' -- :n' suffix on a per-user basis for multiple simultaneous X sessions using different WMs. It's pretty handy for separating work from play.

It's under Login Screen -> Convenience.

Liking this so far, I just have to get used to YaST I'm used to apt or yum.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.


Defghanistan posted:

Hello,

I have recently been tasked with figuring out how to patch our Ubuntu servers both in QA and production. I am pretty familiar with WSUS and MS's very nice tiered patching system with auto approval for certain classifications of patch, etc. but do not know of a smooth way to handle it in Ubuntu.

Does anyone have any suggestions for patch management in a linux server environment at or above 100 servers?

Currently my working plan is to use admins to monitor for vulnerabilities, and then patch our systems using a tool called Chef (http://opscode.com) which allows you to create separate environments for QA and production. Chef would deploy patches we approve from an internal apt repository that we'd have to setup:


1. We create and monitor RSS feeds for security vulnerabilities to some top security sites. We also subscribe to email notifications for our vendors.
2. A vulnerability/patch is reported
3. We download and install this patch on a test system(s) and wait a period of time
4. We add this patch to an environment like QA and then wait a period of time
5. If successful we can then push to any other environment we choose

Is this reasonable? Are there better ways to handle Ubuntu server patching in production? I appreciate any and all feedback.

Edit: I should also mention that the benefit of using chef for this is that as long as the chef server can assign its roles to the node server, we'll know that they are patched. It won't replace good ol' reporting and auditing but it would be better than nothing.
This is, in principle, a really great idea. The one part that will bite you is that you're going to go through all the work to set it up, spend a day and a half documenting and vetting the process, and then realize that you don't have anyone in India to pay $6.35/hour to actually do your QA for you and that your time is better-spent doing work that adds real value to the organization. Giving someone in your org the job title of Security Nazi might scratch an itch, but not every patch is critical and not every breakage is a show-stopper.

Let's face it: like the rest of us, you don't have any idea what your QA criteria even are when Ubuntu decides they want to release a patch to libboost or libnss or something else entwined way in the plumbing of your system. There is no universal unit test suite for you to run across every one of your programs interfacing with that library.

Take the middle ground: pick a handful of packages that you really care about, ones that have serious capability to introduce breakage into your environment. QA the poo poo out of those. Ignore everything else and just push it to the QA environment. If something breaks, you can figure it out later -- that's much less time-consuming than testing every single update when 99.99% of them will give you no visible problems whatsoever.

Vulture Culture fucked around with this message at 00:01 on May 6, 2011

BlackMK4
Aug 23, 2006

wat.

Megamarm

How do you setup serial port console access on an existing linux (ubuntu) install?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



BlackMK4 posted:

How do you setup serial port console access on an existing linux (ubuntu) install?

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

Unless the latest one has something new with the whole startup deal.

Ziir
Nov 20, 2004

by Ozmaugh


I installed gnome and gdm and edited my /etc/inittab file to "Boot to X11" but when I reboot it still brings me to a terminal, and I want it to take me to a login screen like it does in Ubuntu. What am I doing wrong?

Gnome starts up just fine when I type startx.

Anjow
Aug 14, 2006




I want to add a directory to the PATH on 8 machines. I use ClusterIt to automate sending commands to a large number of servers, is there a single command (or one-line string of commands) that I can use to add a directory to the PATH, so that I can send that command to all servers?

lilbean
Oct 2, 2003



Anjow posted:

I want to add a directory to the PATH on 8 machines. I use ClusterIt to automate sending commands to a large number of servers, is there a single command (or one-line string of commands) that I can use to add a directory to the PATH, so that I can send that command to all servers?
Not sure which distribution you're using, but in RHEL and probably it's variants there's now a /etc/profile.d directory which contains shell snippets executed in sequence by all new (at least bash) shells.

So with ClusterIt you could do something like:
echo "export PATH=\$PATH:/mynewpath" > /etc/profile.d/newpath.sh

Just make sure the dollar is unescaped when creating the file.

And a PS, if you're going to maintain that many machines and more in the future you might want to look into Puppet or Chef to automate it all.

niss
Jul 9, 2008

the amazing gnome

Ziir posted:

I installed gnome and gdm and edited my /etc/inittab file to "Boot to X11" but when I reboot it still brings me to a terminal, and I want it to take me to a login screen like it does in Ubuntu. What am I doing wrong?

Gnome starts up just fine when I type startx.

If you have gdm installed already, add gdm to your /etc/rc.conf in the line that says daemons
would look something like
DAEMONS=(syslog-ng dbus network netfs crond gdm)

niss fucked around with this message at 12:33 on May 6, 2011

dont skimp on the shrimp
Apr 23, 2008



niss posted:

If you have gdm installed already, add gdm to your /etc/rc.conf in the line that says daemons
would look something like
DAEMONS=(syslog-ng dbus network netfs crond gdm)
This isn't the recommended way.

In /etc/inittab, find the line that says:
code:
#x:5:respawn:/usr/sbin/gdm -nodaemon
and uncomment it.

Comment the line that says:
code:
x:5:respawn:/usr/bin/xdm -nodaemon
If you enable gdm through rc.conf, it'll always load. This might not be desirable if you want to be able to switch between runlevels from grub.

Ziir
Nov 20, 2004

by Ozmaugh


Zom Aur posted:

This isn't the recommended way.

In /etc/inittab, find the line that says:
code:
#x:5:respawn:/usr/sbin/gdm -nodaemon
and uncomment it.

Comment the line that says:
code:
x:5:respawn:/usr/bin/xdm -nodaemon
If you enable gdm through rc.conf, it'll always load. This might not be desirable if you want to be able to switch between runlevels from grub.

Thanks, that did the job.

BlackMK4
Aug 23, 2006

wat.

Megamarm

Bob Morales posted:

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

Unless the latest one has something new with the whole startup deal.

Thanks I'll give it a shot this weekend.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



BlackMK4 posted:

Thanks I'll give it a shot this weekend.

Did you find a Wyse terminal in the trash or are you just going to hook up another computer via null modem cable?

rt4
Feb 19, 2008


Grimey Drawer

He's opening a 1991 public library themed bar.

BlackMK4
Aug 23, 2006

wat.

Megamarm

Bob Morales posted:

Did you find a Wyse terminal in the trash or are you just going to hook up another computer via null modem cable?

USB to serial for managing my two headless machines just in case. Already use it for my alix on those rare occasions.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!



rt4 posted:

He's opening a 1991 public library themed bar.



That would rule.

Adbot
ADBOT LOVES YOU

Prince John
Jun 19, 2006

Oh, poppycock! Female bandits?



Does anyone have personal experience of a USB network adapter that

(i) has decent Linux drivers
(ii) supports 802.11n speeds
(iii) will connect to a wifi signal in the 5GHz band?

I've spent some time in google, the Ubuntu hardware compatibility pages and reading through various launchpad bug trails about support for the ralink chipset variations being a bit spotty and could do with a poke in the right direction - I couldn't see anything that leapt out as working perfectly.

It would be ideal if it worked out of the box with kernel drivers, but I'll mess around with ndiswrapper etc if required.

Thanks in advance!

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