LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   A couple Q's regarding general use (https://www.linuxquestions.org/questions/slackware-14/a-couple-qs-regarding-general-use-304583/)

davatar 03-22-2005 01:26 AM

A couple Q's regarding general use
 
I've been using Slackware for about a month now. I've finally managed to upgrade everything successfully, via slapt-get, configure everything, and upgrade to kernel 2.6.11.3. It's taken me 3 weeks to do that all successfully with no process-halting errors. *chuckle*

Anyway, 2 questions: I've noticed that my swap partition is hardly ever used, and the RAM is often close to maxed. My system performs relatively slowly. I am running a 1Ghz Duron with 512MB (PC133). WinXP Pro ran a little smoother than Slackware does (with KDE 3.3). The swap is activated, and is used when the RAM is maxed out. Is this normal operation? Any hints to give this noob which might provide a sleeker running system?

2nd, often when I attempt to install or execute programs as the root user (via su root in a konsole), I will receive the error:

Xlib: connection to ":0.0" refused by server
Xlib: no protocol specified

This does not happen if I install or execute while actually logged in as root (in terminal or X). I've done some googling and found nothing specific to my situation, although lots of references to receiving this error while trying to SSH in from somewhere. Also found a good deal of references to the $DISPLAY variable or other environment variables? I really have no idea what I'm doing yet, so I haven't messed around with environment variables other than http_proxy. =)

Sorry for the mini-book... I can never manage to be concise, though I hope (and think) I usually manage to be clear enough. (But again, linux is a new frontier for me)
I'm really enjoying linux, and am glad I chose Slackware even though I've had no prior linux experience. It's forced me to learn a lot relatively quickly.

Harlin 03-22-2005 02:28 AM

Hi davatar,

1. Linux will load as many modules as possible into physical memory ... this may give the appearance that your memory is topped out (there is a very big difference in Top and Windows' taskmgr when it's giving memory usage stats). Not to worry though, hardly any other OS is better at dealing with memory than Linux, it knows what it's doing ;-)

2. You may want to look at this post on expert-exchange: http://www.experts-exchange.com/Oper..._20762091.html

Let me know if that's not what you meant in #2.

Thanks,

Harlin Seritt

samac 03-22-2005 02:35 AM

Quote:

2nd, often when I attempt to install or execute programs as the root user (via su root in a konsole), I will receive the error:

Xlib: connection to ":0.0" refused by server
Xlib: no protocol specified

I know what you mean, this drove me crazy when I moved from Mandrake to Slackware. I presume it is a security feature to stop people running programs as root. Rather than fix a more secure system I decided on a workaround. I use ALT-F2 and when the dialogue box appears I run:

kdesu "/your path here/your command here"

Root password is requested and the program runs in X

samac

alienDog 03-22-2005 02:51 PM

Try to execute "xhost +yourhostname" from the commandline (without quotation marks naturally and replace yourhostname with your real hostname, probably localhost will do) before running su. This should fix your X connection problem. You can also add this command to your X startup scripts (~/.xinitrc or such). By default Slackware only allows the user that started the X server to use it.

cavalier 03-22-2005 03:03 PM

Quote:

Originally posted by alienDog
Try to execute "xhost +yourhostname" from the commandline (without quotation marks naturally and replace yourhostname with your real hostname, probably localhost will do) before running su. This should fix your X connection problem. You can also add this command to your X startup scripts (~/.xinitrc or such). By default Slackware only allows the user that started the X server to use it.
This is the quick-and-dirty solution to the problem. An explanation, however, is that when you su to root, it's still you, the non-privileged user, running the X session, so root doesn't have rights to do something that would display on your terminal unless you give those rights explicitly, using the xhost command.
Some would suggest that you just use "xhost +", but doing so would let anyone on your subnet that knew your IP address run programs on their own machine, and have the results display on your terminal. Fun way to prank somebody, but a little security sloppy. :)

alienDog 03-22-2005 03:09 PM

Really? I thought it would only allow users logged on host "yourhostname" to use the X server?

-- Edit --

Ah, my bad. You were talking about "xhost +" which disables access control alltogether, that's hardly recommendable, so use "xhost +yourhostname" instead.

davatar 03-23-2005 01:59 AM

Ahh! Thank you much. "xhost +localhost" works wonderfully.

And I'll take your word on the RAM thing, I was expecting linux to do a better job, but things do seem to be a bit slower. Fore example, loading mozilla firefox or larger programs like Open Office and Thunderbird. However, I can't be too picky, it is afterall only a 1GHz duron with 512 PC133... heh heh. (And everything else is quite speedy.)

You know one major thing I love about linux already? I tell it to do something and it does it. I don't know how many times I swore at WinXP because I'd tell it to, say, end a process in task manager and it would wait 20 seconds trying to "safely" terminate. I'm already liking this unrestricted thing too... I never realized how limited I truly was on Windows until I had to dig into config files on linux, and in the process learned all sorts of sweet things you can do.

Random curious information: I'm a CNET student at Bellingham Technical College in Washington state, and my instructor told us that Microsoft is actually considering allowing the option to turn the GUI off in an upcoming revision of Windows 2003 Server. Could it be!? *chuckle* Strange how some rumored features of new versions of Windows make it more like.... linux.

wpyh 03-23-2005 06:25 AM

Quote:

Originally posted by davatar
You know one major thing I love about linux already? I tell it to do something and it does it. I don't know how many times I swore at WinXP because I'd tell it to, say, end a process in task manager and it would wait 20 seconds trying to "safely" terminate. I'm already liking this unrestricted thing too... I never realized how limited I truly was on Windows until I had to dig into config files on linux, and in the process learned all sorts of sweet things you can do.
Reminds me of the reason I chose Slackware... (above all other distros, mostly rpm-based ones)

keefaz 03-23-2005 06:44 AM

Maybe you should run a lighter wm than KDE if you want faster X session

cavalier 03-23-2005 11:03 AM

Quote:

Originally posted by keefaz
Maybe you should run a lighter wm than KDE if you want faster X session
You beat me to it, keefaz...

If you want things to speed up, ditch KDE and/or GNOME. I've toyed recently with xfce, and find it to be extremely peppy.

One of the reasons that OO.o runs so much faster under Windows is that it loads a great deal of the underlying structure in the background, much like Microsoft Office does, so that things appear to load much more quickly, when in fact they're already loaded, using up valuable memory.

davatar 03-23-2005 12:22 PM

Quote:

Originally posted by keefaz
Maybe you should run a lighter wm than KDE if you want faster X session
Yeah, I've looked at a few of the others but find them rather difficult to use. I like KDE a lot, and will just deal with it. I think the biggest reason it seems slow is because I've been spoiled by my new machine: AMD64 2800+, 1GB PC3200, Geforce 6800 (128MB version), 80GB SATA drive. Built it a couple months ago. (Having trouble getting Slack to run on it, but I'm real close. 1st Partition still has XP Pro for now.)

~Dav


All times are GMT -5. The time now is 01:51 PM.