Continuing on from my last post, it was really quite simple to get KDE to run after I closed that post.  in fact I only had to type in 2 lines and the second one ran KDE.

 

  1. exec /usr/local/kde4/bin/startkde4 > ~/.xinitrc
  2. startx

 

BAM! that was it, finally!! after 2.5 years of trying I could not believe it was so simple… and then I noticed… I had no KB or Mouse… I did not know it was possible to be so happy and so sad at the same time…

 

You can search the inet any way you want and you’ll find out that running “X -configure” will generate your xorg.conf.new file that you then have to move to “/usr/local/etc/X11/xorg.conf “   one more item to note, when you test this, make sure you type “X -retro” or “Xorg -retro” else you will just get a blank screen.

*****WARNING*****ok, now that I got your attention, you must run the following command before attempting to use your xorg.conf in the previously mentioned location or you will lock your system up and have to hit the power button. “sudo chmod root:wheel /usr/local/etc/X11/xorg.conf“  if you do not have sudo installed, you have 3 choices.

 

  1. login as root (something I never do except to add my user id to the sudoers file)
  2. type “su -” and switch to root
  3. login as root and type “pkg_add -r sudo” then either add yourself to the wheel group or add yourself to the sudoers file

 

there are several ways to add yourself to the wheel group, the only one that sticks out in my mind right now that I can vouch for is “pw moduser [username] -G wheel [username]” this one sets your group to wheel AND your default group [username], if you skip the second [username] you will no longer have access to any of your own files or you can type “pw groupmod wheel -m [username]” should do the same, to add yourself to the sudoers file you need to type “visudo” then you will be in vi, here is what to do if you don’t know vi.

 

  1. press ”/” (initiates a search)
  2. type “root” (tells vi what to search for)
  3. press enter (begins the search process)
  4. press “n” (takes you to the next instance of “root”)
  5. press “o” (creates a new blank line under the current one and starts editing)
  6. type [username] [tab]ALL=(ALL) ALL“  (make sure you use caps on the “ALL”, this allows [username] to use sudo)
  7. press ESC (stops edit mode)
  8. press “:” (informs vi you wish to enter a command)
  9. type “wq!” (tells vi to “write” the current file to disk and “quit” vi “NOW”
  10. press enter (executes the command you have entered

 

Now you will no longer have to log in as root on your machine, or su to root again.  Back to my problems…  So, I ran the dreaded -configure command (dreaded because after running it on any system in the last 2-3 years the only result I have ever gotten is the blank black screen syndrome) and of course, I got exactly what I was expecting… a blank black screen when I tested X with that config file.  This is the reason I did not switch to FreeBSD instead of windows back when FreeBSD 6.1 was released, I could never get beyond this point.  Well, about a days worth of inet searching and I have come across some useful information that “worked” for several users.  Nothing worked for me (feel free to search the issue and you’ll get a lovely list of others having this issue, some getting off easy, some giving up, some finding alternate ways to do it.)  about 15 minutes ago (not that you will know when that was based off my posting time, but it makes sense to say it that way…) I found a lovely forum post on FreeBSD.org, now when you look at that post you may not be surprised by what you see there, it is fairly common troubleshooting and common knowledge about the workings of FreeBSD and X.org; HOWEVER!!! and here is the kicker, it has in it a code snippet of the ever elusive “ServerFlags” section of  xorg.conf, something that apparently is not auto generated and really is not documented well (additionally other posts I saw told you to stick it in the “ServerLayout” section, which only causes X to crash without loading.)  I added the following to my xorg.conf file:

 

  1. Section “ServerFlags”
  2.                 Option “AllowEmptyInput” “off”
  3. EndSection
  4. Section “InputDevice”
  5.                 Identifier   “Keyboard0″
  6.                 Driver         ”kbd”
  7.                 Option “XkbOptions” “terminate:ctrl_alt_bksp”
  8. EndSection

 

Now, if you ran “X -configure” lines 4, 5, 6, and 8 should already be in there.  Lines 1 – 3 allow my mouse to work in X, and line 7 allows me to hit ctrl+alt+bksp to exit X and both worked!!  So I quickly exited X and tried “startx” and sure enough, KDE loaded, I could see it, and my mouse worked!!  hot dog!!

ok, so I woke up and now can’t get back to sleep.  nothing new, but this time I decided to do something instead of just laying there hoping to fall asleep before the sun rises.  Now, I thought that I already had this working, but apparently not… —edit okay, so I need to note I was doing these steps while writing this post and when I got to the step to reboot Fedora, step 6, I fell asleep.

I was and am currently using, a Fedora 12 VM from my laptop, now I thought I had the shared folders from the host OS (Win XP) setup, but could not find the mount point, so I just attempted to re-mount it.  fyi I’m using VirtualBox 3.1.2  so I attempted to remount the shared folder to a simple location…

$ sudo mount -t vboxsf documents /home/finndo/Documents/local

mount: unknown filesystem type ‘vboxsf’

so I do some Googling and come up with some interesting tidbits…

so, if you didn’t look at the link, here it is in a nutshell, to get the mount to work (yes I installed the VM additions, but did not notice the error…) please read the whole post before trying this, as there are some steps you may need to do a little differently and I have noted this, but not until after I list them!

ok, let me start from the beginning…

step by step instructions for getting shared folders to work in a Fedora 12 VM on VirtualBox (after you get fedora installed)

  1. open a console window (I am a huge fan of Yakuake)
  2. type “sudo yum install system-config-display”
  3. give it your password (you may have to do this every time you type sudo)
  4. type “sudo system-config-display”
  5. this will open a window in your GUI (KDE, Gnome, XFCE, ICE, whatever) choose the options for your display (if using Yakuake you need to hit F12 to make the console window go away so you can see this new window)
  6. type “sudo yum install gcc kernel kernel-devel kernel-headers”
  7. restart the VM to boot with the newest kernel
  8. goto the Devices menu and select install Guest additions
  9. back to the console and type “sudo mount /cdrom /media”
  10. type “sudo /media/VBoxLinuxAdditions-x86.run”
  11. (special note, if you have already run the VBox Additions from the cd, skip steps 7-10 and  just type this “sudo /etc/init.d/vboxadd setup”
  12. now I do not remember if I had to create the share for My Documents in VirtualBox or if it was there by default, but I have one, called “documents” and that is the one I am using in this example. so, type the following “sudo mkdir /mnt/shared-docs”
  13. type “mount -t vboxsf documents /mnt/shared-docs”
  14. then you can now access your Windows XP My Documents folder from your Fedora 12 install in the /mnt/shared-docs folder!!!

Really not that hard, but nowhere in the documentation for VirtualBox does it tell you that you have to do all of that!

Now, you can type “su -” and give it your password, then you do not have to use “sudo” at all for the entire process.  you may ask why I do it then, and it is because I work on linux and unix systems for a living (or at least I am trying to) and for security reasons they tell you to never su to root (become the root user) as it is too easy to type an accidentally command in that will make the entire system irreversibly broken (with out restoring from a backup) and since I have been logged into some servers that are used in the monitoring/maintenance of the space shuttle and international space station, so making one of those stop working for several hours or more is a really bad idea! therefore you sudo every command you need to run as root instead of becoming root, gets annoying at times, but almost eliminates the chance of accidental termination of your employment!

Ok, so a note, I am running this Fedora 12 VM on a single core laptop with 2GB of Ram (1.5GB given to Fedora, and nothing running in the host except the VM) and when I ran step 5 step 6 (I added a step later), it practically halted my system and took almost 30 minutes (part of the reason why I fell asleep) it would say it was downloading a 8.6 meg file and take 14 minutes to do so, at 858Mb/s (which is impossible I know, but that is what it did and said) anyway, the main reason I did this, is that I had downloaded some other Fedora .iso files and filled my Virtual HDD and needed to get them off!!

So, now you know… and as we all know… Knowing is half the battle!

************editing updates and bonus steps! *********** May 10th 2010 ****************

Bonus step!!

now I bet you want to know how to make it comeback after a reboot, don’t cha!

  1. sudo vi /etc/fstab
  2. G” (uppercase letter)
  3. o” (lowercase number)
  4. [name you used in VBox shared folders] [tab] [fullpath to the mount point in the VM, or #12 above] [tab] vboxsf [tab] noauto,rw [tab] 0 [tab] 0 (both of those are the number zero)
  5. [esc] (the escape key, probably is labeled “esc” on your keyboard in the top left corner)
  6. wq!” (lowercase letters and an exclamation (sometimes called a “BANG” by unix people, older people, and those who were taught by one of the afore mentioned.))
  7. now reboot
  8. sudo mount [name you used in VBox shared folders] (you will have to do this everytime you reboot (I just do a save state, so not an issue very often) as the fstab loads the mounts BEFORE the VBox additions are run, causing a “not found” error if it is not setup this way)

Special note: the folder name from VirtualBox shared folders is normally the name of the last directory in the path, for example if you are sharing /home/[my username]/Downloads/mystuff – then your VBox shared name will be “mystuff”

***note

you can now visit my Ubuntu 10.04, VirtualBox, and shared folders – a how to

[finndo@fedora12KDE yum.repos.d]$ sudo mount -t vboxsf documents /home/finndo/Documents/local
mount: unknown filesystem type ‘vboxsf[finndo@fedora12KDE yum.repos.d]$ sudo mount -t vboxsf documents /home/finndo/Documents/local
mount: unknown filesystem type ‘vboxsf’
Tagged with:
 
17 visitors online now
3 guests, 14 bots, 0 members
Max visitors today: 23 at 12:30 pm PST
This month: 23 at 02-05-2012 05:37 am PST
This year: 29 at 01-11-2012 02:49 pm PST
All time: 1100 at 08-08-2011 08:11 pm PDT
View in: Mobile | Standard