# Cannot make Xorg to work



## Antonov (Nov 16, 2010)

Hi everybody!

First of all, I just want to tell you that I'm complete newbie to FreeBSD, so I need all of your help.

For last three days, I'm trying to get KDE to work, but I simply can't. I tried everything, read forums, book ( yes, handbook, IHRTFM ). I have IBM R50e on which I want to install it.

Please, can someone assist me? I must tell you, that you have to explain me like a child some things about UNIX in general. For example, dont ask me to send you log file, because I don't know how and where to send it. 

I have installed everything, all packages and ports needed, but can't run Xorg or KDE.

When I try to configure, I get blank screen. When I try that with -retro, same thing. When I run startx I get blank screen also.

Kinda desperate now, this is third time that I'm trying to use *nix system and I'm hope it is last time.


----------



## mlharvey (Nov 16, 2010)

login as root and execute the following commands:


```
rm /root/.xinitrc
Xorg -configure
mv ./xorg.conf.new /etc/X11/xorg.conf
echo 'hald_enable="YES"' >> /etc/rc.conf
echo 'dbus_enable="YES"' >> /etc/rc.conf
reboot
```

now login as root again, then:


```
startx
```

if it is still now showing something like this: picture of twm
then do the following:

-hit ctrl+alt+f3 together
-login as root


```
less /etc/X11/xorg.conf
```

-type all of the output from the above command (use up and down keys to scroll) into the website at pastebin.com 
-remember the url of the pastebin results
-repeat the above three steps but instead of doing "less /etc/X11/xorg.conf" do "tail /var/log/Xorg.0.log"

-now post the 2 pastebin urls to this thread and me or someone else will tell you what is going wrong.


----------



## DutchDaemon (Nov 16, 2010)

*No*. *Don't start X as root*. Bad idea. Root should only be used to install software, but X should be started as a regular user.


----------



## Antonov (Nov 17, 2010)

mlharvey said:
			
		

> login as root and execute the following commands:
> 
> 
> ```
> ...



Yep, still nothing like that, no GUI.



> -hit ctrl+alt+f3 together



Tried this for several times, and nothing happened, just blank screen.



> -login as root
> 
> 
> ```
> ...



I did - but now stupid question of the day - how do I copy text from xorg.conf and where?  Same applies for Xorg.0.log ( BTW, what does that "0" means? ).

Thank you very much for your help, but please understand me, I am user of Windows for 13 years, and *nix seeks 180Â° different way of thinking and general approach to OS, so you will have to explain me some things from Windows user point of view.:r


----------



## Beastie (Nov 17, 2010)

I assume you are using a second machine running Windows to post here, right? The following commands will archive, compress and copy the files from your FreeBSD machine to a FAT-formatted USB pendrive you can use on Windows.


Insert USB pendrive.
`% ls /dev/da*`

```
/dev/da0
/dev/da0s1
```
N.B. If the output returns /dev/da0 only, use that instead of /dev/da0s1 in the *mount* command below.
`% su`
Type root's password.
`# mount -t msdosfs -o longnames /dev/da0s1 /mnt`
`# tar -czf /mnt/conf+log.tar.gz -C /etc/X11/ xorg.conf -C /var/log/ Xorg.0.log`
`# umount /mnt`
Press *Ctrl+D* to terminate root's shell.
Remove USB pendrive and complete the process on Windows (attach the tar.gz file in your post).


----------



## SirDice (Nov 17, 2010)

Beastie said:
			
		

> I assume you are using a second machine running Windows to post here, right? The following commands will archive, compress and copy the files from your FreeBSD machine to a FAT-formatted USB pendrive you can use on Windows.


Or simply use WinSCP and copy the files using scp/sftp.


----------



## Antonov (Nov 17, 2010)

Beastie said:
			
		

> I assume you are using a second machine running Windows to post here, right? The following commands will archive, compress and copy the files from your FreeBSD machine to a FAT-formatted USB pendrive you can use on Windows.
> 
> 
> Insert USB pendrive.
> ...



I've tried all of above, and it says 
	
	



```
mount: /dev/da0/ : Operation not supported by device
```
 altough it recognized it. I don't understand why I can't mount it? Also, I tried to copy that, nevertheless, and nothing happened.



			
				SirDice said:
			
		

> Or simply use WinSCP and copy the files using scp/sftp.



My I remind you that I am total beginner, so copying files using scp/sftp is quantum mechanics for me.  I don't know what commands I have to write to copy file, neither do I know what scp/sftp is.


----------



## DutchDaemon (Nov 17, 2010)

Please use PC-BSD. It's FreeBSD/KDE. Get some hours of using it under your belt. Come back to FreeBSD if you still want to try it later. You will really need to get some command-line and unix command experience before you try FreeBSD, let alone run all of the add-on software needed for a KDE environment.


----------



## Antonov (Nov 17, 2010)

DutchDaemon said:
			
		

> Please use PC-BSD. It's FreeBSD/KDE. Get some hours of using it under your belt. Come back to FreeBSD if you still want to try it later. You will really need to get some command-line and unix command experience before you try FreeBSD, let alone run all of the add-on software needed for a KDE environment.



But that is not solution. I want to solve this problem, not to avoid it. I have all packages installed, I checked that twice, I have full install DVD, so I downloaded everything needed.
I am not the only one with this problem as I see, but no solution yet. Also, why I can't mount USB, any idea?

BTW, anyone knows some GOOD site for complete idiots, that has list of *nix commands?


----------



## rusty (Nov 17, 2010)

Couple of things I would try;

Starting X without an xorg.conf
`# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old`
`# /usr/local/etc/rc.d/hald onerestart`

Check setxkbmap is installed
`% pkg_info -Ix setxkbmap`

As non root
`% ee .xinitrc`

```
setxkbmap -option terminate:ctrl_alt_bksp
```
Hitting Ctrl Alt and Backspace should return you to tty if needed.

`% startx`

One thing I noticed in your earlier reply was no mention of da0s1

```
mount: /dev/da0/ : Operation not supported by device
```

Perhaps this page may be helpful.


----------



## wblock@ (Nov 17, 2010)

Antonov said:
			
		

> But that is not solution. I want to solve this problem, not to avoid it. I have all packages installed, I checked that twice, I have full install DVD, so I downloaded everything needed.



You could start by identifying the video card in your system.  Maker and model number, at least.



> I am not the only one with this problem as I see, but no solution yet.



There are a number of ways that X can fail, it's not necessarily the same problem.



> Also, why I can't mount USB, any idea?



USB card not formatted, or not formatted as MS-DOS.  Connect the card and try
`# file -s /dev/da0`
`# file -s /dev/da0s1`
(note the # meaning "logged in as root") to see if the card filesystem can be identified.



> BTW, anyone knows some GOOD site for complete idiots, that has list of *nix commands?



There are really only a few commands you need that will lead you to all the rest.
First is man(1).  apropos(1) is related.  ls(1), cp(1), rm(1) are other important commands.  And there's one more, less(1), a utility to display files.

Combine those with the Handbook (available in many other languages), and you've got a good start.


----------



## UNIXgod (Nov 17, 2010)

Antonov said:
			
		

> BTW, anyone knows some GOOD site for complete idiots, that has list of *nix commands?



http://www.freebsd.org/projects/newbies.html

If your interested in the command line as a scripting language and common usage I always recommended the venerable UNIX Programming Environment( B. Kernighan) which is a canonical study as well as From Bash to Z Shell which will take your skill further with modern power shells.

for better understanding of commands for programs you install you can type at your prompt _man_ and the command and you will be presented with formatted documentation.

The first commands you should learn are ls, pwd, and cd. so to learn how to use them type
`% man cd`
`% man pwd`
`% man ls`

Since your determined learning a text editor will help as well. Most people learn at least enough _vi_ to get by but FreeBSD also comes with a simple beginners editor called _ee_.

If you install vim your can run a command called *vimtutor* which will teach you vi usage.


----------



## Antonov (Nov 18, 2010)

No progress, yet. Here are my replies. Thank you in advance.



			
				rusty said:
			
		

> Couple of things I would try;
> 
> Starting X without an xorg.conf
> `# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old`
> ...



Nope, nothing happened. Blank screen again.



> One thing I noticed in your earlier reply was no mention of da0s1
> 
> ```
> mount: /dev/da0/ : Operation not supported by device
> ...



Well, yes, it recognized USB as da0, not da0s1. Or did I got something wrong?



			
				wblock said:
			
		

> You could start by identifying the video card in your system.  Maker and model number, at least.



Sorry, I wrote that it is IBM R50e laptop, so I guessed you'll probably know what it is.

It is Intel Extreme Graphics II (855GME).



> There are a number of ways that X can fail, it's not necessarily the same problem.



Yes, I understand. But I saw that lot of people got blank screen with Xorg, and none solution to this problem.



> USB card not formatted, or not formatted as MS-DOS.  Connect the card and try
> `# file -s /dev/da0`
> `# file -s /dev/da0s1`
> (note the # meaning "logged in as root") to see if the card filesystem can be identified.



Yes, it can. It is says, "x86 boot sector, Microsoft Windows XP Bootloader NTLDR, code offset 0x3c, OEM-ID "MSDOS5.0", sectors/clusters 64, root entries 512, Media descriptor 0xf8, sectors/FAT 238, heads 255, sectors 3891200 (volumes > 32 MB ), serial number 0xc84d9e9c, unlabeled, FAT ( 16 bit )"



> There are really only a few commands you need that will lead you to all the rest.
> First is man(1).  apropos(1) is related.  ls(1), cp(1), rm(1) are other important commands.  And there's one more, less(1), a utility to display files.



Thank you. I will start from that.



			
				UNIXgod said:
			
		

> http://www.freebsd.org/projects/newbies.html
> 
> If your interested in the command line as a scripting language and common usage I always recommended the venerable UNIX Programming Environment( B. Kernighan) which is a canonical study as well as From Bash to Z Shell which will take your skill further with modern power shells.
> 
> ...



Thank you also. I will try to get that book, since as I see, it is really for beginners, something I definitely need.


----------



## Antonov (Nov 18, 2010)

I would like to add something else. I logically assumed, that if my Xorg doesn't work, but it one way affects video card ( blank screen ), I've downloaded PCBSD, and tried with it also. And guess what? Same thing. So it has to do probably something with my video card, but don't know what.
I have found that people have FreeBSD on this laptop:

http://www.yazzy.org/configs/freebsd/thinkpad/

There is also xorg.conf file on that page for it. Can someone tell me how to save that file and overwrite existing one that I have, maybe that will help me?

http://www.yazzy.org/configs/freebsd/thinkpad/xorg.conf

Still waiting for your help if you have any idea. I just don't get it what could it be.


----------



## Beastie (Nov 18, 2010)

Antonov said:
			
		

> Well, yes, it recognized USB as da0, not da0s1. Or did I got something wrong?


So did you try mounting /dev/da0 instead of /dev/da0s1 as I mentioned earlier?



			
				Antonov said:
			
		

> There is also xorg.conf file on that page for it. Can someone tell me how to save that file and overwrite existing one that I have, maybe that will help me?


`# cd /etc/X11`
`# mv xorg.conf xorg.conf.old`
`# fetch [url]http://www.yazzy.org/configs/freebsd/thinkpad/xorg.conf[/url]`


----------



## Antonov (Nov 18, 2010)

Beastie said:
			
		

> So did you try mounting /dev/da0 instead of /dev/da0s1 as I mentioned earlier?



Yes, I wrote already. I can't mount it.


----------



## Beastie (Nov 18, 2010)

I edited while you were posting. Check the post again for the other matter.

So you tried mounting both /dev/da0 and /dev/da0s1, as root, and neither worked?


----------



## Antonov (Nov 18, 2010)

Beastie said:
			
		

> I edited while you were posting. Check the post again for the other matter.
> 
> So you tried mounting both /dev/da0 and /dev/da0s1, as root, and neither worked?



Now something strange happened. I have a mouse in command line. Till now I didn't have it, but now I have it. Dunno how or what. I will try to fetch this xorg.conf.

BTW, no, I could not mount it either way.


----------



## Antonov (Nov 18, 2010)

So, this xorg.conf that I have downloaded doesn't work, it gives me errors. In the morning when I wake up, I will try to mount USB again, it is not by me at the moment.


----------



## Anonymous (Nov 18, 2010)

Forget mounting usb for now, if you are connected to the Internet do this:


```
fetch https://github.com/oremj/pastebinit/tarball/master/oremj-pastebinit-ba5f112.tar.gz
tar -xvvf orem*gz
rm orem*gz
cd orem*
python -h
```

If it says "python: Command not Found." then do "pkg_add -r python" and wait for that to finish, otherwise continue.


```
python ./pastebinit.py < /etc/X11/xorg.conf
python ./pastebinit.py < /var/log/Xorg.0.log
```

Post the links it returns to you on this thread and also:


```
startx 2> /error
reboot
```

^^^^ only reboot if you can't get rid of black screen to do following steps (you should be able to switch consoles with ctrl+alt+(f1-f7) though)

Remember the links/urls given by pastebinit.py from the rest of these commands and add them to your post on this forum as well.


```
python ./pastebinit.py < /error
rm /error
starx > /output
reboot
```

^^^^ only reboot if you can't get rid of black screen to do following steps (you should be able to switch consoles with ctrl+alt+(f1-f7) though)


```
python ./pastebinit.py < /output
```


If you followed these steps correctly we should now be able to see all the relevant information to solve this problem for you. By the way, the first time I installed xorg was on a thinkpad and got it to work, mostly because of these forums. It ended up that I just needed to change a line in xorg.conf to change my driver.


----------



## jb_fvwm2 (Nov 18, 2010)

FWIW once a few tricks are learned, mounting fat32 usb devices are easy (given all the new usb drivers loaded, etc caveats). Search maybe the forums for "device AND fat32 AND mount" and possibly a few command sequences could be useful in this case.  Even if not, those thread results could give other useful information you may use to ease some configuration(s).


----------



## Antonov (Nov 18, 2010)

mlharvey said:
			
		

> Forget mounting usb for now, if you are connected to the Internet do this:
> 
> 
> ```
> ...



Followed this directly as you said, and I got this error:


```
python: can't open file './pastebinit.py': [Errno 2] No such file or directory
```

What did I do wrong now?


----------



## Anonymous (Nov 18, 2010)

You aren't in the directory that pastebinit.py is in. Make sure you have internet connectivity and are logged in as root and then do the steps in my last post EXACTLY as they are written.


----------



## Antonov (Nov 18, 2010)

mharvey87 said:
			
		

> You aren't in the directory that pastebinit.py is in. Make sure you have internet connectivity and are logged in as root and then do the steps in my last post EXACTLY as they are written.



Finally, I made it! But only for xorg.conf:

http://pastebin.mozilla.org/857778

Dunno why, but when I do the same for .log file, it only gives this result:

http://pastebin.mozilla.org/

Without generated number.

Can you tell now something more?


----------



## Antonov (Nov 18, 2010)

Sorry, I cannot edit message, and I wanted to ask one more thing. Is there maybe way, for me to setup my laptop as server ( offcourse with your help ), and give some of you guys access to my computer, so you can maybe help me better that way?


----------



## Anonymous (Nov 19, 2010)

> Is there maybe way, for me to setup my laptop as server ( offcourse with your help ), and give some of you guys access to my computer, so you can maybe help me better that way?



Yes.
Make sure your user account (and root account) has a very long and random password. You can change it with the "passwd" command when logged in as the user.
Then, as root do: [cmd=]/etc/rc.d/sshd onestart[/cmd]

Send me in a private message:
 -your WAN IP address (from whatismyip.com")
 -your router model and make
 -your freebsd box username
 -your freebsd box password
 -the ip addresses obtained by running the command below:
[cmd=]ifconfig | grep inet | grep -v 127.0.0.1 | grep -v inet6 | cut -d ' ' -f 2[/cmd]

I will then tell you how to forward port 22 so that I can log in and help you. Also if you can please log in to the #freebsdhelp channel of the EFnet IRC server. Google IRC if you need help, a free client you can download is called Xchat. I am always logged in so just pm me, my names xzzzx.


----------

