emperor: (Default)
posted by [personal profile] emperor at 01:10pm on 20/06/2012 under , , ,
I encountered this problem yesterday, and it took a bit of yak-shaving to fix. Further, I didn't find much of immediate help by googling, so I thought I'd note down what I did.

A little background



Back in the day, you configured your X session by writing a small script that would run a few programs (say a clock, maybe an xterm or two, something to fettle your background), and finally execute a window manager. You'd call this ~/.xsession, and all was good. As time went by, linux distributions started shipping increasingly fancy desktop environments like GNOME and KDE, but you could always write yourself an .xsession, and keep your old-style setup.

I've never quite been convinced by fancy window managers; I can't afford really massive monitors, so am jealous of my screen real-estate, and all these taskbars and widgets and so on take up too much of my screen. Also, I'm very used to my X setup, so it's efficient for me to carry on using it. If you care, I run fvwm with a 4x3 set of virtual screens, either xplanet (the earth as viewed from the moon) or xphoon (the moon in its current phase) as backdrop, and a little buici-clock.

The problem



Anyhow, [livejournal.com profile] atreic has been very kindly letting me use their computer to work from. It's running Ubuntu 12.04 LTS, which has unity as the default window manager, and lightdm as the default display manager. I wanted to get my usual setup going, but with minimal disruption to [livejournal.com profile] atreic's computer (which implies minimal system-level changes). I installed fvwm, and that meant that lightdm would then offer me an fvwm option when I logged in, but that still didn't run my .xsession.

The solution



A bit of digging found me this Debian bug report, which was forwarded upstream to Ubuntu. Debian resolved the problem by adding another .desktop file to their lightdm package that would run the user's .xsession. Ubuntu's developers, in their wisdom, decided that anything resembling a "run my .xsession" option would be far too confusing for their users. Instead, as a Ubuntu user, you have no way of getting your .xsession run without admin access to the machine.

Thankfully, I do have this, so I was able to pinch lightdm-xsession.desktop from Debian's package, and install it into /usr/share/xsessions/. And all was well with the world again!

A little grumbling



It seems to me that Ubuntu have chosen to break a traditional linux behaviour with not a great deal of justification; I ought to be able to get my .xsession run without needing rootly powers. Further, the man-pages for unity, lightdm, and dm-tool all leave a lot to be desired; the configuration files for lightdm, for example, are pretty poorly documented.

A couple of footnotes



I gather that Ubuntu's package of gdm does include a .desktop file that runs the user's .xsession. That's quite a heavyweight workaround!

If you want to know what all these .desktop files are about, there's a specification online.

You might well want to be able to get back to the Ubuntu login screen without logging out (if, for example, you wanted to let [livejournal.com profile] atreic log in to their own computer ;-). You can do this from the command-line thus:
dm-tool switch-to-greeter
emperor: (Default)
posted by [personal profile] emperor at 08:20am on 27/07/2010 under , ,
[livejournal.com profile] atreic and I are off to Portugal later in the year. In a probably-vain attempt to avoid being one of those annoying monoglot English tourists, and because I can only remember about two words from my previous trips to Portugal (with MWW, years ago), I thought I should try and pick up a bit of the language before then. There's a bewildering range of teach-yourself courses available (although the number is slightly reduced if you want European Portuguese), but I eventually settled upon Teach Yourself Instant Portuguese, since 35-45 minutes a day for 6 weeks seemed about the time I had available. Perhaps this redefinition of "instant" should have been a warning...

Anyhow, I finished week one on Sunday, and manage a respectable 89% in the test for the week. Having had yesterday off (you get one day off a week), I'll be starting week two later today. I don't yet feel I can say anything terribly useful, but I guess that's to be expected. It's obviously aimed at a certain type of person, though: one of the things I learned how to say is "A minha esposa tem um Mercedes", or "Trabalho para três bancos grandes. O trabalho é chato, mas o dinheiro é bom." It's pretty grammar-light, which is probably sensible, but can be a bit frustrating: I ended up looking ahead to see what the difference between "sou" and "estou" is, for example, and I'm not clear why sometimes it's "Tem uma casa em Londres", and other times "Sim, tem casa em Londres", or why sometimes you say "Estive em [place]", and other times "Estive no [place]". The author's view is that the little words aren't necessary to being comprehended, and that one is better off saying something approximately right but plausibly pronounced and confidently. She may well be right! I guess the test will be to see how useful it is in Portugal, or whether everyone will hear my badly-mangled Portuguese, wince, and reply in English...

Whilst looking around for a suitable course, I noticed Rosetta Stone[0], and Linguaphone, both of whom claim to be able to teach one to a plausibly-proficient level in a not-very-large period of time (although both shy way from claiming exactly how long, I note). I've always wondered if they are actually any good - if not, how do they stay in business, but if so, why don't we use them in schools, rather than taking 5 secondary years to get to GCSE level?

Finally, the course I have includes some flash-cards. I didn't want to cut my nice new book up, so I LaTeXd up some of my own (this involved debugging the slightly-bitrotted-flashcards package). [livejournal.com profile] pm215 suggested that I consider Anki, as a more intelligent way to do flashcard-type learning. So, having used only the old-fashioned flashcards last week, I'm going to give this a go this week. One difficulty, though, has been entering accented characters - LaTeX lets you specify them in ASCII, so \~a for ã, but that doesn't really work for Anki (you can feed it LaTeX, but it looks very odd having one LaTeX'd character in the middle of a word). After a bit of googling, I used xev to find out what X thought my Alt-Gr key was (ISO_Level3_Shift), and told X to use it as the Compose key: xmodmap -e "keysym ISO_Level3_Shift = Multi_key". This means I can generate most of the symbols in the WP page, although the rune for generating ǎ, for example, still doesn't work, and there should be a nicer way of setting this up.

This should be documented more usefully, I feel (I shouldn't be looking at WP, for example), and it would be nice to have something like the OSX app that shows you what the keyboard "looks" like (e.g. I'd hold down Alt-Gr, and it would highlight the keys that I could press to generate an accented character, as well as what accent would be about to appear)...

[0] who only offer the wrong sort of Portuguese

May

SunMonTueWedThuFriSat
        1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25 26
 
27
 
28
 
29
 
30
 
31
 
OSZAR »