iberianpig / xSwipe

Multitouch gestures with synaptics driver on X11, Linux
452 stars 56 forks source link

Can not determine session name on debian with gnome3 #9

Open pdavydov108 opened 10 years ago

pdavydov108 commented 10 years ago

Hi! Thanks for your work, xSwipe is cool. I'm trying it on debian now with a patched synaptics driver (https://github.com/felipejfc/xserver-xorg-input-synaptics). Unfortunately, xSwipe is not able to detect gnome environment, session name is always set to 'other'. Is it a bug, or should I install some package to fix it? My gnome session version is 3.8.4

iberianpig commented 10 years ago

Hi @pdavydov108, Thank you for telling the issue! Please run code below, pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g' xSwipe is using this output as session-name detecting. If the output is no display, it must be detect as 'other'.

pdavydov108 commented 10 years ago

Yeah, this command really outputs nothing for me, and the session name is set to 'other'. But is it correct? I'm using gnome in fact.

iberianpig commented 10 years ago

Please run code below, echo $DESKTOP_SESSION and tell me the output.

pdavydov108 commented 10 years ago

It's output is "default"

Henry78 commented 10 years ago

Same problem here with arch linux and gnome 3.10

$ pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g'
537 gnome-session
$ echo $DESKTOP_SESSION
gnome

xSwipe tries to split the reported session in line 94 and afterwards the string is empty. I fixed it locally, but don't know if this breaks other systems:

94c94
< my $sessionName = (split "-session", (split" ", $data[0])[1])[0];
---
> my $sessionName = (split "session=", $data[0])[1];
pdavydov108 commented 10 years ago

@Henry78, you code doesn't work for me as well, it seems that I don't have gnome-session running at all.. The only way that I was able to find to detect my desktop environment is to check $XDG_DATA_DIRS variable, as it is described here http://unix.stackexchange.com/questions/116539/how-to-detect-the-desktop-environment-in-a-bash-script.

mscalone commented 10 years ago

I have the same problem. On Ubuntu 14.04 using Unity. Command outputs:

~$ pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g'
 1903 gnome-session
~$ echo $DESKTOP_SESSION
ubuntu
iberianpig commented 10 years ago

Sorry for late reply. Please check below code and tell me the output and whether it is right desktop environment.

if [ "$XDG_CURRENT_DESKTOP" = "" ]
then
  desktop=$(echo "$XDG_DATA_DIRS" | sed 's/.*\(xfce\|kde\|gnome\).*/\1/')
else
  desktop=$XDG_CURRENT_DESKTOP
fi

desktop=${desktop,,}  # convert to lower case
echo "$desktop"
ozank commented 9 years ago

On Ubuntu14.04 it gives: unity but couldn't run the XSwipe on Ubuntu even with the patched synaptics driver

A-Shahbazi commented 9 years ago

I have a similar issue on ubuntu 14.04 x64(I could compile the modified synaptics driver and run the script but it seems my session is detected as 'other') I confirm both @ozank and @mscalone outputs on ubuntu 14.04.

mscalone commented 8 years ago

Hello people, FYI y upgraded to Ubuntu 15.10 this modified driver didn't compiled. I found a fork that work: https://github.com/Chosko/xserver-xorg-input-synaptics