LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 09-09-2010, 05:13 AM   #16
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1

Thanks, MTK358. I must say, I like KDE better, but my computer does not function as well with it as with Gnome (it's a really old one), so I 'll keep it for when needed.

Thank you also, craigevil. I have the language packages for OpenOffice with their dictionaries and fonts (plus a whole lot more fonts, as I am a font-maniac!).
I couldn't find "system>administration>language support", so I went to language support from the control panel, but I could not find a way to define a shortcut-key. I must say that I am not interested in changing the language that Gnome names files and its functions, utilities, etc., but rather I want to change languages in text (txt, doc, rtf, odt, etc.) while writing. This means I need to change keyboard layouts, but I want them organised by language.
I also couldn't find Utilities in the "Add to Panel" menu...
Do you maybe know the commands for all this?
 
Old 09-09-2010, 06:32 AM   #17
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Also, you might like to try Xfce. I don't know exactly what Mint package you have to install to get it, but i think you can probably figure it out.

Or, you can use the
Code:
setxkbmap -layout en
command in a terminal (the above example will switch to a US English keyboard).

Just be sure that you somehow will be able to run it again to get back to your normal keyboard! In an extreme case, you can always use a character map application.
 
1 members found this post helpful.
Old 09-12-2010, 04:09 PM   #18
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
I just fell in love with the terminal!!! With the command setxkbmap -layout <xx> I was finally able to bypass the limitation of four layouts set by GNOME! Thank you very much, MTK358!
One bit of advice to any who read this and will want to use non-latin layouts: before typing the command setxkbmap -layout ru (I'm using Russian as an example), make sure to type first the command for a latin layout (e.g. setxkbmap -layout fr) and then to switch to the non-latin layout, so that when you will want to switch back to your original layout you will be able to copy-paste the command for the latin layout you typed earlier and then type the command for the layout you want. If you don't do this you won't be able to give any command in the terminal, as it needs commands in latin characters! The only backdraw of this is that you have to memorise the two or three letter code for the languages you want (I'm still trying to figure out the code for Frysian)...
 
Old 09-13-2010, 02:44 PM   #19
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
There is another small backdraw at the use of the command mentioned at the previous two posts: The layouts set through the GUI are temporarely lost (until restart)...
 
Old 09-13-2010, 03:02 PM   #20
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I wonder why GNOME decided to do such a stupid thing...

It might be possible to remove that limitation, but that would require getting GNOME's source, modifying it, compiling it, and after all that trouble end up GNOME not being managed by ther package manager.
 
Old 10-04-2010, 05:38 PM   #21
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
I wonder very much too, I hope in the future this will be fixed...
I must say, I encountered the same limitation using KDE and Xfce. Assuming that it was because although I installed the respective packages the version of Mint remained Gnome (the introductory panel in KDE or Xfce session still stated Linux Mint Gnome), I have started to try out various Linux distros in VirtualBox. Until now I encounter still the same limitation! Is it possible that VirtualBox is influenced by my distro and so sets this limitation? It hardly seems possible. But the only other explanation I have is that besides Gnome also KDE and Xfce have this limitation (which I also find rather unbelievable). I am severely tempted to reformat my drive and install some other distro to see what will happen...
 
Old 10-04-2010, 05:57 PM   #22
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
It's IMPOSSIBLE for VirtualBox to affect this, both for the host and the guest OS.
 
Old 10-05-2010, 01:19 PM   #23
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
That can only mean the KDE and Xfce have the same limitation! This is really getting very annoying. I will also check LXDE and Fluxbox out, hoping they will have escaped the menace of the four-language-limit. Do you know if there are distros which use their own desktop version and not one of the above?
 
Old 10-05-2010, 01:43 PM   #24
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
It's kind of strange that other desktops would have the same limitation, but who knows. Also, there is no distro with its own custom DE. Maybe it's because they think clicking on the icon to cycle throught more than 4 layouts is a bad idea.

But that gave me an idea: why not write your own layout switcher app? I don't think it would be too difficult to write a small Qt GUI app that has an icon, and would execute the setxkbmap command behind the scenes to actually switch the layout. I just wonder is it would somehow interfere with the DE's layout switcher.
 
1 members found this post helpful.
Old 10-05-2010, 02:04 PM   #25
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I made a little example Python script that has a combo box that lets you choose the layout. Try it by putting it in a text file, giving it executable permissions, and running it. Make sure you have PyQt4 installed (the Mint package "pyqt4-dev-tools").

Code:
#!/usr/bin/env python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys

app = QApplication(sys.argv)

combo = QComboBox()

# the first string is the text visible in the combo box, the second is the code passed to "setxkbmap -layout".
combo.addItem('US English', 'us')
combo.addItem('Russian', 'ru')

def layoutSelected(index):
    layout = str(combo.itemData(index).toString())
    command = 'setxkbmap -layout %s' % (layout)
    QProcess.startDetached(command)

    # uncomment the following line and change the path to your xmodmap file if you use one
    # QProcess.startDetached("xmodmap /home/username/.Xmodmap")

QObject.connect(combo, SIGNAL('activated(int)'), layoutSelected)

combo.show()
sys.exit(app.exec_())
Don't worry, I tested it!

Last edited by MTK358; 10-05-2010 at 02:15 PM.
 
1 members found this post helpful.
Old 10-10-2010, 10:14 AM   #26
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
Great idea!!! Thank you, MTK358!!! I will get to it right away (of course, as I am inexperienced in app-writing, it will take me some time). When I have made something satisfactory I will upload it and tell you about it...
By the way, I tried LXDE, but it is even worse than the rest. The only way to change layouts is with the setxkbmap-command...
 
Old 10-10-2010, 10:20 AM   #27
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
If you want to try writing it yourself, learn Python and PyQt4 first:

http://docs.python.org/tutorial/

http://zetcode.com/tutorials/pyqt4/
http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/

Note that Qt is actually a C++ toolkit and PyQt4 is just a set of bindings, but Python is a far easier language for beginners. Also there's the GTK+ toolkit, but I think that Qt is much easier to work with and has friendlier documentation.

And you can always ask here for help.
 
1 members found this post helpful.
Old 10-10-2010, 11:32 AM   #28
Neyzan
Member
 
Registered: Jul 2010
Location: Thessaloniki, Greece
Distribution: Fedora, Slackware.
Posts: 74

Original Poster
Rep: Reputation: 1
Thank you very much, MTK358. I will get right to it...
By the way, I tried your example Python script, it works beautifully! (of course, you temporarily lose the layouts you have set through the DE's layout switcher, until reboot)
 
Old 10-10-2010, 07:44 PM   #29
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I just wanted to point out a flaw in my example app:

I used QProcess.startDetached(), which doesn't wait for the clild process to exit before continuing, and that might interfere with the fact that another process wll simultaneously be started if you use the xmodmap and that might have unpredictable results.

You should probably use Python's os.system() (be sure to import os first), which waits for the child process to exit before returning, instead of PyQt4's QtCore.QProcess.startDetached().
 
Old 10-19-2010, 08:10 AM   #30
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Any progress?
 
  


Reply

Tags
mint9


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
no response from scim when trying to change languages in slackware 13 mattington Slackware 5 11-13-2009 10:42 PM
how to add new languages in OpenOffice manolakis Debian 1 10-31-2007 05:08 PM
openoffice languages matrixon Linux - Software 1 04-05-2006 04:39 PM
How Do I Change Languages in KDE? aysiu Linux - Newbie 1 07-23-2005 09:39 PM
how do i install additional languages for OpenOffice.org? jogurt666 Linux - Software 2 01-28-2004 03:41 AM


All times are GMT -5. The time now is 11:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration