Use the Superkey to open the menu

Post your tutorials and howtos here.
skin27
Posts: 5
Joined: 28 Jun 2013 08:45

Use the Superkey to open the menu

Postby skin27 » 27 Aug 2013 20:34

In most desktop environments like gnome, Cinnamon and Windows you can use the superkey (aka Windows key) to open and close the menu. In KDE this isn't the case (This is by design, think of multiple menu widgets, using the superkey in KDE apps etc. By default you need to use Alt+F1). For those who find the superkey more convenient you can still make it work in SolydK:

1) Open the Software Manager and install "lib-xsts-dev"

2) Download the tar.gz(source) of KSuperkey from KDE apps website:

http://kde-apps.org/content/show.php/ks ... ent=154569

3) Unpack it in the file system and open the unpacked directory in Dolphin

4) Use F4 to open the terminal and enter "make" to compile the source

5) Now open "System settings" and add the superkey program to autostart (System Settings -> Startup and Shutdown -> Autostart -> Add Program... -> Browse button -> select the ksuperkey application.)

After restart the Superkey should function normally.

User avatar
dv8tion242
Posts: 38
Joined: 04 Sep 2013 11:31

Re: Use the Superkey to open the menu

Postby dv8tion242 » 23 Sep 2013 22:31

Removing a basic function should not be by design.
I may not use Windows but i do use the ability in other distros because when typing it is faster to just hit one key then key combos.
A person's ability to change the function should not be removed. What should be there is 'some' functionality OOTB.

Kinda makes me wish for Win7. Because compiling from source is such a compelling way to say "Come use our friendly Desktop".

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 03:51

Thank you for posting this useful tip skin27. I'm sure most users would have no problems following your instructions. However, some people (like myself :oops:) have been able through several years to studiously avoid compiling from source. If it's not in the repos I generally manage to do without (or use Windows). This is mostly because most 'readme' files included are intended for people that know what they're doing and provide a daunting array of instructions.

I managed to follow your instructions as far as
skin27 wrote:3) Unpack it in the file system
I get headaches every time I look at the file system. I haven't yet learned, (and I have tried) what the 'bin' or 'etc' or 'proc' or' sbin' &etc. files actually hold. In which file would you recommend that I unpack the tarball?

The next bit that confuses me is
skin27 wrote:...enter "make" to compile the source
Is there anything that needs to be added after the 'make' command (like the 'tarball.gz' filename)?

I know these are very newbie questions but, as i said earlier, I don't have a good track record with tarballs. The couple that I've managed to install have provided extremely good instructions on how to compile them and even then I've probably put them somewhere they don't really belong. My 'trial and error' method has so far not managed to teach me anything other than I know nothing. :oops:

I really would appreciate your help to install this.

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 05:14

if it's a great software, why don't ask to community pacakges requests?
http://forums.solydxk.nl/viewforum.php?f=59

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 06:31

kyodev wrote:if it's a great software, why don't ask to community pacakges requests?
I don't know how good it is unless I install it. Catch-22 :D

But seriously, this has been the closest I've come to trying to install a tarball in a long time and I'm genuinely interested in learning how to do it. I've looked at several tutorials over the years but they always bog me down in technical verbosity. If I can nut this out, maybe I'll have a go at another one.

Who knows? One day I may be able to learn how to compile some of the packages for the forum. Gotta start somewhere. :lol:

PS: Please excuse my vernacular style of writing. I suspect it makes it difficult for you to interpret (that is certainly not my intention) but I've been doing it for so long I've forgotten how to express myself differently.

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 09:40

odo5435 wrote:I suspect it makes it difficult for you to interpret
yes, I never learn english at school ... :(
I'm genuinely interested in learning how to do it
yes, it is sometimes a little difficult to find the dependencies. for example ( YOU ARE NOT as root):

Code: Select all

sudo apt-get install build-essential  #tools for compile, to install once
#download to /home/user
mv 154569-ksuperkey-0.3.tar.gz ksuperkey-0.3.tar.gz
tar -xf ksuperkey-0.3.tar.gz 
cd ksuperkey-0.3
make
errors:
cc -Wall `pkg-config --cflags xtst x11` -o ksuperkey xcape.c `pkg-config --libs xtst x11` -pthread
Package xtst was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtst.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtst' found
Package xtst was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtst.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtst' found
xcape.c:31:35: fatal error: X11/extensions/record.h: Aucun fichier ou dossier de ce type
compilation terminated.
make: *** [ksuperkey] Erreur 1
the hunt start:

Code: Select all

#Package xtst was not found ... -> then (example)
apt search xtst
but before, you can RTFM :)
http://kde-apps.org/content/show.php/ks ... ent=154569

Code: Select all

sudo apt-get install gcc make libx11-dev libxtst-dev pkg-config
make
###     no errors   \o/
./ksuperkey
you have it , press supper key, and you see menu open

now, if you want learme more, go to tutorial, read [Howto] Packaging
http://forums.solydxk.nl/viewtopic.php?f=9&t=1138
and go to community pacakges proposal
http://forums.solydxk.nl/viewforum.php?f=58
and propose the soft and your deb :)

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 11:30

Thank you very much for taking the time to show me this kyodev
kyodev wrote:yes, it is sometimes a little difficult to find the dependencies.
That's what put me off in the first place! With one of the first tarballs I tried, I got caught in a dependency hell. Dependencies of dependencies of dependencies &etc. :shock: I then found .deb packages and was rescued from tarballs ever after (mostly ;) ).
kyodev wrote:but before, you can RTFM :)
I probably would have had I known the superkey could be used in this fashion (It was not an option I considered until reading this thread.) I might not have found the page you directed me to however.

I tried the code suggested in that page and this is what happened

Code: Select all

sudo apt-get install gcc make libx11-dev libxtst-dev pkg-config
[sudo] password for markate: 
Sorry, try again.
[sudo] password for markate: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version.
make is already the newest version.
pkg-config is already the newest version.
libx11-dev is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libxtst-dev : Depends: libxtst6 (= 2:1.2.1-1+deb7u1) but 2:1.2.2-1 is to be installed
E: Unable to correct problems, you have held broken packages.
markate@asuseeepc ~ $ 
What I make of this is that ibxtst6 version 2:1.2.1-1+deb7u1 is required and I have a newer version installed. Is this correct? I don't really want the superuser key so much that I replace newer software with older versions. And what will happen at the next update?

Let's just drop the whole thing. People wonder why average users avoid compiling from source. You really have to be dedicated to the cause.

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 12:00

after this first exercice, you can delete all, and go on:
https://github.com/hanschen/ksuperkey

there, it's little improvements and it's more simple, fast and modern with githib:
you are in your user home, you have installed build-essential gcc make libx11-dev libxtst-dev pkg-config:
git clone https://github.com/hanschen/ksuperkey.git
cd ksuperkey
make
you can also install it:

Code: Select all

sudo make install
make clean
it will installed and setting put in autostart.
you can uninstall it:

Code: Select all

sudo make uninstall

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 12:35

The following packages have unmet dependencies:
libxtst-dev : Depends: libxtst6 (= 2:1.2.1-1+deb7u1) but 2:1.2.2-1 is to be installed
curious, can you type:

Code: Select all

sudo apt-get install -f
sudo apt-get install libxtst-dev
if more an error:

Code: Select all

apt policy libxtst6
apt policy libxtst-dev

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 13:36

GitHub looks interesting. I'll definitely spend some time looking through it.

Before I read your final post I was working on the previous one. Because I've already typed out the response I'll post it now. I'll post the result of the apt-get commands shortly.

I thought we had it this time. :) Then this happened

Code: Select all

markate@asuseeepc ~/ksuperkey $ make
cc -Wall `pkg-config --cflags xtst x11` -o ksuperkey xcape.c `pkg-config --libs xtst x11` -pthread
Package xtst was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtst.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtst' found
Package xtst was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtst.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtst' found
xcape.c:32:35: fatal error: X11/extensions/record.h: No such file or directory
compilation terminated.
make: *** [ksuperkey] Error 1
markate@asuseeepc ~/ksuperkey $ 
I remembered that you had encountered this problem in your earlier post so I did

Code: Select all

markate@asuseeepc ~/ksuperkey $ apt search xtst
p   libxtst-dev                     - X11 Record extension library (development 
p   libxtst-doc                     - X11 Record extension library (documentatio
i   libxtst6                        - X11 Testing -- Record extension library   
p   libxtst6-dbg                    - X11 Record extension library (debug packag
markate@asuseeepc ~/ksuperkey $
I am now stumped (it means I don't know what to do - the term derives from cricket). Again. :(

I very much appreciate your patience and you taking the time to try and educate me but I do hope you realise that I'm only understanding somewhat less than 50% of what I'm doing. (And I am trusting that you are a very nice person who is not trying to take over my computer!! :lol: :lol: :roll: )

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 13:41

kyodev wrote:curious, can you type:
The result of all those commands is:

Code: Select all

markate@asuseeepc ~/ksuperkey $ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
markate@asuseeepc ~/ksuperkey $ sudo apt-get install libxtst-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libxtst-dev : Depends: libxtst6 (= 2:1.2.1-1+deb7u1) but 2:1.2.2-1 is to be installed
E: Unable to correct problems, you have held broken packages.
markate@asuseeepc ~/ksuperkey $ apt policy libxtst6
libxtst6:
  Installed: 2:1.2.2-1
  Candidate: 2:1.2.2-1
  Version table:
 *** 2:1.2.2-1 0
        100 /var/lib/dpkg/status
     2:1.2.1-1+deb7u1 0
        500 http://mirror.internode.on.net/pub/solydxk/debian/production/ testing/main i386 Packages
markate@asuseeepc ~/ksuperkey $ apt policy libxtst-dev
libxtst-dev:
  Installed: (none)
  Candidate: 2:1.2.1-1+deb7u1
  Version table:
     2:1.2.1-1+deb7u1 0
        500 http://mirror.internode.on.net/pub/solydxk/debian/production/ testing/main i386 Packages
markate@asuseeepc ~/ksuperkey $

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 14:07

apt policy libxtst-dev
libxtst-dev:
Installed: (none)
Candidate: 2:1.2.1-1+deb7u1
Version table:
2:1.2.1-1+deb7u1 0
500 http://mirror.internode.on.net/pub/solydxk/debian/production/ testing/main i386
you still have problem avec internode mirror :( you have only the stable version (wheezy)
I suggest you to select Usa ou Nld mirror,
apt-get update, apt-get update libxtst-dev
no other solutions

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 24 Sep 2013 15:39

kyodev wrote:you still have problem avec internode mirror :(
I sort of thought that when I saw it too. After the update I figured it wouldn't matter if I changed back to my ISP as I normally leave updating until a couple of weeks after the release to avoid just these sorts of problems. I wasn't expecting to be learning new tricks.

I've changed to the Dutch servers (and sacrificed 80% of download speed and am now being metered) and that has moved us further along. The end is in sight. I can feel it. Now we are at:

Code: Select all

markate@asuseeepc ~ $ git clone https://github.com/hanschen/ksuperkey.git
Cloning into 'ksuperkey'...
remote: Counting objects: 217, done.
remote: Compressing objects: 100% (122/122), done.
remote: Total 217 (delta 98), reused 211 (delta 93)
Receiving objects: 100% (217/217), 50.13 KiB | 0 bytes/s, done.
Resolving deltas: 100% (98/98), done.
Checking connectivity... done
markate@asuseeepc ~ $ cd ksuperkey
markate@asuseeepc ~/ksuperkey $ make
cc -Wall `pkg-config --cflags xtst x11` -o ksuperkey xcape.c `pkg-config --libs xtst x11` -pthread
markate@asuseeepc ~/ksuperkey $ make install
install -Dm 755 ksuperkey /usr/bin/ksuperkey
install: cannot create regular file ‘/usr/bin/ksuperkey’: Permission denied
make: *** [install] Error 1
markate@asuseeepc ~/ksuperkey $
I would love to finish this tonight but I am already long overdue to go to sleep and I must leave it here for the time being. I'll return in the morning to see what new dramas await in "The Saga of Trying to Install a Simple Keychange Using a Tarball". :lol:

Oh, and I'll definitely be lodging a ticket with Internode about their syncing issues. I'm now very curious about what is at the root of the problem. I've been avoiding it because I really don't know how to communicate with the technician I'll end up speaking with. Unfortunately, I've a busy day tomorrow so that probably won't happen till Thursday.

À plus tard!

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 24 Sep 2013 15:49

la nuit a été bonne ?
...install -Dm 755 ksuperkey /usr/bin/ksuperkey
it's my fault, I forgot sudo as for all install. thus

Code: Select all

sudo make install
the first time you need to start it with the command ksuperkey. theorically, it must start automally (at boot)

skin27
Posts: 5
Joined: 28 Jun 2013 08:45

Re: Use the Superkey to open the menu

Postby skin27 » 24 Sep 2013 17:59

+1 for the Github install method

As for the question about the Linux filesystem. In principle the filesystem in Linux is very clear and simple. Everything falls hierarchical under "/" (root). All directories hereunder are just names, but (based on old BSD standards) some directories have specific purposes by convention. These standards are now maintained by the Linux foundation (http://refspecs.linuxfoundation.org/fhs.shtml). This says:

Directory Description
bin Essential command binaries
boot Static files of the boot loader
dev Device files
etc Host-specific system configuration
lib Essential shared libraries and kernel modules
media Mount point for removeable media
mnt Mount point for mounting a filesystem temporarily
opt Add-on application software packages
sbin Essential system binaries
srv Data for services provided by this system
tmp Temporary files
usr Secondary hierarchy
var Variable data

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 25 Sep 2013 03:13

Oui, c'était une bonne nuit. Merci de demander.
kyodev wrote:it must start automatically I think
Not for me. So before I did anything else I did a re-start and that worked. My superkey now starts the KDE App Launcher.

Thank you very much for your time and your patience @kyodev. I have learned from the experience and will now not be so daunted by tarballs. I still can't say I understood all of what went on but I mostly knew what was happening at each stage. The error messages were the most confusing part.

However, I will still continue to look for .deb alternatives because they are just simply quicker and easier.

J'apprécie beaucoup que vous preniez le temps d'aider.

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 25 Sep 2013 03:35

skin27 wrote:All directories hereunder are just names, but (based on old BSD standards) some directories have specific purposes by convention.
Thank you for that reply skin27. It helps but knowing what the contents are does not mean I understand how they interact. I know that some applications look for certain files in particular folders and that's the part that if you get wrong can make one's set up very messy.

I never really understood the Windows file hierarchy either but there it wasn't so important to know. Actually, in Linux it's not so important either, if you can avoid tarballs. :)

Knowing what each file contains does not mean I'd get it right either. Looking at the descriptions I would have thought the tarball should be extracted into the /dev or /etc files or maybe even the /opt file. As it turns out, after having gone through the exercise, I now know that it belongs in the /bin file. It probably doesn't make any difference and it might have worked no matter where I put it but I like to get it right and I never would have thought to use the /bin file.

This was why I asked you to recommend where the tarball should have been extracted. It is also one of the commonly left out pieces of information in 'readme' files. Most instructions simply say, as you did, "Extract into the file system" and that is where I stop 'cause I simply don't understand where.

I can hear you saying "Well, if you don't understand that maybe you shouldn't be playing with tarballs". Maybe you're right but the system sometimes requires it as that is the only way to get/test applications that I want to use.

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 25 Sep 2013 07:18

salut (hi)
generally, you must download and extract in your user home.
After, you compile or choose where to put them.
in our example,:
make: create the bin file superkey (executable), in your current directory.
sudo make install: is the install software that put the files where it's necessary (here: /bin)
make clean: is the part that delete the files unnecessary, after install, in your user home (here: executable /home/markate/superkey)
sudo make uninstall: is the part that delelete all installed files (here .../autostart/superkey.desktop & /bin superkey)
the options (install, clean, uninstall) is programmed script that you can see in makefile, and that make can interpret.

if there is not an programmed installation script, you must choose. often, you can choose /opt (as option). for example, firefox that is not in standard distro, it is in /opt.

/dev is only a system directory where is possible ressources.
/etc is reserved to setting files (of software or system) for all users, text files, not executables.
an advantage to choose a good directory is that some directories is in the $PATH, you haven't the necessity to type them.
for example superkey is accessible simply, for all. if it's in /sbin, you must type /sbin/superkey or you must be root. generally, sbin is for the software where we must have the root rights.

le savoir, c'est comme l'open source, ça devrait être partagé et construit ensemble
knowledge, it's like open source, it should be shared and built together

kyodev
Posts: 505
Joined: 06 Jul 2013 09:47
Location: Lyon, France

Re: Use the Superkey to open the menu

Postby kyodev » 28 Sep 2013 21:48

hi odo5435
if you want know all about directorie:
http://www.debian.org/doc/packaging-man ... TRODUCTION
have a good night ;)

User avatar
odo5435
Posts: 97
Joined: 16 Aug 2013 13:49
Location: Western Australia

Re: Use the Superkey to open the menu

Postby odo5435 » 29 Sep 2013 13:45

kyodev wrote:if you want know all about directorie:
G'day kyodev,

You might find this hard to believe but I was getting quite good at using/learning Unix until the company I worked for abandoned it in favour of a new-fangled OS called "Fenêtres 3.1". :D Of course, Unix has changed considerably since the 80s and Linux is part of that change. It's a little like trying to use the old keyboard driven 'Lotus 1-2-3' after 30 years of using a mouse in 'Excel'. :roll:

Thank you, once again, for another informative link. It's quite a lot to digest but I've bookmarked the page for reference. It will be referred to frequently, I'm sure.

Merci encore pour votre soutien. À bientôt!

"I always wondered why somebody doesn't do something about that. Then I realized I was somebody."
Lily Tomlin


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests