Sunday, July 29, 2007

Redhat Vnc Config

This tutorial covers the essentials on how to get a vnc-server up and running from the shell. I'm not good at writing a lengthy tutorial, so I'll just get right down to it. For this tutorial I am assuming that you are using a RedHat , or RedHat Based distribution, like Fedora , RHEL, or any other derivitives. I released this tutorial on fedoraforums.org, everybody basically attacked it, pointing to a better one. Anyways, this is an entirely different setup then any of the other ones I have seen mentioned,as well as the end result is somewhat different. In anycase, something can be learned from either or.

Step 1: Installing the server

First of all we need to get the vnc-server package installed, before we can do anything. Log in as root and run the following commands

yum -y install vnc-server

chkconfig --level 5 vncserver on


Step 2: User Specific VNC Configuration

For this next step we are going to need a command-line text editor. If you do not have one, I would recommend you use joe. to get joe just use "yum -y install joe" from root.

now navigate to /home/ "HOME DIRECTORY HERE"/.vnc

for me it would be

cd /home/darkscript/.vnc

use joe to edit the xstartup file

joe xstartup





uncomment the following 2 lines by removing the # sign before them.

#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

if you dont uncomment those 2 lines, when the vncserver is configured, it will use the tvm window manager, instead of gnome, kde, blackbox, or whatever you use... and btw... TVM really SUCKS.
Step 3: System Wide VNC Settings

Next comes the cool part. Up till now, the server wont accept incoming connections because it isn't configured to accept them yet.. Here is the really cool part, you can configure the vncserver to work like this.

host:1 will connect to darkscript

host:2 will connect to root

host:3 will connect to cloudyone

you can keep on going with however many users you want to have on your system.

joe /etc/sysconfig/vncservers

Edit the file As follows. **NOTE: Anything prefixed with a # is a comment and is ignored by the system**


# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# .

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 1280x720 -nolisten tcp -nohttpd -localhost"

VNCSERVERS="1:darkscript"
VNCSERVERARGS[1]="-geometry 1024x768'







I hope editing that is self explainitory... but basically here is what really matters. Say I wanted host:0 to be root and host:1 to be darkscript ,you would set the variables as follows

VNCSERVERS="0:root 1:darkscript"

VNCSERVERARGS[0]="-geometry 1024x768"

VNCSERVERARGS[1]="-geometry 1024x768"

now save the file with ctrl +K + X



Step 4: Updating the Firewall

HORRAY! Were almost done... Now we simply have set our firewall to allow the ports 5900, 5901, and however many other hosts you have added, if you dont know "host:1" would map out to host:5901 , host 2 would map out to 5902, so keep that in mind when your setting up your firewall

So for this part, use lokkit

so once you open up lokkit, navigate over to customize, and add the ports down where it says "other ports"

the syntax is as follows

5900:tcp 5900:udp 5901:tcp 5901:udp 5902:tcp 5902:udp


Step 5: Automatic X11 Startup

Allright, Now for the final step, we need the machine to automatically start in runlevel five, so for this part just use joe again to edit /etc/grub.conf

Now edit that.just for an easy rule of thumb, everywhere it says quiet, add 5 at the end of it...for example... rhgb quiet 5. I'll be adding an example file in sooner or later...

Now Reboot your machine with shutdown -r now, and you are good to go.

Saturday, July 07, 2007

Backups

This is great for backups. I found this while reading the man file for mysqldump
that should really help


shell> mysqldump [options] db_name [tables]
shell> mysqldump [options] --databases db_name1 [db_name2 db_name3...]
shell> mysqldump [options] --all-databases

the -u and -p commands : user and password remain the same throughout almost all mysql operations.
So
mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

as for the restore

mysql -u [username] -p [password] [database_to_restore] < [backupfile]



Tar's Hidden Power

just as tar -xzvf file.tar.gz extracts all files to current direcotry
tar -xzvf file.tar.gz readme.txt will extract just the readme.

as well
tar -czf file.tar.gz directory/ will create a file from the directory. Not sure but perhaps using * or just typing in the files you want one by one might work fine too. Worth a shot.


Well I've learned alot more tonight... Just a few more tricks that I hope stay around.

Monday, June 11, 2007

new compile stuff

Besides using ./configure --prefix="/home/darkscript/virtual" to change the location to install too, if ./configure has already been run, and you don't want to re-run it, its just as easy to do it at the third and final step in the process of compiling and installing, simply use

make install DEST=/home/name/botdir


I decided i should post new things I learn here...so i can refer back to them later...


A couple of other misc Things that are useful are

lokkit
chkconfig

other things I need to learn are about SELinux, Ports viewing and blocking. and other stuff.

Friday, June 01, 2007

the last breath.

Well, My Good old friend, razgriz, is now on its deathbead...thats my laptop by the way. He got a name. I finally got it to turn on, and I am not sure when it will die again, but if you dont bump it too hard it seems to operate just fine... its great, working next to its younger brother finalrest, name given in memory or whatnot. I would like for this machine to keep working...i wouldn't give it away... i love it...its awesome.

Tuesday, May 15, 2007

Vista And Server

Wow, So, I feel that I am allready getting sort of tired of vista, I'll admit, it looks nice, or maybe i'm just looking at firefox.

It came on a new computer I bought, and I have been avidly researching all of the parts to my computer since, and how to do video chats and stuff like that in linux, and make good use of the webcam. It's been lots of fun I guess. but really i guess i'm bored and dont know what to do.

I've got my server downloading morrowind right now, I lost my own cd but still have the licese key...so that should make it "Legal".... wait...does it even use keys.

Oh well transmissioncli is pretty cool.

windows... is lame.

Monday, April 30, 2007

The computer

Well, it seems my laptop, though it has been with me through many times, and i've learned countless things on it, is reaching the end of the line. Its becoming aged, and many parts are beginning to die out one by one. ACPI gone.. CD Burner, flickering candle of hope, it still works half the time, but that means it wastes many cd's, battery is non existant 5 minute charge, touchpad can no longer be turned off, powerbutton works, but not instantly anymore, sometimes takes several times to get it to go, and pcmcia port is busted(meaning no wireless). And S-video port messed up years ago, that was the first to go.


IT's going down the drain . =/

Started out, when I got it in 10th grade around Halloween. or at least in the fall, i think it was just a little bit before christmas...had to be because I got the keyboard soon after. Began playing Renegade and stuff, since I have played that for so long.

Helped me through cisco class, learned alot of programming stuff on it, and spent a few mournings modifying renegade, or at least trying to learn it. Taking notes as I eagerly studied,

remember spending nights under the covers, looking for cool software.

Maybe i could set it up as a server afterwards, and get rid of the tower, this could do everything faster, and I could keep it on FC6 as well, and not worry about the extra setup


It's been a faithful machine.

Sunday, April 08, 2007

refreshing

Its been a long time since I have gotten to mess around with computers. I'll have to admit I was beginning to get a bit burned out, with applications not working and stuff...and how with linux, it seems like the applications you need are always scattered around, but I think I finally got some good breakthroughs today, and its good to celebrate those.

Found a new media player that beats the crap out of amarok, exaile.. it allready has shoutcast streams built in, as well as it fetches album art automatically. but its just like it in other ways, plus its on GTK, so it should be a tad bit faster in gnome

I've simplified the user interface so that it has much less clutter on it.. somehow icons in my way made me very mad...now the gui practically has nothing, mainly driven by keyboard shortcuts. I probably need to think through those a bit better...

Windows was fun to work with today.... I replaced my moms video card in the basement, put windows on her computer and set it up with itunes and multiple accounts with a vnc backend to login to.

Its sweet... not to mention, I gave her that usb wireless adapter. so now I'm taking the router upstairs. works because my laptop's pcmcia port got jacked up.. pretty lame

But it is okay... I am getting my webserver set up soon, that will be great. I've got time to play video games, kick back, read books, pray, sleep... I'm free for a change. And its marvelous. Exaile Rocks, Windows isn't all that booring, especially when you try to make it do things it wasn't designed for. But linux is more fun than all...

So soon, i've got a webserver/shell server / whatever I want.. .its amazing... I'm going to have fun with that.

Wednesday, March 14, 2007

New Home Server

Well.... God Certainly has provided. I have everything that I could possibly need now, for a home server. 256mb Ram, I dont know anything about the rest of the machine, since I can only see the hardware at this point. I know it has at the very least...some ethernet adapters. I might go up to best buy tommorrow or something, because I now need wireless installed on the thing...

So, Now what I need is... A decent copy of linux.. Thinking about using OpenSuse. Thats the one novell has released in stores, and I had been wanting to try it out. It's free for download off from their website. Or maybe Slackware. Was thinking of trying DSL, but I didn't like the name at all. Heck, I might even use fedora. But Fedora sounds like the best and safest bet right now. In any case, I think I might do everything in runlevel 3 and just ssh it. Seems like the best bet, I'm thinking the X-server would seriously Decrease performance. But I might keep it at 5 for a little while...at least for jackson to understand it. Either way it's stinking cool.

Wonder what I could do if I ever Got That old laptop to work... Well anyways, I need to take a shower and get Cleaned Up. This room is a terrible mess.

Looking forward to setting it up with dydns and port forwarding...thats the hard part right there. I must be missing something with what I am doing. I keep thinking I have everything set right, but then something doesn't work...I've enabled port forwarding.. I simply cannot understand what Is going on.

Another Thing God has blessed Us with is an XP Home Edition product Key. I can install Home Edition on my parents computer in the basement now...Thank God. That'll be a blessing for them. And me too.

And I'll VNC them while I'm at it..heck why not... Thats a cool Idea. The PC will become a gateway into the network as well.

I gotta get that range booster working so my mothers money wasn't wasted. I feel terrible about that...were like stinking broke. And I need to find another off ebay or something that works with ndiswrapper...

Wednesday, March 07, 2007

Figuring it out

Wow, Programming has been a blast, I spent all night last night just working with glade, and trying to understand how it worked. It's a truely awesome program, I love the guys at gnome, they made everything so easy, I remember programming for the win32 api, which... I'm sure .net has made it a bit easier.

Anyways, I feel like I have so much to cover.

Oh, yeah, I've been trying to get gtkpod to compile, but it cant without libgpod, it wont seem to detect it. So, I removed all entries in the config file that required libgpod, since i knew it wasn't on my system, that worked okay. But then it wouldn't compile, I guess because it needed the libraries. But I had them, or so I thought. Anyways, I think it just needed libgpod-devel to work, so I'm yummin that right now as we speak. Now i'm going to give that a shot with the original config file, to see if everything will really work.

./configure --prefix="/home/darkscript/virtual" I am using a sort of virtual directory, so it wont mess around with my system. its really really tight. But anyways lots to do lots to do. Probably need to read more of John Bevere, but i'm so wrapped up in this.

Tuesday, March 06, 2007

Excitement

Wow, I've been working bunches lately. I have my computer back to normal.

Recently been toying with DyDns Network shares, reading for CCNA Exams, Messing with all sorts of things that I can get my hands on.

My mother recently purchased a Wireless G Card with a 35% rangebooster, super excited about that. Just changed my theme from that dark black, it was fun, but it was getting a tad bit annoying, and dark... haha I wanted something simple for a bit.


Anyways, currently working on modifying Gtkpod for using ffmpeg as a backend for converting video for the ipod. I thought it would be cool, since it added drag and drop functionality, to refer to it as dragon drop. sounded much cooler than drag n' drop. Anyways super excited, learning alot under karl's wing. I can hardly contain myself, Just need to deal with the issue of pride.

I was messing around with location of executables, it appears it doesnt matter where they are located, they can still be executed flawlessly, they dont use relative path for libs apparently. still limits them somewhat, since they dont hold the libs within themselves, however more freedom, since I can compile them in my home bin and not worry about then not finding dependencies residing elsewhere on my system. anyways time for smallgroup time to go

Wednesday, February 07, 2007

Free Shell Account

Wow! who would have guessed the trouble you would have to go through to get a free shell account. Thats amazing. I went to one site, and you have to join a fight club to get your shell account. It's amazing.

Monday, February 05, 2007

Games And Such




Well this is cool. Since being in linux, i've really wanted to play some videogames, so my next big project, when I get out of ftc of course, is to get some videogames working. Particularly Nox. Its a really fun game, sort of like diablo, except, it is more fun...for me at least. Anyways, thats a picture of it up above. It was really inspirational to see it working to say the least. Here are some good websites of reference,


Other games, would be RA2 && YR. Counterstrike (going to get that afterwards). And all of the original red alert games.

Bah. I dont know if I ever want to come out of the shell again though, I just pray that God gives me some new ability of self control. Otherwise i'm never going to see this stuff again untill I'm married, Which will be very very good. I can say at least my computer will be in the living room.

On another note, I have successfully managed to get jinzora to work the way I want it too, and its fantastic. I wouldn't use it if I were on my own computer, but I do like it more than iTunes. I want to help brett out with another CMS called joomla. I'm going to be checking that out soon, and see if I cant build a working example with the source code that I have for the church.

Well, thats all I have time for. I just finished burning the fc7 live test 1, so I'm going home to fire that up and give it a review. I'm interested in seeing this control panel that has been spoken about.

Sunday, February 04, 2007

The New Gnome Control Panel



Well there you have it. Gnome has finally got the ingenuity to make a centralized control panel, probably one of the first features necessary for linux (gnome) to be user friendly, at least in my opinion.

Well anyways, Haven't done much today as far as computers go. I need my power adapter for my laptop. Anyways, I'm not so sure that I still want a mac anymore, I'm really really starting to enjoy linux. The more that I become familiar with the shell, the more friendly the environment is. Linux Rocks. But macs really are simple and they do pack quite a punch as far as software and creativity go.

Thursday, February 01, 2007

The Shell


Hey Guys, This is so amazing, I've been learning so much since I removed the x window system, from commands, to SELinux Security Context editing, to firewalls, interfaces, secure shells, editing configuration files, finding logs, and solving my own problems, and advancing to the level where I can now help others.

God's really blessed me with this thing. I moved here to keep a safety net around myself so I dont fall into that same temptation that has held me captive for many years. When he told me to do this, I knew what lay ahead. Only a bit more to go.

Right now I'm trying to install this web based music server called Jinzora Which, not only works on linux, but windows as well. It can interface with a variety of different music programs, in my case, the music player daemon (MPD).

I'm also looking at a few other distributions as well, for example, or as far as I know, Mandriva One Is including the new visual effect, and desktop rendering platform metissee. Which when I last saw it was in it's development stages.

I was also looking in on something earlier for the new FEDORA Core 7 Test Release, they have included their own control panel of sorts, the first attempt at some centralized form of controls, and it looked extremely sweet.

Distribution called CentOS is pretty much RHEL except it's free. they built it from the source rpms from what I understand. I could be wrong, but when I'm out in the business world thats some really useful and practical information to know. sweet.. To me thats just awesome.

In a similar scenario, there is the famous, cpanel for webhosting, this thing looks amazing, see the picture to the right, and the zpanel project made a virtually free implementation of that, so I might put that on my fedora box when I install X again. Which I'm really wanting to move to FC7 even if it is still in testing... a Yum upgrade might look good too.

Well thats all that I have time for. So i'll update later.