How to install HandBrake GUI on TrueNAS 12.0?

Palle34

Cadet
Joined
Jan 16, 2021
Messages
2
I followed this instructions but i get an error:

Code:
Unable to init server: Could not connect to 127.0.0.1: Connection refused

(HandBrake:3384) - Gtk-WARNING **: 11:13:10.993: cannot open display:

Does anyone have an idea how to fix that?

Regards
 

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
Hi,
I've you solved the problem ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I note that I wasn't able to get it to work either using ssh -X ... but rather it works with ssh -Y ...
 

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
From putty ???
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I am using Xquartz on Mac, so can't confirm it works in putty, but others seem to have been using that as the client, so I guess so.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
For Putty, you need to go in the connection settings under SSH | X11 and allow X11 forwarding. Set the Display location to :0 and it should work.
 

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
Thanks for your answer, i tried it but doesn't working. With MobaXterm, on the top i can reasd X11-forwarding disabled or not supported. I think problem is in sshd_config. I delete "#" on AllowAgentForwarding yes, X11Forwarding yes, X11DisplayOffset 10, X11UseLocalhost yes. I forget something ?

I hope you understand my English pietre level
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
In the jail where it works for me, all those are commented out in sshd_config:

Code:
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes


I guess it's showing the default values there in any case, so nothing needs to be done for it to work.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Not sure what else you're doing or not doing, but it works for me with both Putty and Xquartz.

If you want to share your putty config screen or show pkg info output from the jail, maybe I can see what's missing.
 

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
Thanks, if you can compare our sshd_config
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# $FreeBSD: releng/12.3/crypto/openssh/sshd_config 360313 2020-04-25 15:38:48Z emaste $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.

# Note that some of FreeBSD's defaults differ from OpenBSD's, and
# FreeBSD has a few additional options.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# Change to yes to enable built-in password authentication.
#PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable PAM authentication
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'no' to disable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#UseBlacklist no
#VersionAddendum FreeBSD-20200214

# no default banner path
#Banner none

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding yes
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
 

Attachments

  • Capture d’écran 2022-04-02 190210.jpg
    Capture d’écran 2022-04-02 190210.jpg
    91.5 KB · Views: 190

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
In Putty, you need to set the X display location to :0
 

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
I make a fresh install and still the same
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Did you set the X display location to :0

Which pkgs did you install?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
On host:
iocage create -n "x11" -r 13.0-RELEASE vnet="on" dhcp="on" bpf="yes"

iocage start x11

iocage console x11

Now in the jail console:

passwd (to set a password for root)

ee /etc/ssh/sshd_config

Change:
PermitRootLogin yes

Save and exit the file

pkg upgrade (then Y)
pkg install xorg (then Y)

... installs 183 pkgs, takes a few minutes.

pkg install firefox-esr (then Y)

... installs 71 more pkgs

sysrc sshd_enable=YES

service sshd start

From Putty: (EDIT: turns out I was already also running Xming, which is a prerequisite to this working)

Set a connection to your jail's IP

Set on the X11 tab Enable X11 forwarding

Set on the X11 tab the X display location to :0

Save that connection and login as root with the password you set above.

Then in that terminal:
firefox

A firefox window should appear in your Windows session (but is actually running in the jail)...


Let me know which step doesn't work if any. (I have just performed each of these steps on a TrueNAS 13 BETA server as I was typing them, so I confirm it works for me in both Putty and XQuartz.
 
Last edited:

toto6581

Dabbler
Joined
Feb 13, 2021
Messages
12
Lot of Thanks for your help.
It works for firefox and Handbrake. But last info, i've a intel CPU, you know how to activate qsv ?
Thanks again
 
Top