PDA

View Full Version : Fedora 21 and GDM / Xsession



mwpow3ll
19th December 2014, 12:03 AM
Can someone please explain how I can achieve the same functionality as having a '~/.xsession' run? As it stands, I am not seeing mine run. I have tried ~/.xsession and installing xorg-x11-xinit-session.

I did some searching and /etc/X11/xinit/Xclients.d/ was mentioned, but I have never heard of this before...

dobbi
19th December 2014, 12:07 AM
In GDM and other DMs I think that is called "autostart".

People refer to .Xsession and Xinitrc as "legacy".

mwpow3ll
19th December 2014, 12:21 AM
Any ideas on how I can get a script to run when the GDM is run? I am simply trying to replicate ~/.xsession

dobbi
19th December 2014, 12:27 AM
$ echo "[Desktop Entry]
Name=myapp
Exec=/usr/bin/myapp
Terminal=false
X-GNOME-Autostart-enabled=true
X-KDE-autostart-after=panel" > $HOME/.config/autostart/myapp.desktop

To autostart something under Gnome and KDE you find the local autostart folder and place a "desktop" file in it.

In Gnome that location is $HOME/.config/autostart, the above will create a file named myapp.desktop there.

In your case change myapp for the path to your script that must be executable.

mwpow3ll
19th December 2014, 12:42 AM
wow... that is so much more difficult / unintuitive. I will give it a shot

mwpow3ll
19th December 2014, 01:23 AM
This is not working. I tried adding a desktop file to ~/.config/autostart/, /usr/share/gnome/autostart/, and /usr/share/xsessions/

vallimar
19th December 2014, 05:53 AM
Did you try installing xorg-x11-xinit-session ?

dobbi
19th December 2014, 09:33 PM
People told me that F21 doesn't have gnome-session-properties.

If you be so kind could you check that by issuing.


$ yum provides gnome-session-properties

and seeing if it is in a different package than the gnome-session-3.10.1-1.fc20.x86_64.

gnome-session-properties can create startup files for you and will place them in the right directory with the right permissions and the right content, if that doesn't work then something is wrong with the system.

rbmorse
19th December 2014, 10:20 PM
I get a "no matches found"

dobbi
20th December 2014, 04:54 AM
That is odd.


$ locate autostart

Do you have autostart files elsewhere?

rbmorse
20th December 2014, 05:12 AM
I get: (my username is ron):



/etc/xdg/autostart
/etc/xdg/autostart/abrt-applet.desktop
/etc/xdg/autostart/at-spi-dbus-bus.desktop
/etc/xdg/autostart/caribou-autostart.desktop
/etc/xdg/autostart/deja-dup-monitor.desktop
/etc/xdg/autostart/evolution-alarm-notify.desktop
/etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop
/etc/xdg/autostart/gnome-initial-setup-first-login.desktop
/etc/xdg/autostart/gnome-keyring-gpg.desktop
/etc/xdg/autostart/gnome-keyring-pkcs11.desktop
/etc/xdg/autostart/gnome-keyring-secrets.desktop
/etc/xdg/autostart/gnome-keyring-ssh.desktop
/etc/xdg/autostart/gnome-settings-daemon.desktop
/etc/xdg/autostart/gnome-software-service.desktop
/etc/xdg/autostart/gnome-user-share-obexpush.desktop
/etc/xdg/autostart/gnome-welcome-tour.desktop
/etc/xdg/autostart/gsettings-data-convert.desktop
/etc/xdg/autostart/nautilus-autostart.desktop
/etc/xdg/autostart/orca-autostart.desktop
/etc/xdg/autostart/pulseaudio.desktop
/etc/xdg/autostart/sealertauto.desktop
/etc/xdg/autostart/spice-vdagent.desktop
/etc/xdg/autostart/tracker-extract.desktop
/etc/xdg/autostart/tracker-miner-apps.desktop
/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-miner-user-guides.desktop
/etc/xdg/autostart/tracker-store.desktop
/etc/xdg/autostart/user-dirs-update-gtk.desktop
/etc/xdg/autostart/vmware-user.desktop
/etc/xdg/autostart/z-dispcalGUI-apply-profiles.desktop
/home/ron/.config/autostart
/home/ron/.config/autostart/fixmouse.desktop
/usr/lib/vmware/share/icons/hicolor/16x16/actions/vmware-manage-autostart-vms.png
/usr/lib/vmware/share/icons/hicolor/22x22/actions/vmware-manage-autostart-vms.png
/usr/lib/vmware/share/icons/hicolor/24x24/actions/vmware-manage-autostart-vms.png
/usr/lib/vmware/share/icons/hicolor/32x32/actions/vmware-manage-autostart-vms.png
/usr/lib/vmware/share/icons/hicolor/48x48/actions/vmware-manage-autostart-vms.png
/usr/share/gdm/autostart
/usr/share/gdm/autostart/LoginWindow
/usr/share/gdm/autostart/LoginWindow/libcanberra-ready-sound.desktop
/usr/share/gdm/autostart/LoginWindow/spice-vdagent.desktop
/usr/share/gdm/greeter/autostart
/usr/share/gdm/greeter/autostart/caribou-autostart.desktop
/usr/share/gdm/greeter/autostart/orca-autostart.desktop
/usr/share/gnome/autostart
/usr/share/gnome/autostart/libcanberra-login-sound.desktop

dobbi
20th December 2014, 06:10 AM
Well I can't help you with autostart anymore, I don't know what is happening, but if you want to fix your mouse you have other options.

Mouse fix:

e.g.:

Xorg conf.d (not tested)

$ cat /usr/share/X11/xorg.conf.d/50-vmmouse.conf
Section "InputClass"
Identifier "vmmouse"
MatchIsPointer "on"
MatchTag "vmmouse"
Driver "vmmouse"
EndSection

UDEV rules (not tested)

Collecting the data to use in the rule.

$ udevadm info -a -p /sys/class/input/mouse0
.
.
.
looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:04F2:0838.0001/input/input4':
KERNELS=="input4"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{name}=="USB Optical Mouse"
ATTRS{phys}=="usb-0000:00:1a.0-1.2/input0"
ATTRS{uniq}==""
ATTRS{properties}=="0"
.
.
.

Writing the rule

echo 'KERNEL=="input4", SUBSYSTEMS=="input", ATTRS{name}=="USB Optical Mouse", ATTRS{phys}=="usb-0000:00:1a.0-1.2/input0", RUN+="/home/ron/fixmymouseplease.sh"' > /etc/udev/rules.d/81-mousefix.rules

The places where you can put those are in the man pages for udev

man -Hgoogle-chrome udev &

/etc/udev/rules.d is the highest priority from what I read.

Writing UDEV rules.

http://hackaday.com/2009/09/18/how-to-write-udev-rules/
http://reactivated.net/writing_udev_rules.html
https://www.redhat.com/magazine/002dec04/features/udev/
https://wiki.archlinux.org/index.php/Udev

rbmorse
20th December 2014, 06:23 AM
No, I got the mouse fix going per the suggestion I received in the other thread on that specific issue.

The xinput change statement goes in a standard bash script.. The bash script goes anywhere that's convenient. A desktop launcher placed in ~/.config/autostart runs the script when the user session starts. It works fine, even if i don't understand all the underlying mechanics.

Back in the old days I'd just add the xinput statement to /etc/rc.local and that would be that, but I guess we have progress, now.

This way isn't too different, but I've found that the .desktop launcher files are _extremely_ sensitive about form and syntax. The thing that's missing is the gnome utility to generate new launchers like we used to have. I miss that one.