LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Sabayon (https://www.linuxquestions.org/questions/sabayon-86/)
-   -   new Sabayon 13.04 install: Can't get GPM to start as a service... {systemd} (https://www.linuxquestions.org/questions/sabayon-86/new-sabayon-13-04-install-cant-get-gpm-to-start-as-a-service-%7Bsystemd%7D-4175466154/)

jtwdyp 06-15-2013 01:59 PM

new Sabayon 13.04 install: Can't get GPM to start as a service... {systemd}
 
I've got a newly installed copy of Sabayon_Linux_13.04_amd64_Xfce.iso. And I can start a
volatile GPM session with:

Code:

# gpm -m /dev/input/mice -t ps2
It works like a charm, but it's a PITA to always have to type it into a "root" command shell.

So I checked that /dev/input/mice & ps2 were uncommented in /etc/conf.d/gpm
and used
Code:

rc-update add gpm default
But after rebooting GPM didn't start...

Next I tried:
Code:

/etc/init.d/gpm start
But it just says:
Code:

* WARNING: gpm is already starting
But it hadn't and doesn't... Then I figured that the problem might have something to do with Sabayon devs phasing in systemd... So I:
Code:

rc-update delete gpm default
to remove gpm from the runlevel based service control and started looking for help wiyh systemd methods. In a thread about changing the default.target, TobiSGD suggested:
Quote:

adding GPM to the current running target is done with
Code:

systemctl enable gpm.service
If you just want to start it without adding it to the current target try
Code:

systemctl start gpm.service

But when I try:
Code:

/etc
UnderTree=-> systemctl start gpm.service
Failed to issue method call: Unit gpm.service failed to load: No such file or directory. See system logs and 'systemctl status gpm.service' for details.
 /etc
UnderTree=->

At this point I thought what the heck. I've got several examples of what a systemd service file look like. So I thought I'd try to make one...

Quote:

Originally Posted by /usr/lib/systemd/system/gpm.service
Code:

[Unit]
Description=General Purpos Mouse: console mouse service

[Service]
Type=simple
ExecStart=/usr/sbin/gpm -m /dev/input/mice -t ps2
ExecStop=/usr/sbin/gpm -k


But it didn't work... Not even after a reboot...
How can I get a usable gpm.service file???

TobiSGD 06-16-2013 07:20 AM

This is the one from the Arch package for GPM:
Code:

[Unit]
Description=Virtual console mouse server

[Service]
Type=forking
ExecStart=/usr/bin/gpm -m /dev/input/mice -t imps2

[Install]
WantedBy=multi-user.target


jtwdyp 06-16-2013 12:46 PM

Now THAT worked. Thanks TobiSGD...
 
I modified my gpm.service file with the :
Code:

[Service]
Type=forking

And the :
Code:

[Install]
WantedBy=multi-user.target

from the example you provided...

And suddenly systemctl could start and stop and/or enable gpm.service

Thank You!


All times are GMT -5. The time now is 02:42 PM.