LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2013, 09:24 AM   #1
Deepakp1387
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
Smile Sending Keystrokes through Shell Script


Hello there,
I have GNOME 2.16 and I am trying to write a code where I can have a loop running that executes the following: (CTRL+ALT+LeftArrow).
This switches between workspaces.
I wanted to automate this process but unfortunately I dont have lot of commands and libraries installed (for security reasons by the owner).
Can you please tell me another way to write a shell script to automate the switching between workspaces (without using xdtool, sendkey, xsendkey, wmctrl or anything that needs to be installed)?
Sorry...but I'm not purposely trying to make this difficult but if there is a solution i'd like to know and if not then I can leave this alone.

Thanks a bunch.

Regards,

Deepak
 
Old 01-28-2013, 07:20 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The problem is that it is the X server that interprets the key codes sent by the keyboard. To switch workspace thus requires the keys to be sent to the X server... and you can't do that directly from a shell script. Hence the need for things like xdtool, sendkey, xsendkey, wmctrl...
 
1 members found this post helpful.
Old 01-28-2013, 09:16 AM   #3
Deepakp1387
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks jpollard. I guess I'm bounded by my resources available to me
DP
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script running in background needs to receive keystrokes. acousmetre Programming 4 06-27-2011 04:32 PM
sending keystrokes pass Programming 4 08-19-2006 03:13 PM
Sending keystrokes to a gui lm317t Programming 3 10-11-2005 06:17 PM
Sending Keystrokes lm317t Linux - Software 0 10-10-2005 04:02 PM
Sending Keystrokes to a window seidren Programming 5 10-28-2003 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration