DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default what should be in this file?

in the /root/.xinitrc file ?


------
What is the purpose of this file?
https://wiki.archlinux.org/index.php/Xinitrc
------




Thanks.
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

http://en.wikibooks.org/wiki/Guide_t...D/As_a_Desktop


X -configure

-------------------

Should people ever use this command? X -configure

Is it safe?
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

http://www.openbsd.org/faq/faq11.html

This manual for example does not say what should be in this file?
Or this is the answer :
----------------------------------------


startx(1) looks for the file .xinitrc in the user's home directory. .xinitrc is usually a shell script, which can start as many X "client" (applications that use X) programs as desired. When this script exits, the X server shuts down. Generally, most of the programs run by this script should run in the background, though the last one should run in the foreground (typically the window manager); when it exits, the script will exit, and X will be shutdown.

In the simplest case, this can be as little as just the name of the window manager you wish to invoke:

cwm

Or you can get a little more fancy:

xconsole -geometry -0+0 -fn 5x7 &
oclock -geometry 75x75-0-0 &
xsetroot -solid grey &
cwm
Reply With Quote
Old 14th July 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by barti View Post
in the /root/.xinitrc file ?
/root/.xinitrc implies that you are logging into the system as root. This is not generally considered best practice. Users should log into their systems using non-root accounts using su(1) or sudo(8) only when needed. The point here is to minimize the possibility of doing irreparable damage from issuing incorrect commands.

As to the notation used earlier, ~/.xinitrc, the tilde, (~), expands to the home directory of the current user.

So, if you have logged in with a non-root account, /root/.xinitrc will have no effect since it customizes the X environment only for the root user.
Reply With Quote
Old 14th July 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by barti View Post
Should people ever use this command? X -configure

Is it safe?
As discussed in Section 11.2.2 & 11.2.6 of the FAQ, X -configure creates a xorg.conf configuration file for X. In the majority of cases, there is no need to manually create this file.

There are situations where generating this file manually can correct (or allow the user to hand-edit the file...) errors in auto-detection, but again, this is rarely needed anymore.
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

when I'm messing around with installation , then I'm using root.

After it is another story.

What should I write there ?
Reply With Quote
Old 14th July 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by barti View Post
This manual for example does not say what should be in this file?
Or this is the answer :
...
You have answered your own question.

barti, there is no reason to copy-and-paste large sections of the FAQ into messages here unless you have specific questions about a sentence or two. Otherwise, just refer to the section number(s).

Likewise, creating several different messages, one after another, each with separate questions, is unnecessary. Simply edit a single message. I suspect this will help you organize your own thoughts into a more coherent pattern as well.
Reply With Quote
Old 14th July 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by barti View Post
when I'm messing around with installation , then I'm using root.
If you have performed the first reboot, you are no longer installing; you are now in the process of configuring. You should be using a non-root account now, only going into root through su(1) or sudo(8). Simply logging into the root account is sloppy, dangerous, & teaches nothing. Using a non-root account will show you when specifically root access is needed.
Quote:
What should I write there ?
I can only assume you are referring to ~/.xinitrc as I can't read your mind, & you certainly aren't overly specific in your messages. You earlier quoted Section 11.5.2 which answered this question. What follow-up questions do you have?
Reply With Quote
Old 14th July 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,814
Thanked 214 Times in 189 Posts
Default

To be clear, Bari, because you have trouble communicating, I will repeat what I told you already, above.
  • Your home directory (/root in this case) needs a one-line .xinitrc file containing "exec gnome-session" without the quotes.
  • You must install the gnome-session package.
Installing packages requires you to set the PKG_PATH environment variable and use the pkg_add command as described in FAQ 15.
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

1. I have .xinitrc file in /root directory containing

exec gnome-session


2. I did pkg_add gnome-session



and I took maybe 40 minutes to install it.


But when I startx, I see only gray screen, no gnome.




================

Only after reading the manuals again I think I know what is going on:

There are 2 files:

.xsession (for xdm)

and


.xinitrc (for cwm)



And you are talking about the .xinitrc file.


How can I communicate If I don't know the language? I don't know what I'm talking about,
It is like searching for keys in the water without my mask, can't see anything.




I do have .xinitrc file with the line
exec gnome-session

inside it.


STARTX and I see gray screen.



By the way, why gnome uses .xinitrc and not .xsession ?




-

Last edited by barti; 14th July 2012 at 03:38 PM.
Reply With Quote
Old 14th July 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Thanked 0 Times in 0 Posts
Default

hi barti ! Congratulations ! I envy you since you have gnome working :-) .. (poor me, I had to regress to 5.0 just to install gnome 2 then upgrade etc ... )
To avoid logging as root , set sudo this way :
0- Login as root with su
1- run this command : visudo
2- uncomment (remove initial #) this line to use sudo without password :
Code:
     %wheel ALL=(ALL) NOPASSWD: SETENV: ALL
The ~/.xinitrc file is needed if you want to run some window manager other than default fvwm that you described as grey (fvwm's conf file is /etc/X11/xinit/xinitrc)

The X -configure commands is needed only when X fails to start so you have to let load all drivers to get a second chance with some new or exotic hardware.
For me it's this simple :
no xdm , no .xinitrc , just install yoyr favorite window manager and start it with the command xinit .. example : golem , a lovely window manager :
Code:
sudo pkg_add golem
$ xinit /usr/local/bin/golem
or make an alias in your .profile (it's in in your home directory)
Code:
  alias gn="xinit /usr/local/bin/gnome-session"
  alias go="xinit /usr/local/bin/golem"
  alias kd="xinit /usr/local/bin/startkde"
  alias io="xinit /usr/local/bin/ion3"
  alias fv="xinit /etc/X11/xinit/xinitrc"
(but here , make sure the short aliases don't collide with some existing commands)

Quote:
How can I communicate If I don't know the language?
barti , try to keep a positive attitude .. :-)
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

Ho no, gnome is not working

Still trying.


What did u say about version 5.0 ?
Maybe it is a bug in the system? my gray screen?



It is hard to be positive after not succeeding in adsl and gnome setup, so much effort and nothing works.
Reply With Quote
Old 14th July 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Thanked 0 Times in 0 Posts
Default

Quote:
and I took maybe 40 minutes to install it.
barti , get the ftplist file and choose the closest mirror to you.
you put a link about .xinitrc in Arch .. while Arch allows for more tweaks and customizations , OpenBSD thinks buttons are bad and me as a newbie user I don't need to set those .. in the end all you need is CLI+some powerful desktop (gnome/kde) or CLI+some lightweight wm for legacy hardware .. the shiny idea of having tens of window managers set for you to choose from doesn't fascinate an OpenBSD user .. :-)

Quote:
What did u say about version 5.0 ?
I had to first install 5.0 and gnome-session set .. then upgrade to 5.1 .. because 5.0 is the the last gnome2 release .. maybe it has some sec risk or something .. if only the gnome team keeps gnome2 parallel to gnome3 in the successful fashion of kde3 // kde4 ..
Quote:
Maybe it is a bug in the system? my gray screen?
You see .. that's why I'd rather you start X with a window manager other than gnome3 ..
first remove .xinitrc and install let's say : golem ? .. then
and as a user , do :
Code:
xinit /usr/local/bin/golem
if it starts , the problem is with gnome3 simply.
Usually when X fails , as root we reconfigure X doing :
Code:
# X -configure
# X -config /root/xorg.conf.new
but your case seems like mine : gnome3 is already a heavy guest now :-(
Reply With Quote
Old 14th July 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by daemonfowl View Post
Usually when X fails , as root we reconfigure X doing :
X -configure is not the issue.

barti, do you have a ~/.xsession file? Is so, what does it contain?
Reply With Quote
Old 14th July 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Thanked 0 Times in 0 Posts
Default

...

Last edited by daemonfowl; 15th July 2012 at 01:38 AM. Reason: .. - theory ..
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

I used Linux about 6,7 years before, and now I want to go back to business again, but If I need to study all again it will be openbsd and not Linux.




I removed the .xsession file and only have the .xinitrc.

Do I need both? if yes then why?




---


Quote:
you put a link about .xinitrc in Arch .. while Arch allows for more tweaks and customizations ,
What is arch?



----
Quote:
You see .. that's why I'd rather you start X with a window manager other than gnome3 ..

I don't get it, Do I start X with gnome?

Or gnome starts above the Xserver ?


I forgot all the theory.
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

Quote:
the X Display Manager. xdm(1)


Quote:
default window manager in OpenBSD is fvwm(1). Fvwm is a good, general purpose window manager

I can't get the philosophy here, what is the difference between display and window managers?

The dispaly manager deals with hardware and window manager is the software?


----------------

Quote:
startx(1) looks for the file .xinitrc in the user's home directory. .xinitrc is usually a shell script, which can start as many X "client" (applications that use X)
so, Gnome is an application that uses X?

.xinitrc file is for X clients like gnome?




Quote:
When xdm(1) starts, it runs the /etc/X11/xdm/Xsession, which will check to see if the user has a .xsession file in their home directory. So, if you wish to change your default window manager
So , .xsession file is for the window manager?





So I need both files?
Reply With Quote
Old 14th July 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Thanked 0 Times in 0 Posts
Default

The grey screen (and sometimes the green screen !) happens when a machine fails to meet the gnome 3 requirements (my case with Acer Aspire 5610) .. I suggested that you experiment with another non-problematic window manager (kde , xfce4 , ...) .. your X is working since xdm once worked.I mentioned X -configure for the info only since you asked.
Quote:
Do I need both? if yes then why?
I don't need any and you won't .. xinit (or startx) /path/to/new_window_manager would suffice when you want to use a newly installed window manager ! I gave you examples.
Reply With Quote
Old 14th July 2012
barti barti is offline
Shell Scout
 
Join Date: Jul 2012
Posts: 122
Thanked 0 Times in 0 Posts
Default

http://www.openbsdsupport.org/gnome-GDM.html

http://floorter.blogspot.co.il/2011/...n-openbsd.html

http://www.gabsoftware.com/tips/tuto...n-openbsd-4-8/





I need to try this .


http://projects.gnome.org/gdm/

So gnome is a window manager and gdm is the twin brother , the display manager.


If all went good with the installation , gnome was running and I knew nothing about how it works.






Do I need to do this?
pkg_add -i -vv gdm-2.20.11p1.tgz




By the way , If you look at google you see other people trying to install gnome on openbsd with no success altough following the manuals and tutorials avaliable.

That's the reason I put all the links above.





-

Last edited by barti; 14th July 2012 at 06:01 PM.
Reply With Quote
Old 14th July 2012
bmk1st bmk1st is offline
Port Guard
 
Join Date: May 2008
Posts: 25
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by barti View Post
1. I have .xinitrc file in /root directory containing

exec gnome-session


2. I did pkg_add gnome-session



and I took maybe 40 minutes to install it.


But when I startx, I see only gray screen, no gnome.




================

Only after reading the manuals again I think I know what is going on:

There are 2 files:

.xsession (for xdm)

and


.xinitrc (for cwm)



And you are talking about the .xinitrc file.


How can I communicate If I don't know the language? I don't know what I'm talking about,
It is like searching for keys in the water without my mask, can't see anything.




I do have .xinitrc file with the line
exec gnome-session

inside it.


STARTX and I see gray screen.



By the way, why gnome uses .xinitrc and not .xsession ?




-
My wild guess for why you are seeing gray screen is that you are running cwm from your home directory. I don't know which account you logged in and ran startx.

Which user account did you log in when you tried to run the startx command? Was it root or your user account?

Please post the entire contents of your .xinitrc here. Both from root and your home directory.

/root/.xinitrc and your /home/username/.xinitrc

My advice for you is to not run as root when you want to use Xwindows. It's better to run as your normal account.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to OpenBSD BOX with VNC mfaridi OpenBSD General 9 14th April 2010 08:38 PM
Bewan ADSL modem bewan adsl pci pico OpenBSD Installation and Upgrading 2 2nd April 2010 05:48 AM
How to connect Free VPN with OpenBSD mfaridi OpenBSD General 19 9th February 2009 12:52 PM
connect to openbsd box (ssh) milo974 Other BSD and UNIX/UNIX-like 4 3rd January 2009 02:44 AM
PPPoE -> ADSL Router (Bridge) - Slow connect? DraconianTimes OpenBSD General 0 31st December 2008 01:07 PM


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick