You are not logged in.

#1 2009-04-24 08:33:34

cb474
Member
Registered: 2009-04-04
Posts: 476

Running syndaemon at startup in .xinitrc not working

I'm trying to run syndaemon so I can set my touchpad to turn off when typing. I'm using the command:

syndaemon -i 1 -d

If I issue this after logging into Gnome in a terminal, it works fine and I can see the syndaemon process running in System Monitor.

But if I add the command to my .xinitrc it doesn't work. I followed the instructions in the wiki, to no avail. I also found that another command I wanted to issue in .xinitrc ("xset -dpms") to solve a different problem with gnome-power-manager wasn't working either. I got that to work by issuing the command as a startup program in Gnome's Starup Applications gui.

Anyway, I guess I could do the same thing with syndaemon, but I'm wondering why it's not working in .xinitrc, as it's supposed to. Thanks for any help.

Offline

#2 2009-04-24 08:44:18

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Running syndaemon at startup in .xinitrc not working

You can set your touchpad on and off by using something like "synclient TouchPad 0" (look up the exact syntax)

Offline

#3 2009-04-24 09:04:39

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

Wilco: I think it's pretty clumsy to turn your touchpad on and off everytime.

What syndaemon does is temporarily disable the touchpad during keyboard activity. You can set the amount of seconds the touchpad gets/stays disabled after the last registered keystroke.

cb474: Why don't you drop that line in the GUI Gnome offers for it, just like you did with the xset line?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2009-04-24 09:16:46

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

B wrote:

cb474: Why don't you drop that line in the GUI Gnome offers for it, just like you did with the xset line?

I guess I'll try that. I'm just wondering why executing commands in .xinitrc isn't working, since that's how the Arch wiki says to do it. You know, is something wrong with my X setup? Alternatively, if that no longer works, should the wiki be edited?

Offline

#5 2009-04-24 09:24:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Running syndaemon at startup in .xinitrc not working

syndaemon in .xinitrc works here - I know that doesn't help you, I'm saying it just in case anyone's rushing off to edit the wiki. smile

syndaemon only starts if the X server is already running - again, probably not much use to you, as X starts before .xinitrc is run.

Offline

#6 2009-04-24 09:30:16

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Running syndaemon at startup in .xinitrc not working

B wrote:

Wilco: I think it's pretty clumsy to turn your touchpad on and off everytime.

Aha I thought he meant turn it off ondemand cool

Offline

#7 2009-04-24 09:38:39

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

You can create a udev rule that does something similar - I have one that turns off my touchpad when my Bluetooth mouse connects - but then again I guess you don't like that huh tongue.

Btw - ~/.xinitrc works fine here too, but this is in Openbox. Dunno how it gets called in Gnome (.xinitrc launches Openbox and everything else for me).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2009-04-24 11:19:59

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Thanks for the different suggestions. I remain perplexed. .xinitrc launches Gnome for me. But as I've mentioned, other commands don't seem to run. Oh well, maybe it's not worth worrying about if Startup Applications in Gnome does the trick. Although I suppose it would be worth knowing if this is just my system or true for Gnome in general, because in the latter case it seems like the wiki entry about syanptics touchpads ought to have a note mentioning this.

Last edited by cb474 (2009-04-24 11:22:48)

Offline

#9 2009-04-24 12:52:24

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Running syndaemon at startup in .xinitrc not working

Are you running GDM? In that case .xinitrc is ignored

Offline

#10 2009-04-24 13:04:41

flowheat
Member
From: Pittsburgh, PA
Registered: 2008-09-23
Posts: 94

Re: Running syndaemon at startup in .xinitrc not working

Just two really quick mistakes I've made in the past regarding .xinitrc.

Make sure you have an & after the command to make it run in the background.

Make sure that the exec gnome-session or whatever it is for gnome is the last command that is ran.  Any commands put after that won't run until gnome closes.

Anyway without more information from you(like posting your .xinitrc) that's about the best guesses I can make.

Offline

#11 2009-04-24 14:01:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Running syndaemon at startup in .xinitrc not working

syndaemon with the -d flag runs as a daemon in the background, so the & is not necessary.

Offline

#12 2009-04-24 21:05:01

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Thanks for the suggestions. I tried it with the & and the -d, but it didn't work. My .xinitrc is very simple

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

syndaemon -i 1 -d
xset -dpms

# exec xterm
exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

Again, I also tried the syndaemon line with the &, to no avail. I am using GDM, so if what Wilco says is correct then that would explain why this doesn't work.

Offline

#13 2009-04-25 05:49:08

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

Try specifying those lines after the exec gnome-session line maybe? You won't quite be able to run all that stuff without being logged in, will you?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#14 2009-04-25 06:00:06

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Thanks. I tried that already and it didn't work. Perhaps because, as flowheat says above, any commands set to execute after gnome starts won't be run until gnome closes. The wiki is also pretty specific that the lines need to come before the window manager is started. Still, I did try that anyway.

Offline

#15 2009-04-25 06:31:59

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

Ok... I stand corrected then. I guess technically one is already logged in from the moment .xinitrc is called, then. I have all my stuff in xinitrc launched after the call to openbox-session.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#16 2009-04-25 09:20:56

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Thanks again though. I appreciate your (and everyone's) efforts to help me figure out what the deal is with .xinitrc and Gnome.

I did just find in this Ubuntu forums post (http://ubuntuforums.org/showthread.php?t=146725) someone issuing the syndaemon command in this way:

exec /usr/bin/syndaemon -d -i 1

And this way:

/usr/bin/syndaemon -d -i 1

I think I'll try this next in .xinitrc and report back if it works or not.

Offline

#17 2009-04-25 09:34:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,673
Website

Re: Running syndaemon at startup in .xinitrc not working

I have this in my .xinitrc:

syndaemon -t -i 1 &

and it appears to work...  I don't use the -d.

Offline

#18 2009-04-25 09:59:02

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Thanks. As mentioned above, I already tried that (and I tried both & and -d). Are you using GDM and/or Gnome?

Last edited by cb474 (2009-04-25 10:03:47)

Offline

#19 2009-04-25 11:05:50

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

Could you try with SLiM just for the sake of it cb474? If it works then we know this is a GDM peculiarity... I don't know why GDM would parse the exec line for gnome-session but nothing else.

Are you sure GDM parses your .xinitrc at all? I'd think it just launches the default session - which might be preset to launch Gnome?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#20 2009-04-25 11:16:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,673
Website

Re: Running syndaemon at startup in .xinitrc not working

cb474 wrote:

Thanks. As mentioned above, I already tried that (and I tried both & and -d). Are you using GDM and/or Gnome?

No slim and XFCE...

Offline

#21 2009-04-25 19:22:52

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

B wrote:

Could you try with SLiM just for the sake of it cb474? If it works then we know this is a GDM peculiarity... I don't know why GDM would parse the exec line for gnome-session but nothing else.

Are you sure GDM parses your .xinitrc at all? I'd think it just launches the default session - which might be preset to launch Gnome?

Okay, I'll see if I can do this later. A little busy this weekend. I know that GDM reads .xinitrc enough to know to launch Gnome. Above, Wilco has already said that GDM ignores .xinitrc. Maybe it only looks to see which DE to launch?

Last edited by cb474 (2009-04-25 19:23:08)

Offline

#22 2009-04-25 19:32:58

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Running syndaemon at startup in .xinitrc not working

How do you explain it ignoring all lines in there except for your exec gnome-session line? I don't think it's as simple as that...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#23 2009-04-26 09:22:45

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

B wrote:

How do you explain it ignoring all lines in there except for your exec gnome-session line? I don't think it's as simple as that...

I have no explanation for it whatsoever. If I did, I wouldn't be asking here. All I know is that I have to put the command for GDM to start Gnome in .xinitrc, otherwise Gnome won't launch. So .xinitrc works for that. But other commands in .xinitrc are not executed (following the procedure outlined in the wiki, as well as trying other suggestions here). That may be weird. But it is in fact happening on my system. Anyway, I'll have to fiddle with Slim, later when I have time, and a couple other ideas and see if that sheds any light on it.

Last edited by cb474 (2009-04-26 09:24:04)

Offline

#24 2009-04-27 08:48:06

cb474
Member
Registered: 2009-04-04
Posts: 476

Re: Running syndaemon at startup in .xinitrc not working

Okay, I tried slim and it did execute the xset and syndaemon commands from .xinitrc.

Then in a Google search this old post from the Arch forums turned up, from way back in 2003: http://bbs.archlinux.org/viewtopic.php?id=726. At the end Xentac explains that GDM does in fact only look to .xinitrc for what window manger to start and ignores everything else (which of course is also what Wilco says above).

Xentac wrote:

If you choose the option to load fluxbox, that's all it will do.  It won't load anything in .xinitrc or .xsession.

There should be a Session option in gdm.  Add fluxbox to the end of your .xsession (so it should now look exactly like your .xinitrc) and choose the Session option in gdm.

Gdm assumes that your window manager will do all the auto-loading stuff (like gnome and kde do) so if it doesn't there isn't an easy way to add it, apart from hacking up the gdm menu item scripts (if you wanted to they're in like /etc/gdm/Session.d or something).

So I guess using the startup applications gui in Gnome is the right way to do it. Unless anyone objects, I'm going to add a note to the wiki. Reading around, it seems like it might be possible to somehow execute startup processes with GDM reading a .xession file, but I didn't really get it.

*

Curiously, when I was using Slim it solved a different bug I was having, with my brightness getting dimmed after every shutdown. So at least now I know it's gdm that's doing that. And once again I've learned that I'm more likely to turn up relevant Arch forum posts with google searches than with the Arch forum search function.

*

And thanks again to everyone for their suggestions and ideas about how to address this issue.

Offline

Board footer

Powered by FluxBB