You are not logged in.

#1 2011-06-30 18:18:37

northerw
Member
Registered: 2011-06-12
Posts: 33

[SOLVED]Problem adding startup commands

I can't seem to have a couple commands starting automatically. I've searched around alot and couldn't find anything helpful eith my issue.

I've been using "gnome-session-properties" and .xinitrc to add these two commands (xbindkeys, and a xinput mapping for my 'weird' acer touchpad/mediakeys) but they do not seem to start with the session. If i put them in in the console everything works fine so it's not an error in them.

Any help would be greatly appreciated.
Thanks in advance

PS I read somewhere that shortcuts (as in *.desktop) can be created to get programs starting at boot but since the xinput command is quite long i don't really know if this is the case.

Edit: I'm using GNOME3 with GDM as DE.

Last edited by northerw (2011-07-01 10:37:55)

Offline

#2 2011-06-30 19:36:15

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [SOLVED]Problem adding startup commands

A note: GDM is your display manager and GNOME3 is your DE. GDM sources your ~/.xprofile on startup - try adding the commands there.

Last edited by roygbiv (2011-06-30 19:37:00)

Offline

#3 2011-06-30 19:44:59

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

Thanks for your answer, sadly there is no .xprofile in my home, should i create it?
Also, so gdm is why gnome-session-properties isn't working either?

Offline

#4 2011-06-30 20:01:55

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [SOLVED]Problem adding startup commands

Just create it. GDM shouldn't have anything to do with gnome-session-manager.

Offline

#5 2011-06-30 20:06:26

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

K, gonna try it right now. Even though i cannot understant why it doesn't work when set in gnome-session-properties :S

Offline

#6 2011-06-30 20:24:35

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

Okies, i just tried putting them in .xprofile and definately something happened, unluckily it wasn't what i was hoping for. Every key i pressed had the same result of only opening banshee (the player of my choice) and not controlling it, even causing errors.
I repeat, if i put manually the commands in the terminal they work just fine. This is getting just crazy hmm

Here are the commands i wish to have autostarting:
xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16
xbindkeys

Offline

#7 2011-06-30 20:31:07

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [SOLVED]Problem adding startup commands

northerw wrote:

Here are the commands i wish to have autostarting:
xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16
xbindkeys

GDM is running commands it seems, but they are somehow wrong i guess. Is it a typo in the first line? Try running them in the background:

xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16 &
xbindkeys &

Last edited by roygbiv (2011-06-30 20:34:45)

Offline

#8 2011-06-30 21:19:43

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

Tried it, same odd behaviour even in background. I don't get it sad
There should'nt be any typo, i dind't write them interely, just had them saved since when i used 'em with openbox debian other distros; never had this issue tho.

Offline

#9 2011-06-30 21:46:35

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [SOLVED]Problem adding startup commands

Then I don't know. hmm Try using putting the commands in ~/.xsession. Or using your ~/.xinitrc instead by sourcing it from ~/.xprofile. See https://wiki.archlinux.org/index.php/Xprofile.

Last edited by roygbiv (2011-06-30 21:47:47)

Offline

#10 2011-06-30 21:55:09

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

I will check it.
Thanks anyways for your help. I hope i'll get it solved one way or another.

Offline

#11 2011-07-01 10:32:47

northerw
Member
Registered: 2011-06-12
Posts: 33

Re: [SOLVED]Problem adding startup commands

I had it finally working. I honestly didn't understand why, but putting the following script (after obviously mading it executable) in the startup programs through gnome-session-properties worked.

If someone could explain why i'd be glad, in the meantime i'm marking this topic as solved.

Here is the working script:
mediakeys.sh

## Acer media keys
(sleep 10s && xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16) &

## Xbindkeys
(sleep 10s && xbindkeys) &

Offline

Board footer

Powered by FluxBB