You are not logged in.

#26 2005-11-28 16:48:12

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

AndyRTR wrote:
[andyrtr@workstation keytouch]$ keytouchd
LibMXml: Could not open the XML document.
keytouchd: '/etc/keytouch/current_keyboard.xml' is invalid
[andyrtr@workstation keytouch]$

I think I have to configure the keyboard type first using keytouch-editor. I haven´t done that so far. I´m waiting for the integrated pkgbuild.

Not keytouch-editor! You first have to tell keyTouch what keyboard you are using. So first run "keytouch" and you will be asked for chosing your keyboard.

Offline

#27 2005-11-28 16:54:26

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

keytouchd will be started when the user starts an X-session. It grabs the extra function keys and excutes the action for the pressed key defined by the user.
If you get an error like:

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  7
  Current serial number in output stream:  68 

another program is grabbing one of the extra function keys. So check if programs like Xbindkeys are running or you configured GNOME or KDE to grab one of the keys.

Packager: please hold on the packager-howto will be published within an hour.

Offline

#28 2005-11-28 17:32:21

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

The packagers howto is available at: http://keytouch.sourceforge.net/keytouc … ers-howto/

Offline

#29 2005-11-28 17:34:04

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

MarvinR wrote:

keytouchd will be started when the user starts an X-session. It grabs the extra function keys and excutes the action for the pressed key defined by the user.
If you get an error like:

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  7
  Current serial number in output stream:  68 

another program is grabbing one of the extra function keys. So check if programs like Xbindkeys are running or you configured GNOME or KDE to grab one of the keys.

Packager: please hold on the packager-howto will be published within an hour.

Yeah, I did configure some of the function keys in kde some time ago (but I'm using gnome right now)
Do you know how I can fix this problem without fully uninstalling KDE? big_smile

Offline

#30 2005-11-28 17:57:05

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

mouse256 wrote:
MarvinR wrote:

keytouchd will be started when the user starts an X-session. It grabs the extra function keys and excutes the action for the pressed key defined by the user.
If you get an error like:

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  7
  Current serial number in output stream:  68 

another program is grabbing one of the extra function keys. So check if programs like Xbindkeys are running or you configured GNOME or KDE to grab one of the keys.

Packager: please hold on the packager-howto will be published within an hour.

Yeah, I did configure some of the function keys in kde some time ago (but I'm using gnome right now)
Do you know how I can fix this problem without fully uninstalling KDE? big_smile

If KDE isn't running there won't be a problem. Maybe GNOME grabs some keys by default (check your "Keyboard Shortcuts" configuration).

Offline

#31 2005-11-28 20:00:58

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: making pkgbuild for keytouch

MarvinR wrote:

The packagers howto is available at: http://keytouch.sourceforge.net/keytouc … ers-howto/

Thank you for taking the time to register to this forum and answering our questions. I have read the packagers howto and it answered all the questions I was having. Hopefully, I'll have a working package tonight. smile

Offline

#32 2005-11-29 06:44:56

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: making pkgbuild for keytouch

For some reason, the /etc/X11/Xsession.d/40keytouchd script isn't executed.  It looks like the scripts in /etc/X11/Xsession.d are not sourced at all.  There was only one script there and it was for a SysV init system while Arch use BSD style init.  :? However, putting

keytouchd &

in your ~/.xinitrc (or ~/.xsession) solves that issue.

Below is the current PKGBUILD with daemon script. Let me know how they work.  If everything is OK, I'll submit this to the AUR (with maybe a .install file informing to put keytouchd in .xinitrc). BTW, the Aumixer plugin work fine here.

pkgname=keytouch
pkgver=2.0.0
pkgrel=1
pkgdesc="A program which allows you to easily configure the extra function keys of your keyboard"
depends=('gtk2' 'gksu')
source=(http://dl.sourceforge.net/keytouch/$pkgname-$pkgver.tar.gz keytouch 
        http://dl.sourceforge.net/keytouch/keytouch-editor-2.0.2.tar.gz 
        http://dl.sourceforge.net/keytouch/keytouch-amixer_plugin-1.0.tar.gz)
md5sums=('a7a22320707b887b1c5dedb77d2cf3e6' 'c16fbda7e753cccab5fea2682cb47f51'
         'da03fef05570cc5e1d49d00f7b15c810' 'be0c9cea666a02ec58f4f43830c3b659')
url="http://keytouch.sourceforge.net/"

build() {
  cd $startdir/src/$pkgname-2.0
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  #script check if Xsession directory exists, so create it
  mkdir -p $startdir/pkg/etc/X11/Xsession.d
  mkdir $startdir/pkg/etc/rc.d
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/$pkgname-2.0/keytouch-config
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/$pkgname-2.0/keytouch-keyboard
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/'keytouch-editor 2.0'
  make || return 1
  install -m755 $startdir/src/'keytouch-editor 2.0'/keytouch-editor $startdir/pkg/usr/bin/keytouch-editor

  cd $startdir/src/amixer
  make || return 1
  install -D -m755 amixer.so $startdir/pkg/usr/share/keytouch/plugins/amixer.so

  rm $startdir/pkg/etc/rc.d/keytouch-init.sh
  install -m755 $startdir/src/keytouch $startdir/pkg/etc/rc.d/keytouch

  mkdir -p $startdir/pkg/usr/share/applications

  echo '[Desktop Entry]
Name=keyTouch
Comment=Keyboard configuration tool
Icon=/usr/share/keytouch/pixmaps/icon.png
Exec=/usr/bin/keytouch
Terminal=false
Type=Application
Categories=Application;Accessories
StartupNotify=false' > $startdir/pkg/usr/share/applications/keytouch.desktop
}
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting keyTouch Daemon"
    /usr/bin/keytouch-init
    if [ $? -gt 0 ]; then
      stat_fail
    else
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping keyTouch Daemon"
    stat_done
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

Offline

#33 2005-11-29 08:09:28

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

Snowman wrote:

For some reason, the /etc/X11/Xsession.d/40keytouchd script isn't executed.  It looks like the scripts in /etc/X11/Xsession.d are not sourced at all.  There was only one script there and it was for a SysV init system while Arch use BSD style init.  :? However, putting

keytouchd &

in your ~/.xinitrc (or ~/.xsession) solves that issue.

No, you should put "keytouchd &" in /etc/X11/Xsession. This is described here:
http://keytouch.sourceforge.net/keytouc … ode15.html
Yes, my make install script checks if /etc/X11/Xsession.d/ exists, because when it exists the scripts in it will probably be executed. If this directory does not exist the "keytouchd &" line will be add to the beginning of /etc/X11/Xsession. So do not mkdir /etc/X11/Xsessions.d/.

Offline

#34 2005-11-29 08:39:39

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

MarvinR wrote:

Yes, my make install script checks if /etc/X11/Xsession.d/ exists, because when it exists the scripts in it will probably be executed. If this directory does not exist the "keytouchd &" line will be add to the beginning of /etc/X11/Xsession. So do not mkdir /etc/X11/Xsessions.d/.

It's a bit different in a PKGBUILD, it doesn't create /etc/X11/Xsession.d/ , but it creates that directory inside another directory, where the whole package is made.  Afterwards all files from that directory are zipped, and when you install it, the files are just copied.
So you can change de PKGBUILD not to create the $startdir/pkg/etc/X11/Xsession.d, but the the script will fail.  You should at least create $startdir/pkg/etc/X11 , then I guess the script will add keytouchd & to the Xsession file.  But still then it won't work, as when pacman would install the pkgbuild, the original /etc/X11/Xsession file might exist on the filesystem, and pacman will produce an error.
I don't know how to fix it, do you know Snowman?
Anyway I think the /etc/X11/ directory can better be removed from the package as these file won't work (or someone should find a solution to add a line to a file during "pacman -A")

Besides that it also didn't work here when I added "keytouchd &" to the /etc/X11/Xsession file (or I might have made a misstake), but adding "keytouchd &" to ~/.xinitrc did do the trick, now it works :-)
(although keytouch stays complaining about the X_grabkey error)

btw:

Categories=Application;Accessories 

in the desktop entry section should be replaced by:

Categories=Application;Utility;

(this creates a shortcut in the Accessories section in gnome, the first code block created a link in a section called "Other"

btw2: thank you snowman for fine-tuning my first PKGBUILD, it wouldn't have worked without you wink

Offline

#35 2005-11-29 09:52:23

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

mouse256 wrote:
MarvinR wrote:

Yes, my make install script checks if /etc/X11/Xsession.d/ exists, because when it exists the scripts in it will probably be executed. If this directory does not exist the "keytouchd &" line will be add to the beginning of /etc/X11/Xsession. So do not mkdir /etc/X11/Xsessions.d/.

It's a bit different in a PKGBUILD, it doesn't create /etc/X11/Xsession.d/ , but it creates that directory inside another directory, where the whole package is made.  Afterwards all files from that directory are zipped, and when you install it, the files are just copied.
So you can change de PKGBUILD not to create the $startdir/pkg/etc/X11/Xsession.d, but the the script will fail.  You should at least create $startdir/pkg/etc/X11 , then I guess the script will add keytouchd & to the Xsession file.  But still then it won't work, as when pacman would install the pkgbuild, the original /etc/X11/Xsession file might exist on the filesystem, and pacman will produce an error.
I don't know how to fix it, do you know Snowman?
Anyway I think the /etc/X11/ directory can better be removed from the package as these file won't work (or someone should find a solution to add a line to a file during "pacman -A")

Besides that it also didn't work here when I added "keytouchd &" to the /etc/X11/Xsession file (or I might have made a misstake), but adding "keytouchd &" to ~/.xinitrc did do the trick, now it works :-)
(although keytouch stays complaining about the X_grabkey error)

btw:

Categories=Application;Accessories 

in the desktop entry section should be replaced by:

Categories=Application;Utility;

(this creates a shortcut in the Accessories section in gnome, the first code block created a link in a section called "Other"

btw2: thank you snowman for fine-tuning my first PKGBUILD, it wouldn't have worked without you wink

It is strange that adding the line to Xsession does not work. I know someone using keyTouch on ArchLinux but he didn't complain about this.

About the XKeyGrab error:
Run the program xev and press all your extra function keys. The key that does not produce a Key Press (and a Release) event is grabbed by another program.

Offline

#36 2005-11-30 11:17:17

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

mouse256 wrote:

Besides that it also didn't work here when I added "keytouchd &" to the /etc/X11/Xsession file (or I might have made a misstake), but adding "keytouchd &" to ~/.xinitrc did do the trick, now it works :-)

Did you put the line at the beginning of Xsession?

Offline

#37 2005-11-30 11:27:36

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

Yes, as I still had to create te Xsession file.
Maybe I did something wrong, I will try it again (but now I'm not on my linux box)

Offline

#38 2005-12-06 17:28:06

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

Again the following lines should be removed:

#script check if Xsession directory exists, so create it
mkdir -p $startdir/pkg/etc/X11/Xsession.d 

Offline

#39 2005-12-06 17:48:33

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

MarvinR wrote:

Again the following lines should be removed:

#script check if Xsession directory exists, so create it
mkdir -p $startdir/pkg/etc/X11/Xsession.d 

If you remove that line the makepkg command will fail. you should at least leave the command

mkdir -p $startdir/pkg/etc/X11/

, but this will cause the pacman -A command to fail it the Xsession file already exists on the filesystem.

But besides that, I can't get keytouch to work sad
It does work when I add keytouchd& to ./xinitrc , and then manually run startx.  But when I start x through GDM, it doesn't work.  Also putting keytouchd& in Xsession also doesn't work.
I think I'm gonna search another way to make my function keys work sad

Offline

#40 2005-12-06 20:20:34

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: making pkgbuild for keytouch

It seems that the scripts in /etc/X11/Xsession.d are not executed. I wanted to talk to a dev on IRC about that but didn't had time yet.

About gdm, try putting  keytouchd& in ~/.xsession (create the file if it doesn't exist. xdm uses ~/.xsession instead of ~/.xinitrc. Maybe gdm use ~/.xsession too. :?

Offline

#41 2005-12-06 20:48:35

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

putting it into ~/.xsession also doesn't work.

When I start gdm, launch a failsafe terminal, type keytouchd&, it works.

I think I'll just drop this program, there must be another way to get my buttons working

Offline

#42 2005-12-06 21:33:22

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: making pkgbuild for keytouch

mouse256 wrote:

I think I'll just drop this program, there must be another way to get my buttons working

OK. Try lineakd (pacman -S lineakd).

Offline

#43 2005-12-07 18:05:52

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

mouse256 wrote:

putting it into ~/.xsession also doesn't work.

No you should put it in /etc/X11/Xsession. But if keytouchd cannot grab one of the keys it will exit and I think that is why it doesn't work for you.

Snowman wrote:

OK. Try lineakd (pacman -S lineakd).

Just like keytouch, lineak grabs your keys. And when another program is grabbing a key, lineak will also not be able to grab it.
On http://keytouch.sf.net/ you can read why you should use keytouch instead of lineak.

Offline

#44 2005-12-07 19:03:58

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

I modified keytouchd so that it continues when grabbing a key fails. This will solve the problem of mouse256.
You can download keytouch 2.0.1 from: http://prdownloads.sourceforge.net/keyt … z?download

Offline

#45 2005-12-08 12:51:17

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

MarvinR wrote:

I modified keytouchd so that it continues when grabbing a key fails. This will solve the problem of mouse256.
You can download keytouch 2.0.1 from: http://prdownloads.sourceforge.net/keyt … z?download

You're great, now it works perfectly :-p
All my function keys work with keytouch, only the volume-up and down are still grabbed by gnome.  But that's no problem, it works better if gnome grabs them (I'm still using OSS, and I couldn't get aumix to work with OSS)

I still have keytouch& in my .xinitrc file, I will try putting it in Xsession file later, I don't have time for this now.

here is the PKGBUILD (and you still need the keytouch deamon script from snowman)

pkgname=keytouch
pkgver=2.0.1
pkgrel=1
pkgdesc="A program which allows you to easily configure the extra function keys of your keyboard"
depends=('gtk2' 'gksu')
source=(http://dl.sourceforge.net/keytouch/$pkgname-$pkgver.tar.gz keytouch 
        http://dl.sourceforge.net/keytouch/keytouch-editor-2.0.2.tar.gz 
        http://dl.sourceforge.net/keytouch/keytouch-amixer_plugin-1.0.tar.gz)
md5sums=('873b5d15116acc34fbebae7c4cd70093' 'a5f5da2fd3485e59855c9c3cfa1f36e7'
         'da03fef05570cc5e1d49d00f7b15c810' 'be0c9cea666a02ec58f4f43830c3b659')
url="http://keytouch.sourceforge.net/"

build() {
  cd $startdir/src/$pkgname-2.0
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  #script check if Xsession directory exists, so create it
  mkdir -p $startdir/pkg/etc/X11/Xsession.d
  mkdir $startdir/pkg/etc/rc.d
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/$pkgname-2.0/keytouch-config
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/$pkgname-2.0/keytouch-keyboard
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install

  cd $startdir/src/'keytouch-editor 2.0'
  make || return 1
  install -m755 $startdir/src/'keytouch-editor 2.0'/keytouch-editor $startdir/pkg/usr/bin/keytouch-editor

  cd $startdir/src/amixer
  make || return 1
  install -D -m755 amixer.so $startdir/pkg/usr/share/keytouch/plugins/amixer.so

  rm $startdir/pkg/etc/rc.d/keytouch-init.sh
  install -m755 $startdir/src/keytouch $startdir/pkg/etc/rc.d/keytouch

  mkdir -p $startdir/pkg/usr/share/applications

  echo '[Desktop Entry]
Name=keyTouch
Comment=Keyboard configuration tool
Icon=/usr/share/keytouch/pixmaps/icon.png
Exec=/usr/bin/keytouch
Terminal=false
Type=Application
Categories=Application;Utility;
StartupNotify=false' > $startdir/pkg/usr/share/applications/keytouch.desktop
}

SNOWMAN: are you going to add this into aur?

Offline

#46 2005-12-09 03:05:43

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: making pkgbuild for keytouch

mouse256 wrote:

SNOWMAN: are you going to add this into aur?

Yes. Before to do so, I would like to find out why the scripts in /ect/X11/Xsession.d  aren't executed by xorg.

Offline

#47 2005-12-09 13:32:46

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

Snowman wrote:
mouse256 wrote:

SNOWMAN: are you going to add this into aur?

Yes. Before to do so, I would like to find out why the scripts in /ect/X11/Xsession.d  aren't executed by xorg.

Well it is very simple. When X starts a new session the /etc/X11/Xsession (yes without .d) script will be executed. Some distributions have the /etc/X11/Xsession.d/ directory containing some scripts. For those distros the Xsession script (not xorg) runs the scripts in Xsession.d/
I think using the Xsession.d/ directory is a better solution. However the Xsession script for Arch Linux does contain the code that runs the scripts in Xsession.d/. You should leave this as it is and add the line "keytouchd &" to the beginning of the Xsession script.
Note that when you create the Xsession.d directory, the make install thinks your distro excutes the scripts in this directory. So do not create the directory and put something in the post install script of the package that adds "keytouchd &" to the beginning of the /etc/X11/Xsession script (just like what was written in the keytouch packagers howto).

Offline

#48 2005-12-09 13:37:21

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: making pkgbuild for keytouch

that might explain a lot.

There was a /etc/X11/Xsession.d/ directory already on my system, but no Xsession file, so no file to execute the Xsession.d directory...

Offline

#49 2005-12-17 13:42:05

MarvinR
Member
Registered: 2005-11-28
Posts: 16

Re: making pkgbuild for keytouch

Snowman wrote:
mouse256 wrote:

SNOWMAN: are you going to add this into aur?

Yes. Before to do so, I would like to find out why the scripts in /ect/X11/Xsession.d  aren't executed by xorg.

I am sorry, I thought Arch Linux has no /etc/X11/Xsession.d/. Maybe another script than /etc/X11/Xsession calls the scripts in Xsession.d.
Note that the name of a script in this directory should begin with an integer (for the calling senquence). Name script "40keytouchd".
Does it work now?

Offline

#50 2005-12-23 23:23:19

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: making pkgbuild for keytouch

Something new? Does it work fine now? Will you bring it to AUR soon?

Offline

Board footer

Powered by FluxBB