Linux General Questions

This, combined with the GUI itself, led me to feel overwhelmed at all the ways I could and should manage my system.

Really, about the only management required is to regularly install the constant blizzard of updates from Canonical. They ship every six months, no matter what the state of the software is, and then spend a year or two cleaning it up. I'm not at all fond of that development model... but it doesn't take much participation by you, other than clicking to install updates a couple of times a week.

Malor:
>
> > muraii: This, combined with the GUI itself, led me to feel overwhelmed at all the ways
> > I could and should manage my system.
>
> Really, about the only management required is to regularly install the constant blizzard
> of updates from Canonical. They ship every six months, no matter what the state of the
> software is, and then spend a year or two cleaning it up. I'm not at all fond of that
> development model... but it doesn't take much participation by you, other than clicking
> to install updates a couple of times a week.

This certainly covers system updates, but not its settings. Say what you will about xorg.conf, but I greatly preferred that single text file, cryptic or not, to clicking around a GUI to figure out video settings. Similarly, I don't need to grok someone's idea of a pleasant UI to decide what items should start, and in what order, when I start X. Rather, I specify them in ~/.config/openbox/autostart.sh. In words.

It's not a magic balm, and you can't Google "linux " without hitting some incarnation of "Well, just awk/sed/pipe these commands in this arcane order in 13 places, as root" kind of solutions that a GUI might help. Personally, the tradeoff is in my favor: I specify something in an ASCII file, and it's set.

I still tinker with other OSes infrequently. I goofed around with Linux Mint, for instance. Maybe when, per the gaming computer thread, I have a beefier machine I'll try something with a heavier graphical presence. But, for me, xterm + vim is the best system-management tool I have.

muraii wrote:

Great thread. I started with Ubuntu v5.04 Breezy Badger (I believe) many years ago, and stuck with it for about six months. It became clear that the GUI allowed me to be lazy, and laziness bred a lack of rigor, of taking care of the system properly. This, combined with the GUI itself, led me to feel overwhelmed at all the ways I could and should manage my system.

So I gave up, at least gave up on Ubuntu. I tried Slackware v10.2. Today I use Slackware v13.37, and could not be happier with it. I've tried KDE, XFCE, and LXDE, and always come back to Openbox as a window manager and a light panel app (in this case, the LXDE panel + tint2). I manage everything from the command line, and while I'm no hacker I'm proficient enough to figure out what I need to. Curiously, I find I split my time between virtual terminals and Chrome, with little in-between.

I also dual-boot XP, with the fantasy that I'll play some games my Lenovo R61i can handle, e.g., Fallout, Baldur's Gate, Tone Rebellion, etc. I have played almost 2 hours--all-in--of Fallout in the years I've had this machine. This, though, is another thread.

I recommend anyone to try a DE-less system using only a window manager, especially if your specifications are light.

Earlier this year, I bet my boss I could go 2 weeks without a GUI on my work laptop, while managing all of the servers, and keeping everything running properly. I used Arch Linux, since I'm very comfortable with it, and basically built my work laptop for very specific tasks.

Because the company has an internal Jabber/XMPP server, I used Finch for a Terminal based IM client after trying CenterIM. I liked Finch a little better. Web browsing, since we use Trac and Nagios, was done with Lynx. Irssi for IRC, since I regularly hang out in #python (amongst other rooms. It's all work related, I swear! *whistles innocently*). For Email, I used Sup, since I like the way it handles mail. Mutt drives me a little nuts, though I need to learn it, just in case. fbpdf was my go to for reading PDF's. The only thing I had small issues with were Microsoft Office files. I still won (since no one needed any word, excel or visio documents ), though that would have been a serious hurdle to try and overcome. vim, ssh and midnight commander were my 3 most used programs (looking at the stats of what opened, for how long etc.)

All in all, is was a blast to do for 2 weeks. Afterwards, I went to Openbox + tint2 (with conky on the side and chromium, as well as urxvt for a lightweight, extensible terminal) and it works for me, considering I started with Slackware 3.0 (god I feel old.)

Personally, the tradeoff is in my favor: I specify something in an ASCII file, and it's set.

Yeah, I'm kinda similar, actually. I usually just use Ubuntu as a desktop in a VM, and I just do a few basic changes to it, and then leave it alone. The spot where I really tinker is on the Debian server, and that doesn't even run a GUI.

One problem with all the GUI tools is that it's hard to figure out what they're doing, and then mixing your own edits with the output from a visual tool can be really, really problematic. Most tools are not smart enough to understand and import-hand-written configuration changes, even to the point of just isolating and passing them through verbatim. Admittedly, that's a hard problem, but the fundamental expectation seems to be that either you will use the GUI, OR you will use the command line, but not both.

I really like Debian, because it manages extremely well over a remote connection. I've been running it for years and years. It's not the shiniest and coolest distro, but it has a very nice habit of actually working, which I like.

Of course, that goddamn new Linux kernel is killing my Samba performance, so go figure.

In addition to being well thought-out, Debian is also well documented. The Policy is dominated by the package system (as is Debian, sort of), but there's a lot of useful information even if you're just going to use and administer Debian systems.

They seem to have made their apt documentation obsolete, though. Can anyone point me to the replacement?

I use aptitude for most things. It does things like removing packages that are no longer needed anymore, which I don't think APT did. I still sometimes have to use dpkg directly for some things (like marking a package 'hold' so it doesn't get upgraded), but on the whole it's quite nice, and does a better job of system maintenance than apt did.

It uses more or less the same syntax as apt-get, IIRC.

Oh, I haven't found an equivalent aptitude command for 'apt-get source', though.

Wow, I didn't realize you could use aptitude as an apt-get replacement. I should spend more time reading this nifty documentation I'm touting. Thanks.

There's a lot of neat stuff buried in Debian. One nifty feature, which I alluded to, is the ability to 'hold' packages -- that is, not to upgrade something you depend on. For instance, they updated Twisted a few months ago, and it broke Slimserver, so I've put the Twisted packages on hold until Logitech gets around to fixing it. Every time I run a dist-upgrade, I always see '3 packages not upgraded', because I've told the system not to.

The way to do this? Dpkg, specifically with the --set-selections options. dpkg --get-selections will give you a list of installed software, most with the status 'install'. You can also see 'deinstall', which means the binaries were removed, but the configuration files are still there. (to completely remove a package, you 'purge' it -- uninstalling it doesn't remove configuration, just in case.)

So this is what I did:

dpkg --get-selections | grep twisted python-twisted-bin install python-twisted-core install python-twisted-web install > dpkg --get-selections | grep twisted >twistedpackages

That dumped the text you see there into a text file called 'twistedpackages'. Then I edited twistedpackages and did a search and replace on 'install', changing it to 'hold'. So twistedpackages looked like this:

python-twisted-bin hold python-twisted-core hold python-twisted-web hold

Then I just had to issue one more command, to mark them in the system:

cat twistedpackages | dpkg --set-selections

You can also, obviously, do just one package at a time:

echo "python-twisted-bin hold" | dpkg --set-selections

but that's kind of tedious for multiple files. Extracting, editing, and catting back to --set-selections is faster past about two files. Plus, you have to type the package names exactly correctly, and that can be awkward with Linux kernels and others with excessively long names with multiple kinds of punctuation. "linux-image-2.6.39-2-amd64 hold" is kind of a pain in the ass to type perfectly.

Any advice for Oracle VirtualBox and Linux Mint guest OS? I get as far as the system boots into an EFI menu and I can't seem to get it to boot to the mint.iso I downloaded.. if I toggle EFI bios off under the VM settings the system will boot the .iso but complains of an "outdated bios or something"

Hmm. I just downloaded the Mint ISO and booted it. Did not have EFI BIOS turned on, and no complaint about "outdated BIOS".

I didn't have any issues installing mint, but OpenGL kept crashing the machine after I was using it.

No trouble running Mint under VirtualBox here on Win7. Were you trying the 32-bit or the 64-bit version?

Well, I tried playing more with Mint. What I have determined: I despise KDE 4. It just sprinkles bizarre, extraneous crap everywhere. Toolbar buttons to quit apps? I mean, that's just freaking nuts.

I really love Ubuntu 10.10. GNOME 2 is awesome. But everything else, man.... KDE 4, as mentioned, is awful. GNOME 3 has been brain-damaged to the point of near-uselessness, and was deliberately engineered to destroy GNOME 2 -- you cannot run it and 2 on the same machine at the same time, you MUST convert. And Unity? Don't get me started on Unity, Shuttleworth's ridiculous cheering notwithstanding.

What the hell happened to the free software world? All the desktop teams lost their minds at the same time, more or less.

I keep peeking my head in at Cinnamon, deciding that it's not there yet, and resume using Xfce.

trueheart78 wrote:

No trouble running Mint under VirtualBox here on Win7. Were you trying the 32-bit or the 64-bit version?

I was running 64-bit. I always run 64-bit, especially when I shouldn't:)

I'm actually getting along really well with Gnome3. I think the search and multiple desktops work well for how I use my graphical apps, and the rest of the time I run a full-screen terminal.

For a while I was trying to build a custom desktop with Openbox, but I felt like I was just reinventing the wheel.

Have I mentioned that Arch is awesome?

I just learned how to copy and paste between multiple documents using vsplit in vim.
Such awesomeness.

I wish I could su from inside vim. I always forget to edit as the right user instead of myself for certain files.

duckilama wrote:

I wish I could su from inside vim. I always forget to edit as the right user instead of myself for certain files.

:w !sudo tee %

Where does the username go for that, Legion? Does it interactively ask for password?

duckilama wrote:

Where does the username go for that, Legion? Does it interactively ask for password?

It will assume your login name (because you're not su-ing, you're sudoing), and yes it prompts for your password interactively.

Pretty clever, actually!

Yeah, I don't need sudo, I need su.

... why?

Because I'm not a sudoer for vim, these files are read only unless I su as the owner, and that's how the admin has it set.

And I really don't want general sudo vim rights.

I just always forget to su before editing these files.

I've never gotten around to testing it out, but there is this plugin: http://www.vim.org/scripts/script.ph...

Because I'm not a sudoer for vim, these files are read only unless I su as the owner, and that's how the admin has it set.

The admin should be happy to fix this for you, since with su, you're just typing in the root password. With sudo, you type in your OWN password. This is a better approach.

If you ask permission, with su power, you could just fix it yourself, by adding yourself to sudoers. The normal syntax for this is:

username ALL=(ALL:ALL) ALL

which you add to the end of /etc/sudoers.

Debian has recently changed their sudoers file to have this line:

%sudo ALL=(ALL:ALL) ALL

which means "anyone in the 'sudo' group can do anything". Then you can just add your user account to the sudo group, and you have permission to run it. If your system does this, leave sudoers alone, and add yourself to the sudo group with 'usermod -a -G sudo username'. Log out and back in again, to pick up the new secondary group, and sudo should work for you.

Other than passwords, the major differerence between su and sudo is that "su -" will run the login scripts for root, where sudo doesn't. The easy way around that is just to run "sudo su -'. Normal root shell, but you type in your own password. You don't need to know the root password anymore, which is usually better from a security standpoint.

No, I'm su-ing to another user. NOT root.
I don't want the root password, and the admin surely shouldn't offer it to me.

That way lies madness.

The previous admin tried to hand me a sticky note with it once, and I refused to take it. I'm dangerous enough as it is.

Edit to add: I'm happier not having root, especially as we have pretty serious guidelines and penalties for violations, as we are bound by HIPAA, and more. I want as little privilege as needed to do my job.

duckilama wrote:

No, I'm su-ing to another user. NOT root.
I don't want the root password, and the admin surely shouldn't offer it to me.

Sounds like what you really want is to have sudo access to a specific other user.
What you're describing (becoming a different user only for editing certain files) is a textbook sudo use case. In fact, it seems like a mistake on the admin's part to not have set you up this way.

Have your admin put something like the following into /etc/sudoers (I think I'm getting the syntax right):

duckilama ALL=(other_user_name) /usr/bin/vim

This would let you run:

sudo -u other_user_name vim whatever_file

... but not any other commands as other_user_name. (You can define more allowed commands after /usr/bin/vim with commas, or of course can just have ALL there instead if you don't want to limit what commands you can run as other_user_name).

Now you would have access to the vim command on the user you need it, and absolutely nothing else that you shouldn't have access to. Right now, it sounds like you could "su" to root and the only thing "stopping" you is your purposeful avoidance of knowing the root password.

Well, normally, not knowing the password is all that ever stops anyone from su-ing to root, Legion.

Malor wrote:

Well, normally, not knowing the password is all that ever stops anyone from su-ing to root, Legion. :)

/etc/suauth? Or /etc/pam.d/su?

It's certainly not the case that su can not be restricted. Traditionally it was limited to users in the "wheel" group, no?

Well, of course -- I mean, on most Unix distros these days, you've got the source code, so you can put any restriction you want in there. But I haven't seen su restricted in practice very often.

Debian doesn't even seem to have /etc/suauth.

Does anyone know where I can download the boot files for Ubuntu 11.10? I want to make a boot CD. The official website keeps redirecting me to 12.04, which I don't want. I'm googling various permutations of Ubuntu 11.10 download etc, but not finding it.