PDA

View Full Version : [Solved] FreeBSD 7.2 and GNOME


stormblastt
July 26th, 2009, 09:52
After installing FreeBSD 7.2, Xorg and GNOME i have a problem. All works perfectly, but in Gnome menu i don't find section Shutdown. So i must Logout and then Shutdown the PC. GNOME 2.26 starts through GDM.
Can someone help with this problem?

Sorry for my english :)

ale
July 26th, 2009, 09:57
Are you in the operator group?

stormblastt
July 26th, 2009, 10:17
Yes, member of wheel and operator groups.

stormblastt
July 26th, 2009, 10:27
Screenshot:
http://img265.imageshack.us/img265/1498/bsd.png

kpedersen
July 26th, 2009, 12:07
Stormblastt,

Have you started up the gdm?

i.e Have you got gnome_enable='YES' in you rc.conf? or do you manually start gnome with xinitrc entries and startx?

Because in order to have shutdown via gnome, you need to have gdm running (AFAIK)

If you do not want a login manager, use XFCE

Hope this helps.

stormblastt
July 26th, 2009, 15:06
I have gnome_enable="YES" in rc.conf. GDM starts and i login through GDM.
But Xfce use GDM too, or no?

When i login as root, GNOME too don't have Shutdown. I must use "# shutdown -h now" command in terminal window to shutdown PC.

Sorry for my poor english.

ale
July 26th, 2009, 15:35
I remember seeing something similar once. If I'm not wrong, it was caused by a missing package.
Can you redirect the output of pkg_info to a file and add it as attachment?

Beastie
July 26th, 2009, 16:48
I have gnome_enable="YES" in rc.conf. GDM starts and i login through GDM.
But Xfce use GDM too, or no?

When i login as root, GNOME too don't have Shutdown. I must use "# shutdown -h now" command in terminal window to shutdown PC.

Sorry for my poor english.

Xfce does not use any DM, but you may use one (only tested XDM here).

How does GNOME reboot/shutdown?
Xfce, for instance, uses either HAL or sudo.
If GNOME uses HAL too, then make sure HAL and D-Bus are enabled and running (or does gnome_enable already do that).
You may also not have the proper entries in /usr/local/etc/PolicyKit/PolicyKit.conf (e.g. org.freedesktop.hal.power-management.shutdown).

ravi
July 27th, 2009, 01:06
I recently installed FreeBSD 7.2 with GNOME as my desktop. All adminstration menus (like network config) are greyed out. I tried loggin in as root to see if this behaviour changes. But to no avail.

b.t.w here is the PolicyKit configuration. (This PolicyKit is very poorly explained).

What is going on ?? .

Any ideas ???

Ravi

/usr/local/etc/PolicyKit.conf
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
<match user="root|ravi">
<return result="yes"/>
</match>
<define_admin_auth group="wheel"/>
</config>

SirDice
July 27th, 2009, 08:37
I recently installed FreeBSD 7.2 with GNOME as my desktop. All adminstration menus (like network config) are greyed out. I tried loggin in as root to see if this behaviour changes. But to no avail.
You need to start GNOME via GDM for this to work.

stormblastt
July 27th, 2009, 09:41
I remember seeing something similar once. If I'm not wrong, it was caused by a missing package.
Can you redirect the output of pkg_info to a file and add it as attachment?

Output of pkg_info


/usr/local/etc/PolicyKit.conf

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
<match user="root">
<return result="yes"/>
</match>
<define_admin_auth group="wheel"/>
</config>


In rc.conf hal_enable, dbus_enable and gnome_enable set to "YES".

ravi
July 27th, 2009, 10:09
Thanks a lot for your help. Now I did more digging, I did stick in "gnome_enabled=yes" in /etc/rc.conf. But now come to think of it I did have an entry in ~/.xinitrc exec gnome-session. Now I learnt that this will bypass gdm. I will remove this entry and see what happens tomorrow when I get back to work.

SirDice
July 27th, 2009, 10:15
But now come to think of it I did have an entry in ~/.xinitrc exec gnome-session. Now I learnt that this will bypass gdm.
It won't. .xinitrc is used when you use startx.

DutchDaemon
July 27th, 2009, 11:29
"gnome_enabled=yes"

It's gnome_enable, not gnome_enabled.

ravi
July 27th, 2009, 11:59
Thanks for pointing the typo. I am pretty sure I had gnome_enable=yes. If the "exec gnome-session" in .xinitrc does not bypass GDM, then am I not using Gnome through GDM??? Then how do I solve the issue of "greyed out" menu issue???

SirDice
July 27th, 2009, 12:08
Are you sure both dbus and hal are running?

While in Gnome can you post the output of ck-list-sessions and polkit-auth --show-obtainable?

ale
July 27th, 2009, 12:15
How do you start Xorg?
Are you logging in on a ttyv and then typing startx?
Or are you seeing the gdm greeter after the normal boot?

Beastie
July 27th, 2009, 16:52
Check D-Bus and HAL status using /usr/local/etc/rc.d/dbus status and /usr/local/etc/rc.d/hal status.


/usr/local/etc/PolicyKit.conf
AFAIK, it should be /usr/local/etc/PolicyKit/PolicyKit.conf, not /usr/local/etc/PolicyKit.conf. Or is this a typo?




<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
<match user="root">
<return result="yes"/>
</match>
<define_admin_auth group="wheel"/>
</config>

Try adding

<match action="org.freedesktop.hal.power-management.shutdown">
<match user="<your_user_name>">
<return result="yes"/>
</match>
</match>

between <define_admin_auth group="wheel"/> and </config>.

Of course there are many ways to organize the whole code. If you get this working, modify it as it suits you best using the documentation.
Also, use polkit-action to get all valid actions.

ravi
July 28th, 2009, 00:08
Please see all the info that is being asked for. Looks like both hal & dbus are running. polkit-auth --show-obtainable? returns
No match


%/usr/local/etc/rc.d/hald status
hald is running as pid 977.
%/usr/local/etc/rc.d/dbus status
dbus is running as pid 813.


=======================
%cat /etc/rc.conf
========================
# -- sysinstall generated deltas -- # Mon Jul 13 00:30:04 2009
# Created: Mon Jul 13 00:30:04 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
#
#
hostname="helios.dsto.defence.gov.au"
#
# Network interface configuration line
ifconfig_bge0="DHCP"

# Enable/Disable other services
nfs_client_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
sshd_enable="YES"
#
# You need the following three lines
# if you want Gnome to come up with no hastles
# with gdm runing on bootup
hald_enable="YES"
gdm_enable="YES"
dbus_enable="YES"
# Give me linux compatibility
linux_enable="YES"
%=================== end rc.conf =======================

%ck-list-sessions
Session2:
unix-user = '1001'
realname = 'ravi sankar saripalli'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/ttyv8'
display-device = ' ? '
remote-host-name = ''
is-local = TRUE
on-since = '2009-07-27T07:45:18.207385Z'
login-session-id = ''
=========================
%polkit-auth --show-obtainable?
polkit-auth: No match.
===============================

ravi
July 28th, 2009, 00:10
How do you start Xorg?
Are you logging in on a ttyv and then typing startx?
Or are you seeing the gdm greeter after the normal boot?
I get the greeter after boot process is finished.

ale
July 28th, 2009, 00:12
Ok, so what you have in ~/.xinitrc is not relevant.
Can you attach the output of pkg_info just for my curiosity?

EDIT:
sorry, I've missed that stormblastt has added it

ale
July 28th, 2009, 00:19
Wait, maybe now I remember...is your /proc mounted?

ravi
July 28th, 2009, 00:46
Wait, maybe now I remember...is your /proc mounted?

Well, no "/etc/fstab" entry for /proc.


helios# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ad4s1b none swap sw 0 0
/dev/ad4s1a / ufs rw 1 1
/dev/ad4s1e /tmp ufs rw 2 2
/dev/ad4s1f /usr ufs rw 2 2
/dev/ad4s1d /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0

ale
July 28th, 2009, 01:27
Well, can you mount it?

ravi
July 28th, 2009, 01:52
Wonderful, it worked after mounting the proc
with the following entry in /etc/fstab
proc /proc procfs rw 0 0
Very strange that packages that rely on /proc do not do this
on the fly.

stormblastt
July 28th, 2009, 08:16
Mounting /proc helps me too. Now all works perfectly.
Thanks for help.

fender0107401
July 28th, 2009, 11:52
haha

Next time, when something wrong check this: http://www.freebsd.org/gnome/index.html