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
Ziir
Nov 20, 2004

by Ozmaugh
I want to try out Ubuntu but I'm confused. What's the difference between ubuntu and kubuntu? From google I see that it's a matter of Gnome vs KDE. Well that's great if I knew what Gnome or KDE were but I don't (other than that they are two different desktops).

I'm a lifelong windows user.

Edit: I forgot to say, I installed ubuntu on my laptop a few months ago and haven't really played around with it. I just remembered about it today and drat does it take a long time to boot. It takes a lifetime to boot compared to my vista installation it seems. Is there anyone to speed this up?

Adbot
ADBOT LOVES YOU

Ziir
Nov 20, 2004

by Ozmaugh

Megaman posted:

Ubuntu has Gnome, Kubuntu has KDE, and Xubuntu has xfce

These are all window managers, which are similar to EXPLORER.exe in windows. Explorer.exe can be replaced by other "shells" such as bblean or blackbox to give windows a different look and feel but the underlying kernel is still running under it. This is the same thing with linux, the kernel is still there, gnome, kde, xfce, and many others are there to change things up depending on whether you like light weightiness. Don't forget, though, that there are some applications that are defendant on gnome or kde, so if you have xfce or fluxbox/etc. you may not be able to run them but for most programs you won't have this issue or there will be ports or alternatives for these defendant programs.

Ah, that makes sense then.

So how do I speed up Ubuntu? I mean, reading through the netbook megathread, I'm led to believe that linux is suppose to boot extremely fast and just be generally more responsive than XP/Vista. But on this laptop, Ubuntu takes at least twice, if not three times, as long to start up as Vista does.

Ziir
Nov 20, 2004

by Ozmaugh
I have a directory on my Linux box, say /home/user/test/, and I want to copy that folder to my Windows desktop, how do I do that? On my Windows box, I have putty and I'm able to SSH into the Linux box just fine, but I can't figure out how to copy it over for the life of me.

I've tried scp user@ip.address:/home/user/test/* C:\Users\User\Desktop, but it gives me some kind of error about not being able to find the C:\ directory or something.

Ziir fucked around with this message at 06:20 on Nov 22, 2009

Ziir
Nov 20, 2004

by Ozmaugh
I was given a laptop with Ubuntu installed on it I would like to just set it aside in my room and leave it permanently on to use as a server or something that my MBP can connect to. I understand I need to install OpenSSH and I did that, but I'm completely lost now because I can't find a "dummy's" guide to this. The Ubuntu wiki page for setting up an OpenSSH server (https://help.ubuntu.com/8.04/serverguide/C/openssh-server.html) is pretty much useless I think.

Can anyone tell me where I can find a guide to basically walk me through the process or just post here telling me what to do and how I can secure it so that only my MBP can connect to it?

OpenSSH is installed and running right now and when I try to connect to it from my MBP by typing ssh useraccount@ipaddress it tells me my connection is refused.

The end result is I'd like to install a VNC server as well that I can turn on via SSH and essentially have access to a Linux box full time.

Ziir
Nov 20, 2004

by Ozmaugh
I installed openssh-server.

Ziir
Nov 20, 2004

by Ozmaugh

Accipiter posted:

This was a pretty important part of Moose's post:

code:
rudolf@Clausius:~$ sudo netstat -netlp | grep 22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          14593       1988/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      0          14595       1988/sshd       
I've turned on public key encryption and generated a key for the server machine and now I'm able to do ssh localhost from the server and everything seems to work fine. On my client machine I've also generated a key and then I moved the public key (ziir.pub) to the server and added it to authorized_keys and restarted OpenSSH (dunno if this was necessary) but connection is refused. Any ideas?

code:
Navier-Stokes:~ ziir$ ssh 10.0.1.4
Permission denied (publickey).

Navier-Stokes:~ ziir$ ssh rudolf@10.0.1.4
Permission denied (publickey).
I'm trying to connect from within my network for now and I'll deal with connecting from outside when I get everything working nicely.

Ziir
Nov 20, 2004

by Ozmaugh

enotnert posted:

It's fuckign early, and I'm up doing unrelated bullshit, but if you can't hit it within your network, I'd check your iptables/firewall to make sure it's not boning it somewhere.

code:
rudolf@Clausius:~/.ssh$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
Port 22 is open. Is there anything else I should look for?

Accipiter posted:

Permission Denied is NOT the same thing as Connection Refused. :sigh:

Your key config isn't working. SSH is responding on the network just fine.

I just deleted the authorized_keys file and remade it and I can connect to localhost from the server. Generated a new key on my client computer and copied it over and added it to the file and it's still being denied.

Ziir
Nov 20, 2004

by Ozmaugh
I saw someone SSH into a server typing something like "ssh user@servernickname" instead of putting in a domain or IP address. I'm assuming he edited some kind of file on his computer that associated that nickname with the server. How do I do that too?

Ziir
Nov 20, 2004

by Ozmaugh
Is it possible to share USB over a network? I have Computer A sitting on a shelf and Computer B on my desk. I want to plug say an iPod (for example) into Computer A and I want Computer B to recognize that something was plugged into "it" seamlessly.

Ziir
Nov 20, 2004

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

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?

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 23:52 on May 5, 2011

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.

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.

Ziir
Nov 20, 2004

by Ozmaugh
I've been playing around with Arch right now just poking around and now I'm wondering what's next? On my list is to figure out how to configure my wireless internet and maybe look into using official Nvidia video drivers rather than the open source one. What are some other things I can do to learn more about Linux and the operating system?

Also, I installed Gnome since that's what Ubuntu used and now I'm wondering, is it possible for me to not have something huge like Gnome installed but still have "windows" when I need them? I use Vim for programming and gnuplot to plot things, both I can do from a terminal, but when gnuplot spits out the eps file can I just type 'open plotname.eps' or something and somehow see the picture? Or when I want to browse the web or something.

Ziir
Nov 20, 2004

by Ozmaugh

Bob Morales posted:

You can use XFCE but it's not that much more light-weight. A lot of apps are going to need GTK anyway. Try Fluxbox if you want to give that a shot.



I'll check it out since it can't hurt. I'm planning on reinstalling Arch anyway once I get over this whole "experiment with everything" phase for a cleaner system. I don't really know what GTK is nor the difference between something like Gnome or Compiz so it's a learning experience all around! The worst that can happen is I somehow break everything which would take all of 10 minutes to flaten and reinstall.

e: One thing I really don't like about gnome is having to mouse over to the top left to see my installed programs. Why can't I add them to the top bar or something?

Ziir fucked around with this message at 15:15 on May 8, 2011

Ziir
Nov 20, 2004

by Ozmaugh
I've tried to like Gnome 3 but I can't because it randomly freezes all the time, especially when I mouse over to the top left or whatever and bring up the icons. My cursor/trackpad still works, but everything else is unresponsive and the only thing I can think to do is hard reboot it.

Welp, time to try something new.

Ziir
Nov 20, 2004

by Ozmaugh
Cross posting from OS X thread cause I think I'll get more responses here and it should be the same.

I want to make a crontab (is that the right way of saying it?) to run an rsync script every night. Problem is is that I'm doing this on a laptop so it's not always plugged into my external HDD. How do I make a script that goes something like:

code:
if external drive "Backup" is mounted at 10 pm (daily) then
    run rsync
    dismount Backup when finished
else
    do nothing
end if
I'd rather learn how to do this myself rather than copy pasting from a website, so if someone could point me in the right direction that'd be great :)

Ziir
Nov 20, 2004

by Ozmaugh
I have no idea what I did but I must have accidentally done something cause now when I use VIM my backspace key is in "insert mode" like in a text editor. You know, instead of deleting backwards it deletes whatever is at the pointer. How do I turn this off.

Ziir
Nov 20, 2004

by Ozmaugh
No, that didn't help. I swear I had it working like regular backspace even just one hour ago.

Ziir
Nov 20, 2004

by Ozmaugh

Modern Pragmatist posted:

You aren't accessing vi differently are you (i.e. ssh, xterm)?

I'm accessing it the same way I've always did, via ssh.

Underflow posted:

Try 'export TERM=gnome' without the quotes.

This makes it even worse. Now backspace adds some ? characters.

Ziir
Nov 20, 2004

by Ozmaugh

Underflow posted:

See if 'export TERM=linux' or 'export TERM=vt100' returns you to the normal behaviour. If not, it's almost certainly something in your user config file like BlackMK4 says. Unless your /etc/profile has somehow been altered, which is unlikely.

Deleted my .vimrc file and tried those two settings but nope, none of it works. :wtc: maybe I really didn't have backspace functionality :psyduck:.

Ziir
Nov 20, 2004

by Ozmaugh
I want to set up a permanently on/connected IRC client on my server and then somehow access it from other PCs by SSHing into it (irc client could exist purely in the terminal or be x11 based, doesn't matter) and starting the client. The idea is I want a single persistent connection so that I could move from PC to PC to my iPhone's SSH app and everything is still logged nice and neat in one place and nobody knows the difference).

Is this possible and how?

Ziir
Nov 20, 2004

by Ozmaugh

Bob Morales posted:

irssi + screen

ssh into your server, start a screen session. Run irssi, chat you heart out. Then when you're done, just disconnect the session, it will stay running in a virtual terminal. Then just ssh back into your server and re-attach to your screen session from home/work/starbucks.

http://lizzie.spod.cx/screenirssi.shtml

That's just what I'm looking for. Thanks!

Ziir
Nov 20, 2004

by Ozmaugh
Speaking of pub/privkey auth, should I be using rsa or dsa, and how many bits should I specify?

e: Also, if I'm SSH'd into a system and want to open a new tab, is there a way to do this without having to login again? That's what I'm doing right now so sometimes I'll have 5+ SSH connections to a single system, but I'm sure there must be a bette way to do this?

Ziir fucked around with this message at 23:03 on Jun 30, 2011

Ziir
Nov 20, 2004

by Ozmaugh

SynVisions posted:

Why not just use key based authentication?

I use public keys and ssh-agent to handle my private key file so I don't need to enter in my password when logging in anyway.

I don't see how having all of your sessions dependent upon a single parent session is an upside. So you have less sockets open to the server... who cares?

Not trying to be a dick about it, just curious if there's something I'm missing here.

I do use key based authentication. I just wasn't sure if relying on one connection was good or bad, but now that I think about it it doesn't seem to be that good of an idea.

Ziir
Nov 20, 2004

by Ozmaugh
How do I unrar a .rar file with a password from the command line if I know the password?

Ziir
Nov 20, 2004

by Ozmaugh

nitrogen posted:

it SHOULD ask you for the password:
code:
$ unrar x whatever.rar

Enter password (will not be echoed) for whatever.rar: 

Can I apply the same password to more than one file so I can just forget about it and come back later?

Ziir
Nov 20, 2004

by Ozmaugh
I just started using cmus which has been awesome. Right now cmus just plays music through the laptop speakers that I have Arch installed on, but it would be nice if I could stream it over SSH or something. Is there another music player or something I could use to do this?

Also, what's the best way to manage music metadata on Linux/Arch? It'd have to be CLI only.

covener posted:

have you tried passing the password on the command line as described in 'man unrar'?

No, I couldn't figure out how to pass the same password through to the next rar file. Doesn't really matter anymore though cause I didn't have too many rar files anyway.

Ziir
Nov 20, 2004

by Ozmaugh
Sometimes I SSH into my server to start up things like downloads, from my smart phone. Problem is that once my phone's shell app terminates or gets backgrounded I seem to get disconnected from my server and it ends up quitting whatever scripts/programs I was running. How do I make it so that if there's something being actively done then it won't end my session?

Before I installed Arch I overwrote my entire hard drives with random noise which took days, and then set up LVM and encrypted everything. The guide I followed told me to write over everything with random noise so that that way nobody would tell where my data began and end. If I wanted to nuke everything and reinstall, do I just need to delete my LVM partitions or do I need to do the whole dd thing again on my entire hard drive? I'm a bit too impatient to do it again :/.

Ziir
Nov 20, 2004

by Ozmaugh
How do I scroll up/down in irssi if I don't have pg up/down on my keyboard?

Ziir
Nov 20, 2004

by Ozmaugh
Thanks guys, one of those suggestions work though I'm not sure which one off the top of me head, but it did!

Now I'm trying to standardize my work environment over all the computers I use and it's something I really should have done a while ago. My two home computers and personal server are using bash, my work desktop is tcsh, the supercomputer we access is zsh… And I have different vimrc files for all of them cause I never bothered to make one master copy and distribute it, and just added things as I needed.

I know a lot of people recommend using anything but bash, but well I'm not really a power user and haven't had a need to switch (the other computers using tcsh and zsh are just the defaults), so I'll just switch everything over to bash until I find a reason to ditch it.

So I think the best thing to do is make a directory in my /code folder called /dotfiles and build a new bashrc file there that I intend to test and distribute to all my computers (through git). Then I have a shell script like so:

code:
#!/bin/bash

# 'Install' bashrc
cp bashrc $HOME/.bashrc && source $HOME/.bashrc
Problem is, running this script doesn't work the way it's suppose to. The new bashrc file gets put into my home folder just fine, but it doesn't get sourced so changes don't take effect. Right now I'm in my home folder and I just edited the actual .bashrc file to change the way my 'ls' command works, and then source it and it just doesn't want to source the new file.

Ziir
Nov 20, 2004

by Ozmaugh

spankmeister posted:

Well, this doesn't work because if you run this script normally, it will run inside a child shell, and it will only get sourced inside that child shell.

If you want to make this work, you will have to source your copy script too.

So instead of running it by './script.sh' I'd do '. script.sh' instead?

Ziir
Nov 20, 2004

by Ozmaugh
OK, that seems to work. When I do a ls (with -gho) I get

code:
user@host folder$ ls
total 24K
-rw-r--r-- 1 1.4K Sep  5 19:39 bashrc
Is there a way to remove that first line? I don't really care about the size of the folder. Also what is that '1' right in-between my permissions and file size?

Ziir
Nov 20, 2004

by Ozmaugh
No | grep -v ^total doesn't seem to work if I want to ls -l a directory inside of a directory, but oh well, it's not that big of a deal.

Ziir
Nov 20, 2004

by Ozmaugh

spankmeister posted:

How so? All it does is strip lines that start with the word total.

I have no idea.

code:
user@host ~$ ls aur
ifort  intel-compilers-common  par2cmdline  python-yenc  sabnzbd
user@host ~$ alias ll='ls --color=auto -gho | grep -v ^total'
user@host ~$ ll aur
user@host ~$ 
Without the grep statement it returns everything just fine.

Ziir
Nov 20, 2004

by Ozmaugh

spankmeister posted:

You can't use an alias for that since it will always put the arguments at the end of the command.

You'll have to define a function to make this work.

ll() { \ls --color=auto -gho $@ | \grep -v ^total ;}

$@ takes all arguments on the command line.

I put slashes before ls and grep to make sure it uses the actual commands since on most modern systems ls and grep is aliased. (To --color=auto, so it defeats the purpose in this case but whatever.)

Also unalias ll, because ll is also usually aliased to something.

What is ll usually aliased to? And I just added that as a function to test out and with the grep piped in there it seems that --color=auto is disregarded.

Ziir
Nov 20, 2004

by Ozmaugh

ToxicFrog posted:

No, that's --colour=auto working properly:


Emphasis mine. If you're piping it through grep, stdout is not connected to a terminal, it's connected to grep, so it disables colorization.

You probably want --color=always, and to read the man page.

No, that's not working either.

code:
user@host ~$ \ls --color=always -gho | \grep -v ^total
total 32K
drwxr-s--- 2 4.0K Sep  7 13:09 bin
drwxr-s--- 7 4.0K Sep  7 11:06 code
drwxr-s--- 3 4.0K Sep  7 13:15 inc
drwxr-s--- 2 4.0K Aug 15 18:23 include
drwxr-s--- 3 4.0K Sep  5 20:53 lib
drwxr-s--- 3 4.0K Aug 15 16:14 old
drwxr-s--- 9 4.0K Aug 29 16:12 sim
drwxr-s--- 2 4.0K Jul 29 14:22 src

user@host ~$
Now the total isn't removed, and there's an added blank line. It's really not that big of a deal to have the total size at the top I guess.

I seem to have another problem now. My server today randomly just decided to stop allowing ssh connections from outside my network and I can't understand why. My router was not rebooted or updated and I didn't make any changes to my server, and my server was not rebooted either. I noticed it today at work when I tried to ssh into it but the connection kept timing out.

Now I'm at home and I found that I can ssh into it from my laptop right now cause they're on the same server, and I can even ssh to localhost. But right now I'm ssh'ed into my work computer and get connection timed out when I try to ssh into the server.

Seems strange to just stop. Any ideas? The only thing I can think of was that I did just do a system update (it's running Arch) a few days ago but that shouldn't do anything?

Ziir
Nov 20, 2004

by Ozmaugh

spankmeister posted:

What does iptables -L say? Also check your sshd log, which could be in any number of files under /var/log depending on how your distro sets up ssh.

iptables wasn't installed so I just installed it.

quote:

user@host log$ iptables -L
FATAL: Could not load /lib/modules/2.6.39-ARCH/modules.dep: No such file or directory
iptables v1.4.12: can't initialize iptables table `filter': Table does not exist
(do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Neither iptables nor the kernel need to be upgraded.

I just gepped for sshd in /var/log but I'm not sure what to look for.

I do see some things like

auth.log:Sep 7 10:33:21 localhost sshd[21435]: reverse mapping checking getaddrinfo for x.x.x.x [x.x.x.x] failed - POSSIBLE BREAK-IN ATTEMPT!

… should I be worried?

Adbot
ADBOT LOVES YOU

Ziir
Nov 20, 2004

by Ozmaugh

spankmeister posted:

Yeah go ahead and uninstall it. iptables is the linux firewall (although it can do much more) and you need to load the kernel module to use it. But since you're not using it just forget about it for now.

That's because the reverse DNS for that ip address resolves to something else. It could explain you not being able to connect. I would not be worried outright unless those ip's are unknown to you,

I'm still having trouble with this. My apartment complex gets their internet from the university, and if I do a traceroute it looks like it times out when it hits the nodes (not sure if that's the right terminology) that services my complex. Does this mean that they're blocking something on their end? I don't even use port 22 for ssh so how could they know.

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