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
hackedaccount
Sep 28, 2009
Sounds good! I'm mostly RHEL, I noticed upstart in RHEL 6 and was able to avoid it, but now that 7's gonna have systemd I figured I was time to update my skills.

Adbot
ADBOT LOVES YOU

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

hackedaccount posted:

Sounds good! I'm mostly RHEL, I noticed upstart in RHEL 6 and was able to avoid it, but now that 7's gonna have systemd I figured I was time to update my skills.

This leads into my usual admonition: if you want to keep your skills up to date as RHEL admin, you should be using Fedora at home, and potentially as a workstation. There is no better way to see the direction RHEL is going in, the skills you should have, and the caveats you should know about.

Notorious b.s.d.
Jan 25, 2003

by Reene

hackedaccount posted:

Hey it looks like systemd has been confirmed for RHEL 7: https://access.redhat.com/site/solutions/417213

As an old grandpa UNIX who only knows Sys V style init should I focus on learning upstart or systemd? Do people think that upstart was kind of a flash-in-the-pan and systemd will be the future? Is my time better spent learning systemd or upstart?

Upstart is dead.

As for systemd: if we expect RHEL 7.0 to be half the disaster that RHEL 6.0 was, you might be waiting another couple years before seeing it in the wild... and by then systemd might not be mandatory.

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

Notorious b.s.d. posted:

As for systemd: if we expect RHEL 7.0 to be half the disaster that RHEL 6.0 was, you might be waiting another couple years before seeing it in the wild... and by then systemd might not be mandatory.

.0 releases are almost always a "disaster". .1 is fine. This means you'll be waiting ~6 months before likely adoption of RHEL7, as an average business using RHEL. And you'll probably be using 7.0 on a few non-production systems for VMs for testing your use cases.

Moreover, systemd is not going away. It's not mandatory (systemd can use SysV scripts without modification), but there's little indication that there'll be another init system replacing systemd anytime soon.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
For whatever reason I keep installing the old edition of Ubuntu 12.04 with the 3.2 kernel and I'd love to move up to 12.04.2 with 3.5 kernel. I've hit multiple issues already with 3.2 with my ethernet card not being recognized and my wifi dongle not working with USB 3.0 ports, so it'd be a good idea to upgrade.

Now, how do I do this without breaking everything? Is there a safe upgrade route? Anything I can do to rollback in case of massive fail?

Mortanis
Dec 28, 2005

It's your father's lightsaber. This is the weapon of a Jedi Knight.
College Slice
I need a way to do full screen Mono applications on 12.04. The application is a borderless C# application that goes full screen on loading. It works great, except that full screen doesn't actually mean full screen on Ubuntu it seems. The launcher and menu bar are always presentwith Unity. I've set the launcher to auto hide, and the app takes up that space just fine, but there seems to be no way to get rid of the menu bar or get the app on top of it.

Is there something I could do to get my Mono app to be truly full screen? Would switching to Gnome get me to my goal? Would I run into the same problem if this weren't a Mono C# app and if this were in, say, Python or Java?

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

DreadCthulhu posted:

For whatever reason I keep installing the old edition of Ubuntu 12.04 with the 3.2 kernel and I'd love to move up to 12.04.2 with 3.5 kernel. I've hit multiple issues already with 3.2 with my ethernet card not being recognized and my wifi dongle not working with USB 3.0 ports, so it'd be a good idea to upgrade.

Now, how do I do this without breaking everything? Is there a safe upgrade route? Anything I can do to rollback in case of massive fail?

There is zero danger in compiling your own kernel, which is probably the route I'd take. Does 3.5 come with 12.04.2? If not, grab 3.9 (or whatever) sources, zcat /process/config.gz >/usr/SRC/linux/.config to get whatever the Ubuntu defaults are. Some options have probably changed, but not many.

Mortanis posted:

I need a way to do full screen Mono applications on 12.04. The application is a borderless C# application that goes full screen on loading. It works great, except that full screen doesn't actually mean full screen on Ubuntu it seems. The launcher and menu bar are always presentwith Unity. I've set the launcher to auto hide, and the app takes up that space just fine, but there seems to be no way to get rid of the menu bar or get the app on top of it.

Is there something I could do to get my Mono app to be truly full screen? Would switching to Gnome get me to my goal? Would I run into the same problem if this weren't a Mono C# app and if this were in, say, Python or Java?
This may help

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

DreadCthulhu posted:

For whatever reason I keep installing the old edition of Ubuntu 12.04 with the 3.2 kernel and I'd love to move up to 12.04.2 with 3.5 kernel. I've hit multiple issues already with 3.2 with my ethernet card not being recognized and my wifi dongle not working with USB 3.0 ports, so it'd be a good idea to upgrade.

Now, how do I do this without breaking everything? Is there a safe upgrade route? Anything I can do to rollback in case of massive fail?

Install the linux-generic-lts-quantal package for 3.5, or linux-generic-lts-raring for 3.8.

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

Lysidas posted:

Install the linux-generic-lts-quantal package for 3.5, or linux-generic-lts-raring for 3.8.

It's amazing that Ubuntu does this. Why would you potentially break abi compatibility on LTS?

peepsalot
Apr 24, 2007

PEEP THIS...
BITCH!

Is there a way to preserve console text coloring when using "less" command?

e: I mean when piping to less, such as "ls -l | less"

peepsalot fucked around with this message at 23:49 on Jul 7, 2013

JHVH-1
Jun 28, 2002

peepsalot posted:

Is there a way to preserve console text coloring when using "less" command?

e: I mean when piping to less, such as "ls -l | less"

Looks like this is a 2 part problem because of the two sides of the pipe. First part is that ls doesn't pass color information through a pipe if its set to auto. Second would be to get less to process it.

So here you go:

ls -l --color=always | less -R

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

Lysidas posted:

Install the linux-generic-lts-quantal package for 3.5, or linux-generic-lts-raring for 3.8.

What does that mean for the existing packages on the system? Is it assumed that most will work without need for changes and some will get an upgrade if apt detects one?

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

DreadCthulhu posted:

What does that mean for the existing packages on the system? Is it assumed that most will work without need for changes and some will get an upgrade if apt detects one?

If one of your packages requires a kernel driver (Oracle RAC, Clearcase, VirtualBox whatever) or links directly against libraries which come with X.org (because they apparently update that as well) that's not part of the mainline kernel, it will probably break, which seems really intolerable for an LTS distro, but :ubuntu: This is why people use RHEL/CentOS/whatever in production -- kernel ABI for 10 years.

hifi
Jul 25, 2012

evol262 posted:

If one of your packages requires a kernel driver (Oracle RAC, Clearcase, VirtualBox whatever) or links directly against libraries which come with X.org (because they apparently update that as well) that's not part of the mainline kernel, it will probably break, which seems really intolerable for an LTS distro, but :ubuntu: This is why people use RHEL/CentOS/whatever in production -- kernel ABI for 10 years.

Packages of that sort within Ubuntu usually rely on DKMS to rebuild modules.

DreadCthulhu posted:

What does that mean for the existing packages on the system? Is it assumed that most will work without need for changes and some will get an upgrade if apt detects one?

If it's something from a third-party repo you might be out of luck.

Longinus00
Dec 29, 2005
Ur-Quan

hifi posted:

Packages of that sort within Ubuntu usually rely on DKMS to rebuild modules.

The point was that DKMS won't be able to rebuild those modules if the ABI changes, e.g. the version of virtualbox supplied by default in 12.04 won't build on 3.8. Of course those kernels are completely optional so I don't see what the issue is. If Canonical was forcing those kernels on every LTS system that would be another thing entirely.

emf
Aug 1, 2002



Stupid question, and sorry if it's been covered before:

My mac friends have made me jealous with their "open" command-line utility which will find the proper program to open whatever file you specify. For example: "open mypaper.pdf" would launch Adobe Acrobat and load the file "my.pdf", and "open myporn.avi" launches whatever plays porn on a mac, etc.

Does such a thing exist for Linux? Specifically I am using Mint-DE, so a package from them would be great, any old .deb would be fine, or source would be A-ok too.

OddObserver
Apr 3, 2009
Try xdg-open?

Marta Velasquez
Mar 9, 2013

Good thing I was feeling suicidal this morning...
Fallen Rib

emf posted:

Stupid question, and sorry if it's been covered before:

My mac friends have made me jealous with their "open" command-line utility which will find the proper program to open whatever file you specify. For example: "open mypaper.pdf" would launch Adobe Acrobat and load the file "my.pdf", and "open myporn.avi" launches whatever plays porn on a mac, etc.

Does such a thing exist for Linux? Specifically I am using Mint-DE, so a package from them would be great, any old .deb would be fine, or source would be A-ok too.

I use KDE on my Gentoo PC. If you have nepomuk running (might be called semantic desktop), you can hit Alt+F2 and type the name of your file into KRunner.

Because xdg-open/gnome-open/etc exist, I would think there's a GNOME equivalent of this, but I can't say for sure.

Or you can just use xdg-open from the command line.

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

Longinus00 posted:

The point was that DKMS won't be able to rebuild those modules if the ABI changes, e.g. the version of virtualbox supplied by default in 12.04 won't build on 3.8. Of course those kernels are completely optional so I don't see what the issue is. If Canonical was forcing those kernels on every LTS system that would be another thing entirely.

Not really as optional as presented:

Ubuntu Team posted:

In an effort to support a wider variety of hardware on an existing LTS release, the 12.04.2 and newer point releases will ship with an updated kernel and X stack by default. These newer hardware enablement stacks will be comprised of the newer kernel and X stacks from Quantal, Raring, and S (name TBD). These enablement stacks are only intended for use on x86 hardware at this time. Those running virtual or cloud images should not need these newer enablement stacks and are thus recommended to remain on the original Precise stack. To remain on the original Precise stack there are a few options:

Install from a previous 12.04.0 or 12.04.1 point release and update. The previous 12.04.0 and 12.04.1 releases are archived at http://old-releases.ubuntu.com/

Perform an update or upgrade to Precise from a previous release. Only those installing from the 12.04.2 or newer point release media will automatically receive a newer enablement stack by default.

Putting an ABI-breaking update into a minor point release is wholly unacceptable for businesses. I know we're not perfect about backporting hardware enablement either (though in general, support for new server-class hardware is available until the end of production 2), but what do you think Oracle or IBM would say if you sent them a 12.04.2 ISO that installs 3.5 by default for recertification?

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise
I'm having trouble getting menu colors in Gnome 2.x to be readable



No matter what settings are chosen, this is what the Gnome menu and some apps like Firefox turn into. A user is getting kind of mad about it so any idea why these menus would be different from all others?


Yes that's a photo of a screen. Prntscrn doesn't work when a menu is open.

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

Dead Inside Darwin posted:

I'm having trouble getting menu colors in Gnome 2.x to be readable



No matter what settings are chosen, this is what the Gnome menu and some apps like Firefox turn into. A user is getting kind of mad about it so any idea why these menus would be different from all others?


Yes that's a photo of a screen. Prntscrn doesn't work when a menu is open.

It looks like a problem with gtkrc. You may want to check ~user/.gtkrc* and /etc/gtk/gtkrc on his system against other users. GNOME/GTK issues aren't my strong point, though.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Dead Inside Darwin posted:

I'm having trouble getting menu colors in Gnome 2.x to be readable



No matter what settings are chosen, this is what the Gnome menu and some apps like Firefox turn into. A user is getting kind of mad about it so any idea why these menus would be different from all others?


Yes that's a photo of a screen. Prntscrn doesn't work when a menu is open.

In the appearance panel you should be able to check other themes, and make sure the user has no ~/.gtkrc or anything like that. Back it up if he intentionally modified it so he doesn't complain when all his colors are wrong, of course.

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise

Suspicious Dish posted:

In the appearance panel you should be able to check other themes, and make sure the user has no ~/.gtkrc or anything like that. Back it up if he intentionally modified it so he doesn't complain when all his colors are wrong, of course.

All .gtkrc files are basically empty

I've had him try to change things in the apperance panel and he claims it doesn't change anything. He's saying its specifically the "Red Hat" menu, Firefox, and xterm.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Does he use any weird focus settings? It could be an issue where the panel or Firefox is somehow getting applied the "unfocused" theme by accident. Try using Ctrl+Alt+Tab to go to the panel and see if it still happens.

xterm does not use GTK+, so I'm going to have to see a screenshot of that one.

peepsalot
Apr 24, 2007

PEEP THIS...
BITCH!

JHVH-1 posted:

Looks like this is a 2 part problem because of the two sides of the pipe. First part is that ls doesn't pass color information through a pipe if its set to auto. Second would be to get less to process it.

So here you go:

ls -l --color=always | less -R

Neat, thanks. By the way how does ls know if its being piped?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
isatty, a function in the standard library.

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online
Is there a way to tell postfix to not log or spit out the recipient in any logs it generates? Or at the very least have it obscure everything before the @, leaving the domain is fine.

An obscure IA requirement just slapped me around :(

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise

Suspicious Dish posted:

Does he use any weird focus settings? It could be an issue where the panel or Firefox is somehow getting applied the "unfocused" theme by accident. Try using Ctrl+Alt+Tab to go to the panel and see if it still happens.

xterm does not use GTK+, so I'm going to have to see a screenshot of that one.

There's no focus settings in play

There was a line in one of the gtkrc's pointing to a specific scheme's gtkrc, I commented it out and now Firefox and other GTK apps look fine, but terminal and the Gnome menu still look bad.

Aquila
Jan 24, 2003

evol262 posted:

Kernel crashdump/kdump.

Try booting with acpi=off

Thanks, but nothing made a difference, and nothing I tried helped me get anymore info. I tried pulling the gfx card just in case and it was still happening. I switched in an Intel DC S3500 ssd in case it was the Crucial M4 causing this. I kinda hope it was as I broke the Crucial removing it. So far no crashes.

e: New and different failure mode:

Jul 8 20:19:04 james-lenovo kernel: [14561.339303] ehci-pci 0000:00:1d.0: fatal error
Jul 8 20:19:04 james-lenovo kernel: [14561.339309] ehci-pci 0000:00:1d.0: HC died; cleaning up
Jul 8 20:19:04 james-lenovo kernel: [14561.339345] usb 2-1: USB disconnect, device number 2
Jul 8 20:19:04 james-lenovo kernel: [14561.339348] usb 2-1.3: USB disconnect, device number 3
Jul 8 20:19:04 james-lenovo kernel: [14561.346551] usb 2-1.4: USB disconnect, device number 4

I think this system is just cursed.

Aquila fucked around with this message at 04:21 on Jul 9, 2013

Varkk
Apr 17, 2004

I usually get that error when trying to use a failing/failed USB drive. Do you have any such devices connected to your PC? (Possibly even a printer with a built in card reader)

Junji Eat More
Oct 22, 2005

You don't know it, but you are full of stahs
I've got a question on checking file access times. I'd just like to see if an application is reading from files by if their atimes update, but the system I'm running on is mounted as a relatime system, and I can't change that. In my understanding, that means that the access time updates if the file is read AND one of the following:

  • Access time recorded is over 24 hours old
  • Access time < Change Time
  • Access time < Modified Time

I figured I'd just manually set the access times on files to the distant past, so I could check them post application-run and see what's been read. This works if I find some random file that's been sitting on the OS for a while and stat it to see the access time and then cat it:

code:
newdevel15-654: stat file.txt
  File: `file.txt'
  Size: 165462          Blocks: 336        IO Block: 65536  regular file
Device: 1dh/29d Inode: 26404024    Links: 1
Access: (0644/-rw-r--r--)  Uid: (10908/ userid)   Gid: (10908/ userid)
Access: 2013-06-19 10:45:38.337067000 -0400
Modify: 2013-06-11 09:01:58.339063000 -0400
Change: 2013-06-11 09:01:58.339063000 -0400

cat file.txt

newdevel15-656: stat file.txt
  File: `file.txt'
  Size: 165462          Blocks: 336        IO Block: 65536  regular file
Device: 1dh/29d Inode: 26404024    Links: 1
Access: (0644/-rw-r--r--)  Uid: (10908/ userid)   Gid: (10908/ userid)
Access: 2013-07-05 17:36:55.175305000 -0400
Modify: 2013-06-11 09:01:58.339063000 -0400
Change: 2013-06-11 09:01:58.339063000 -0400
However, if I manually change set the atime to the distance past via touch, it doesn't update when I read the file again:

code:
ewdevel15-665: touch -a -d "last month" file.txt
newdevel15-667: stat file.txt
  File: `file.txt'
  Size: 165462          Blocks: 336        IO Block: 65536  regular file
Device: 1dh/29d Inode: 26404024    Links: 1
Access: (0644/-rw-r--r--)  Uid: (10908/ userid)   Gid: (10908/ userid)
Access: 2013-06-05 17:40:16.968955889 -0400
Modify: 2013-06-11 09:01:58.339063000 -0400
Change: 2013-07-05 17:40:16.970602000 -0400

cat file.txt

newdevel15-677: stat file.txt
  File: `file.txt'
  Size: 165462          Blocks: 336        IO Block: 65536  regular file
Device: 1dh/29d Inode: 26404024    Links: 1
Access: (0644/-rw-r--r--)  Uid: (10908/ userid)   Gid: (10908/ userid)
Access: 2013-06-05 17:42:56.240850683 -0400
Modify: 2013-06-11 09:01:58.339063000 -0400
Change: 2013-07-05 17:42:56.242420000 -0400
I'm not sure what's going on here - am I missing something about access time updates on a relatime system? Is it checking some values other than what I'm seeing with stat? How does it know I've faked the data it's using?

Edit: I just realized that the stat actually changed between those last two by a few minutes, though it's still set a month in the past ... I'm guessing I'm really messing up the underlying data somehow. I can work with that, though - I just needed some way to check it's changing. Still curious if anyone has any thoughts on it.

Junji Eat More fucked around with this message at 07:05 on Jul 9, 2013

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

Necronomiconomist posted:

I've got a question on checking file access times. I'd just like to see if an application is reading from files by if their atimes update, but the system I'm running on is mounted as a relatime system, and I can't change that. In my understanding, that means that the access time updates if the file is read AND one of the following:

  • Access time recorded is over 24 hours old
  • Access time < Change Time
  • Access time < Modified Time

I figured I'd just manually set the access times on files to the distant past, so I could check them post application-run and see what's been read. This works if I find some random file that's been sitting on the OS for a while and stat it to see the access time and then cat it:

Info (distro, kernel, filesystem, mount options)? I tested this RHEL6.4, F19, and Gentoo. All of them exhibited expected behavior (atime updates to current date after setting to a month in the past and cating).

That aside, inotify is a much better solution for your problem.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Seth Vidal (skvidal on IRC), the creator of yum and a dear friend at Red Hat, was killed in a hit-and-run accident today. Rest in peace, good buddy.

El Generico
Feb 3, 2009

Birds revere you and consider you one of their own.

You are welcome in their holy places.
Any advice for someone installing Mint for the first time on his desktop during his once every other year "Let's check out how Linux on the desktop is coming along" spontaneous urge?

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

El Generico posted:

Any advice for someone installing Mint for the first time on his desktop during his once every other year "Let's check out how Linux on the desktop is coming along" spontaneous urge?

Virtualize it.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
How do I prevent linux from automatically mounting disks/partitions it detects filesystems on? For example, I need to partprobe /dev/vda to make the partition nodes show up in /dev/ but absolutely do not want to mount the fs detected on partition 4 in /media/vda4

I'm only running busybox in 3.9.5

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

Illusive gently caress Man posted:

How do I prevent linux from automatically mounting disks/partitions it detects filesystems on? For example, I need to partprobe /dev/vda to make the partition nodes show up in /dev/ but absolutely do not want to mount the fs detected on partition 4 in /media/vda4

I'm only running busybox in 3.9.5

Linux doesn't do this. Gnome does this. KDE does this. Some rescue disks do this. It won't get mounted by default. If this is happening, please provide more details so you can get an actual answer.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Linux doesn't do this. Gnome does this. KDE does this. Some rescue disks do this. It won't get mounted by default. If this is happening, please provide more details so you can get an actual answer.

It's literally just busybox running on an ELDK minimal ramdisk with like SSH and poo poo added. If there's something I've put on there that would cause this, I have no idea what it would be.

wolrah
May 8, 2006
what?
Quick and stupid one, I'm trying to grep a log file for "201" but getting all lines matching due to "2013" in timestamps. Any way to not match 2013 while still allowing any other occurrence of 201 in the same line to match?

Somehow I get the feeling there's a regex in this answer, and that's about where my brain goes on vacation.

Adbot
ADBOT LOVES YOU

covener
Jan 10, 2004

You know, for kids!

wolrah posted:

Quick and stupid one, I'm trying to grep a log file for "201" but getting all lines matching due to "2013" in timestamps. Any way to not match 2013 while still allowing any other occurrence of 201 in the same line to match?

Somehow I get the feeling there's a regex in this answer, and that's about where my brain goes on vacation.

Edit stupid answer out -- without knowing exactly what you want to still match this would screen out just the lines with the timstamp and no other 201:

code:
201([^3]|$)

covener fucked around with this message at 17:17 on Jul 10, 2013

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