Wednesday, 21 June 2017

Eight years since first release and still no usable theme?

Well, let me be frank. Ever since gtk-3.0 I've been skeptical of it, especially of the theming aspect. In gtk-2 we had (and still have) many themes ranging from trash to excellent, almost every kind of taste could have been satisfied. Not so in gtk-3. First issue is constant changes to theming API, meaning that despite there being hundreds of themes, only handful of them actually work right :( And among them, I still have yet to find one that would work on my fairly usual 15,6″ laptop screen with 1366×768 px resolution. Basicaly I have two issues.

  1. Almost every possible gtk-3 theme has huge (no, not just big, I really mean the word huge) paddings and there are no working compact variants. Yes there are minwaita and adwaita-slim, but they kinda break Thunar's and Whisker menu's entry boxes, and they also aren't very slick (yes, I don't like proper adwaita either, it does not look very proffessional to me).

    So far it meant I had to expand side pane in libreoffice and had less usable screen estate left for editing (the first two pics, notice how in the gtk-3 version the sidepane is not only wider, but also needs a scrollbar!), but now inkscape is getting ported as well, I'd need twice the screen resolution I have now for it to be usable (the second two pics, notice how in the gtk-3 version much more buttons and entries are not directly accessible, and the sidebar is sooo huge and cannot be made smaller) :(
  2. Scrollbars. They're small, they're ugly, they're hiding and hiding badly, meaning sometimes it's almost impossible to select either last column or last row in a list or both.
*Sigh* You at gnome/gtk – why do you try to fix something that ain't broken? Why there isn't a single proffessional looking compact theme that I could use with inkscape on my laptop much like I could with its gtk-2 releases? Are low-end machine users nothing to you? Why gtk-2 themes worked actually better at gtk-2.8+ (and probably in any version sans the very first or second) than gtk-3 themes in any version you choose?

Do you still wonder why people are complaining?

Oh, and to end on a positive note: if someone points me to really working really compact theme that does not break xfce-gtk3/libreoffice-gtk3/inkscape-gtk3 a is good looking (no, not adwaita, but something along the lines of numix, greybird, menta, zuki*, etc.) I'd be very happy to change my mind about gtk3 ;-)

Thursday, 7 August 2014

Ripping DVD with FFMPEG

This more a post to myself than to others, but even so, others might find it useful as well. Because sometimes having a DVD is inconvenient compared to your usual Matroska file saved on a HDD, I was looking for a simple way to encode the DVD. I have it decrypted and copied in a folder, but there are a bunch of 1 GiB VOB files, which is a) big, b) inconvenient. So the idea is, join the VOBs and transcode it into h264 (substitute theora, vp8 or dirac if you are more radical FLOSS supporter than me) and FLAC for audio. Actually simple search on the net presented me with an easy solution using FFMPEG (I kinda had problems with using the GUI ripping software), but it took some more research (reading the ffmpeg man pages) to find out how to rip more than one audio stream into the final file (I used a JAP/ENG DVD about Aikido).

So, without further ado, here's the command:

ffmpeg -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB -map 0:v -map 0:a -c:v libx264 -crf 18 -vf yadif -c:a flac aikido.mkv

And some info:

  • The ffmpeg command is in ffmpeg package, from rpmfusion free. It's not in Fedora proper because of patent issues, I believe.
  • -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB marks that input file is a direct join of the three VOB files listed, the backslash is to escape the "|" so that it's seen by ffmpeg instead of bash.
  • -map 0:v tells that ALL video streams are to be copied/transcoded.
  • -map 0:a tells that ALL audio streams are to be copied/transcoded.
  • -c:v libx264 tells that for video streams we'll use libx264 codec (i. e. we'll transcode to h264).
  • -crf 18 tells that we want to use Constant Rate Factor, value 18 (which might be a bit of overkill, but I don't want to sacrifice quality for space and I don't have the time tune it).
  • -vf yadif use YADIF deinterlacing, because I don't wanna keep interlacing in the video – I'll be playing it on a computer, after all.
  • -c:a flac tells we'll be using FLAC for audio streams. It's free and lossless. Again, it might be overkill, but I like to keep the original sound without using nonfree codec like AAC or AC3.

When I originally omitted the -map parameters, only single video and single audio stream were transcoded, so it's necessary if you want to transcode more audio streams or different stream than the first one.

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

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.

UPDATE: Solution to user automount problem

So, with the help of people that commented in the comments section, I found a solution that's called pam_mount. I'm not sure how to do it the right way (TM), but here's what made it work for me:

  • Add auth optional before auth sufficient cached use_first_pass, so that the credentials are shared between pam mount and login to AD. I added it to /etc/pam.d/system-auth, I'm not sure that's the correct way though.
  • Add session optional so that pam_mount is executed at the start of the session. I added it to the end of the same file as above.
  • Edit /etc/security/pam_mount.conf.xml. Typical line would look like <volume user="*" sgrp="DOMAIN\domain users" fstype="cifs" server="" path="Shares/Usr_home/%(DOMAIN_USER)" mountpoint="/home/DOMAIN/%(DOMAIN_USER)/.ad/%(DOMAIN_USER)" />

And voila, it works. I only have one still unsolved issue with this, and that's I cannot get it not to use forceuid, forcegid and nounix mount options. I haven't tried yet, if it's a problem with pam_mount, or mount.cifs (i. e. if the server/client combination support cifs unix extensions like POSIX acls)...

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 ;-)