Thursday, 26 June 2014

Connecting Linux machine to windows AD and mounting remote user dirs automagically ‒ how?

Dear lazy web,

I've been working for the last year as an informatics teacher at high school and I'm playing with the idea of trying to migrate a couple of machines (mine for the start, I still need to connect to remote win desktop for certain tasks :-D) fully to Linux which would work as well as the windows machines WRT network shares which are on a windows AD server that I don't have admin access to. There are couple of problems, some of which I was able to solve, some of which I have an idea how to solve and some of which I don't now at all how to solve, any pointers appreciated! I'm testing this on Fedora 20 by the way.

Joining the domain

This one took me a lot time to solve and I had a couple of times when I gave up. Mostly because I didn't know the AD server hostname and even when I found it, I still couldn't get it to work via the system-config-authentication, nor the config files in /etc. By chance I was lucky to run across a QA test case for joining the AD domain! Well, and that worked like a charm. So the trick is to run:

$ realm join --user=User ad.example.com

Logging in

Kinda superfluous for me, but a real need when there would be more users to use the computer. That was what I was originally trying to achieve. After joining the domain with the above example, it started to work magically. I don't remember if there was anything else that I needed to set up, probably not. But you definitely need oddjob-mkhomedir that sets up the environment when a new user (unknown to the local computer) logs in for the first time. I believe it should be installed automagically during the join. I've tried it in CLI and in LightDM, both worked by the time I successfully joined.

Mounting remote locations

Well, this is the last thing I was able to do. It does not require logging in, it does require joining the domain. You must fill your login credentials, though, if you don't have a guest share. I've run across a bug in gvfs-samba ‒ when I'm copying multiple files over the network, it hangs. So for the network shares I'm using Dolphin at the moment. The GUI managers I've tried work both in the same way, just go to the location bar, type smb://username@domain/share, you're asked for a password, then it mounts and you can use it. In Thunar, which uses gvfs, you need gvfs-samba package. You can also mount it in CLI:

gvfs-mount smb://username@domain/share

On my old notebook which was essentially multiple times upgraded old fedoras this also created a mount point in the filesystem (somewhere under /run/user/gvfs), in my new computer (which has fresh Fedora 20), this does not create a mount point in the filesystem. Quick search on the internet showed, I need gvfs-fuse package and its daemon running. Then it appears under /run/user/⟨uid⟩/gvfs/* which then can be easily symlinked for wine to appear as a drive if needed.

Mounting the shared network shares on login

Now, here's where I have vague idea that I could probably call something like gvfs-mount on login, the problem is that it needs password. Is there a way to pass the credentials from login credentials to the mount data? Or ask for them only for the first time and in gui (meaning the mount point is created automatically, the user is asked for login credentials which are then saved in his default keyring)? The path to network share should be same for all users.

Mounting user specific network shares on login

Now, the same as above, but the network path depends on the user, i.e. something like smb://username@domain/share/username.

Doing the above two for new users as well

How do I run a custom script when a local user is created during first remote login?

"Mounting" the network shares as drives in wine

Now, here I have an idea that some simple symlinking should do the trick, the network shares names should stay the same (even the directories they appear in the filesystem), so it shouldn't be a problem.

So, once again, any help, pointers, suggestions are very welcome, I'll try to keep this post updated with new information and new solutions.

Sunday, 9 February 2014

Why I don't like new UIs

I've recently had two experiences with UIs that are designed to be streamlined and user-friendly. And, frankly, to me they're anything but that.

Windows 8

For some reason I had to use it and well, it took me several minutes to figure out that the loading...-like screen is actually a log in screen and I need to click a nearly invisible single-coloured button to actually allow me to select (or write) a username and log in. Then it took me another several minutes to figure out how to find Desktop. During my work I was several times greeted with IE instead of Start menu (who the hell did have the idea to put an IE icon next to a sensitive corner that gets you to the start menuscreen?) and found out how to log out by sheer luck. Didn't figure how to shut down from logged user. Ugh, I have to tell, GNOME Shell is heaven compared to that.

Fedora 20 Installation

Everything is parallel. I have to say, I prefer the linearity of the old Anaconda. Just clicking next, next, next and nothing gets missed... Now, well, that's another question. The icons being single coloured didn't help much either. I just hate these new symbolic icons that the PC world of nowadays is plagued with. E. g. here on blogger I always confuse pencil with label. *Sigh*

But well, having to spend 30 mins on custom partitioning and only figuring the problem after reading a manual, when it was actually a something the installed could have told me itself, is a completely another story :( Why does the new anaconda tells me the partition is not correct, but does not tell me why. Why? Why? If it knows it's not correct, it should tell me the reason, not just pop up a bubble telling me something is wrong, that Fedora needs 5 Gigs of space (which was perfectly satisfied by the configured layout) but not telling me, that the problem is missing /boot/efi partition?! Something that's was obvious to the installer but not to the human encountering UEFI for the first time... Why it cannot tell me the error it encounters? Why? Why are all the new UIs pretending human is a brain-dead idiot with less intelligence than a well-trained monkey?

But to end it on positive note, F20 on Live USB is freakishly fast as well as the actual installation :-p

Tuesday, 19 November 2013

Fedora 20 Supplemental Wallpapers

So, because I'm kinda busy with my $ job and aikido training, it took me a while to get it done, but supplemental wallpapers for Fedora 20 are packaged and update submitted. Please test and karma :) They're prepared for use with xfce, kde, gnome/cinnamon and mate. If there's a way to make them available via bg selector in other DEs in Fedora, let me know how, I'd be happy to expand the portfolio ;-)

Sunday, 3 March 2013

My Impression of Gnome Situation

To me it seems, and with the Gnome Shell release this has become even more pronounced, that the situation around Gnome is like the situation around political parties in Czech Republic. They mostly lost touch with reality and majority of people either lost their interest in them, became their haters or their (almost) unconditional adorers. Pointing out an issue equals hating now (and yes there are some exceptions). I have lost faith. Sadly. In both. Does it need to happen to Fedora as well? If we gnomeifficate anaconda, we might end-up like this as well. Users aren't as dumb as we tend to make them. People don't want grey lives with nothing to look forward to, with nothing to choose from. With computers treating them as monkeys. I don't want an environment where I cannot choose between grey two-colour symbolic icons and colorful normal ones. Is reaching out specifically to women making them feel equal?

No, I'm not promoting choice in general. Linux is not about choice. I realize there are lines you should not cross. We cannot sensibly support two parallel audio stacks in Fedora. We cannot sensibly support Hurd or BSD kernel in Fedora. We cannot sensibly support any random combination of system libraries. But we can let user customize their HDD layout when installing. We can show them nice professional looking installer (don't get me wrong, I agree that the installer needed rewrite of its internals, I just don't agree with many of the UI changes that went along with the code redesign). We can show them KDE quality design. We can promote open standards while not setting the hurdle too high for using proprietary or patent encumbered. We can let them choose desktop background by clicking on desktop. We can let them turn off their computer. We can let them install OpenOffice without breaking LibreOffice. Are we?

Fedora Desktops – Quick Look

Hello to all.

Yesterday and today I've been working on packaging the wallpapers for Fedora 19. Since we have a couple of new desktops in Fedora, I thought it would be good to expand our coverage to them as well. In short – since Fedora 19, new wallpapers will be visible in backgrounds selectors of Gnome, KDE, Mate and Xfce. LXDE does not show any pictures and has a plain file chooser for that, Cinnamon uses Gnome stack, but has a bug in its backgrounds selector (read on), so the background is usable but not visible.

I've had various experiences with testing the packages in the desktops and as a couple of these were driving me mad, I thought I'd write a quick showcase. I needed precisely two things – terminal to install/remove the WIP packages and means to set the background. So, up to some initial word or two, this will be about how to run a terminal and how to change a background in these desktops. Also, even though I did it in new user account, widget themes might not reflect fedora defaults as I changed them at one point and I also didn't reset configuration between switching the DEs. Maybe someday I'll test default config and do a quick review of look'n'feel.

For convenience I'll review the desktops alphabetically.

Cinnamon

On first look I thought this might be good – it had panel, menu and looked almost fine. First problem was the symbolic icons in system-tray. I had no idea what half of them meant, but at least there were bubbles popping out that clarified things a bit. Desktop wasn't clickable. Menu got me mad the more I tried to work with it. I could say, from my point of view (POV), this desktop is a wasted effort. If I wanted Gnome 3 I would use Gnome Shell, if not, I don't see the point of choosing this over Mate or XFCE. For me this was even more painful experience than Gnome Shell. It was like choosing the worst features from all the desktops I tried and putting them together.

So let's look how I start terminal. First I open a menu. Ugh. A bunch of icons, three columns, the first one without any text. Huge padding. The third column changes contents on hoover in the second column. I always hated dynamic menus on web and this is not an exception. Scrollbars everywhere because of the padding and fixed height. As I rarely start apps by typing their names, actually rather dislike doing it that way, this is absolute pain for me.

Now for the desktop background. As I noted earlier, desktop is not clickable. So I had to figure out how to change it. So, let's find settings. Oh, it's one of those icons without text…

This gets me into a common interface that I know from other desktops as well. This is good. No big issue here. One tiny complaint might be that theme, desktop and background are three separate tools. Also I wonder, why it uses different icons than the rest of the desktop?

So, let's click background.

Huge. What a huge waste of space. The images are neatly small, probably the ideal size, with a nice shading to boost, but that huge white-space totally kills it. Plus point for showing image name, minus for not showing image author. Furthermore, our background is missing. Because it's XML. It's supported (as evident by it being actually used as background), but not selectable. Someone who actually uses Cinnamon should fill bug about it. The background changes on click. Space waste is common with Gnome. The All Settings button could have been on the same row with the Close one. There is no single reason why one should be at the top and the other at the bottom.

GNOME

First impression terrible. Black theme, grey washed-out symbolic icons, no pop-up bubbles, no menu. Animation everywhere. Second impression better than Cinnamon, still not usable for me. Inexplicable removing/hiding of useful features, re-adding some of them three releases later, sometimes adding unneeded steps in-between (read on for more info on this). However it's actually usable desktop. It would be a pain for me, but it would probably be easy to use for my grandma, for kids used to touch interfaces on iPads, for game console or for browsing the internet (after all, it basically behaves like something between the web and modern Android-powered phones and it uses web technologies like javascript and css *ugh*).

Now on to the terminal. First go to top-left to open activities. Empty. As its primary task is probably switching between windows, I haven't entered any menu yet. First I have to click on the icon that looks like grid nodes (what's the idea? It does not even remotely suggest that this will get me app list).

Huge. So I finally got into the menu. With huge icons and (when compared to the icon size) small text. Weird looking scroll-bars everywhere. So next step is select category (you don't expect me to find Terminal among zillions of uncategorized apps, right?) and find terminal. Animations everywhere.

It's better than cinnamon, but the two steps to get into menu are strange and ineffective. Gnome Shell isn't optimized for using mouse. But lets continue to background selection. This is the worst background selection I've ever seen. I think the following four pictures speak for themselves, but let's explain a little bit first. So again, desktop is not clickable so I need to go through control center. Let's skip for now the fact that I don't see Theme or Appearance there (maybe I forgot to install something), the control center is categorized (like in XFCE) and Background is there. No issue from me. Kudos for the categorization. But then, after selecting Background, a completely useless window appears. It just shows the desktop. Whoa. Does that mean there are no pictures to select from? No. The desktop is actually clickable. I don't understand why this single step is included. It obviously extraneous, unneeded, confusing. Then the selection itself normal. I can select from installed backgrounds, pictures from XDG_PICTURES or plain color. The UI could be better, it could be worse, but it serves its purpose. The pictures are big, but there isn't too much of white space in between them, so no issue. However. Neither picture name, nor its author is present. Fail. The background does not change until I click Select.

One common thing about gnome and cinnamon is it's use of awful flat grey everywhere. No single hint of colour or shaded gradient. In sheer contrast to the next DE.

KDE

This takes a lot of time to actually start, but then you are finally welcomed by a desktop that looks like designed by an artist. Yes. This is the only Fedora desktop that looks great and consistent. It can be clearly seen the theme has been designed by professionals and lots of time has been invested in it. For my taste it has too much animations, but knowing KDE it can be probably turned off. UI is another story though. Not my cup of tea, but about half of linux users like this, so I'll say it's good and detailed but for me it offers too much detail, it easily becomes overwhelming. It does not usually waste space. This is a desktop I could use after a bit of customizing.

Now let's start terminal. Like many people are used to from file managers, right-click on desktop offers you to start terminal in KDE. So +1 from me.

Another way is through menu. The design is similar to cinnamon, but works better. It looks like cinnamon took the idea from KDE, kept its worst parts (fixed size, scrollbars anywhere, change menus on hoover) and made it even worse by adding gnome-like bits. While it behaves menu like, it's still in the same place, things get replaced, and due to fixed size, scrollbar is not uncommon. This is one of the worst parts of KDE, from my POV, but unlike Cinnamon or GNOME it does not get on my nerves.

To change desktop wallpaper, right-click on it and select Default Desktop Settings. I don't fathom the word Default in the name, but other then then all cool. What comes up is finally something that has done things right.

The image sizes are reasonable, white space is neither too big nor too small and most importantly, it shows both name and author of the wallpaper. Let's repeat it because it's important. KDE is the only Fedora desktop environment that shows both wallpaper name and its author in its Desktop Background selection app. This is how it should be done. The only thing that would make it even better would be to also show the license. You need to click Apply to change the background.

LXDE

Lightweight desktop with all it takes. It's fast, it works, but it's simple. Configuration might take longer than in other DEs but it looks like highly usable desktop if you don't mind less features. Now let's start terminal. Finally a sensible categorized menu without scroll-bars. As expected, terminal is quickly found.

Changing the wallpaper is also standard. Right-click on desktop and select Desktop Preferences.

The selector itself is light weight. No previews, just a file chooser and a few more options. Cannot probably expect much more from a lightweight desktop, right? And it does it's work without any unnecessary steps.

Mate

A direct continuation of a desktop I used to use. This is fork of Gnome 2 with the intention to provide and upgrade Gnome 2 experience and as such it behaves. Nothing unexpected. Menus work as usual, icons have colour, things are usually efficient. I still could use this, but nowadays I prefer XFCE. So let's start terminal. It's almost the same as in LXDE.

Nothing really wrong here, but too big icons and too much padding. If you have small screen or many apps, scrollbars appear. There's an option to start it from desktop context menu like in KDE as well.

Same goes with desktop settings. Directly accessible from desktop context menu. This is what we get.

Image size good, padding could be smaller, but just like with GNOME – no name, no author. Fail. Wallpaper changes on click.

Xfce

I'm not sure in which category this falls. It's not lightweight like LXDE, it's similar to gnome 2, but it's not gnome 2 ;-) Currently my desktop of choice so I skip on praising this time, only one note – the default config looks "bleh", but its actually highly tweakable and after some time it can be made look really good (although partly due to the lack of really professional looking GTK2/3 themes not as good as KDE). Starting terminal in XFCE is quickest of all the DEs I've tried thanks to special launchers to "Preferred Applications" that are also included in default bottom panel.

It can be also started from menu. It's similar to Mate, but it's all-in-one solution. There isn't separate menu for Settings and Administration. The icons are smaller, there's less padding so it takes much longer for scrollbars to appear. This is what I like the most.

Terminal can also be stared from desktop context menu.

Background selector can be run from the same place as well. This is what it looks like.

No waste of space, preview included, simple selector. No name, no author, but filename is present, so while it isn't fail, there's still lots of room to improve. Wallpaper changes on select.

Conclusion

While I was writing this, I realized that even though I write it alphabetically, it also reflects how I like the DE I write about – the first one least, the last one most. Interesting coincidence. If I had to draw some conclusion I'd say that traditional desktops are very good for starting applications, terminal especially, KDE is midway and GNOME and Cinnamon lag behind. I think the change from menu to something else is making things worse rather than better (this counts for Windows 7 as well, I find it very hard to find an app I want to start there without using keyboard). When selecting background, KDE is the obvious winner with both being quick and easy and providing most of important information. Gnome and Cinnamon both fail tremendously in this. Last, when it comes to design, KDE is the obvious winner with a very professional polished look, traditional GTK2 based desktops are so-so with lots of room for improvement, Cinnamon and GNOME are terrible and very amateurish from my POV.

So in short, while I use Xfce, and will continue doing so, from this short comparison, KDE comes out as the winner.