SolydXK 9 (stretch) alpha build testing

SolydXK is too quiet for you? SolydXK Enthusiast Editions, based on Debian Testing is for you! Here you can find news about Debian Testing and Unstable too, and also tests on SolydXK programs.
The support for SolydXK EE is provided by the community.
User avatar
palimmo
Posts: 765
Joined: 19 Nov 2013 19:44
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby palimmo » 03 Mar 2017 23:02

balloon wrote:I took a video capture with VirtualBox:
SolydX 9
https://www.youtube.com/watch?v=84qIFgXU3-k
SolydK 9
https://www.youtube.com/watch?v=sOa-waqQwgY

I also installed it on real PC. I will test while using it.
Nvidia drivers?
As with SolydK 8 no appropriate bootsplash? :( :( :(
Proud user of SolydK!

Dai diamanti non nasce niente, dal letame nascono i fior. http://aquilone.wordpress.com/

User avatar
bas_otten
Posts: 203
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: SolydXK 9 (stretch) alpha build testing

Postby bas_otten » 04 Mar 2017 22:30

grizzler wrote: Wouldn't creating symlinks from /root to the relevant settings files be safer? You'd still end up with root owned files in the user's home directory, but at least you'd still be using kdesudo (as Bas mentioned, the HOME=$HOME contruct essentially turns kdesudo into sudo).
Adding to what Schoelje said about this: I don't see a correct implementation for this. Putting symlinks in /root would be a violation of 'your' rule to never touch (any) user's homedir by whatever means, ever:-) And how to construct the target for these symlinks? it cannot contain the hardcoded username of any (and which?) user on the system. Side-topic: One of the things Linux cannot do is: create a symlink with a target that contains a variable in it that is to be resolved dynamically at time of usage. It's a true shame I think:-) So far I've seen only z/OS UNIX System Services (IBM mainframe) can do this, extremely useful and flexible!
Schoelje wrote: I found that if I start a kdesudo application with HOME=$HOME before the command the application behaves as expected.
I have given it some thought since my previous response. Wondering: why is it that this topic has become so important for SolydK-9, cause the exact same behaviour shows in SolydK-8?
But anyways, if root always using the user's theme is considered an unconditional must-have, using this HOME=$HOME construction is probably the 'best' option of all. I am converted here..
After all, there is only really noticable impact for applications that are typically used both as root and as the regular user. 3 are catching my eye: Konsole, Dolphin, Luckybackup.
Most(all?) options of these application are saved in a handful of directories and files, typically (but not only) rc-files in ~/.kde/share/config. Suppose we create a 'dummy' set of these config files for these applications in /etc/skel.
In that case, when a user is created these files exist from the birth of the user and will be owned by the user - never be created by root. When root (after doing kdesudo HOME=$HOME) would change the contents of an existing file it will not change ownership or permissionbits, thereby avoiding the trouble that a user cannot (in)directly edit files in his/her own home .
This will not help for applications that the user installs him/herself after installation of the system, but it will mitigate the possible impact by a good amount.
What do you think?

User avatar
grizzler
Posts: 2044
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: SolydXK 9 (stretch) alpha build testing

Postby grizzler » 05 Mar 2017 07:32

bas_otten wrote:Putting symlinks in /root would be a violation of 'your' rule to never touch (any) user's homedir by whatever means, ever:-)
That's packages. I was thinking about the application itself, creating the symlink at startup. To be honest, I have no idea whether making sure the right theme is used would even work properly at that stage.
In that case, when a user is created these files exist from the birth of the user and will be owned by the user - never be created by root. When root (after doing kdesudo HOME=$HOME) would change the contents of an existing file it will not change ownership
If the applications involved behave themselves, yes.
Frank

SolydX EE 64 - tracking Debian Testing

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 05 Mar 2017 08:40

grizzler wrote:
bas_otten wrote:Putting symlinks in /root would be a violation of 'your' rule to never touch (any) user's homedir by whatever means, ever:-)
That's packages. I was thinking about the application itself, creating the symlink at startup. To be honest, I have no idea whether making sure the right theme is used would even work properly at that stage.
Unfortunately, no. Theme configuration is set as soon as the user logs in. In theory, you can set the theme on a per-application-basis, but that would be the theme the application would use despite of any other theme the user had set. So, that's not the right solution in this case. Also in theory, the kdesudo started application could create root symlinks for the gtk configuration files, but if the application is not closed properly the symlinks would stay.
grizzler wrote:
In that case, when a user is created these files exist from the birth of the user and will be owned by the user - never be created by root. When root (after doing kdesudo HOME=$HOME) would change the contents of an existing file it will not change ownership
If the applications involved behave themselves, yes.
I've only added kdesudo HOME=$HOME to our own applications because I know if they are writing to the user's home directory or not. Only solydxk-constructor does that but sets the owner to the current user when it creates the files. I haven't looked at other applications yet, I only know that adding HOME=$HOME in the .desktop file doesn't work. :(


SolydXK needs you!
Development | Testing | Translations

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 05 Mar 2017 08:45

bas_otten wrote:I have given it some thought since my previous response. Wondering: why is it that this topic has become so important for SolydK-9, cause the exact same behaviour shows in SolydK-8?
Because I've created a SolydXK Dark theme for Stretch.
grizzler wrote:
bas_otten wrote:Putting symlinks in /root would be a violation of 'your' rule to never touch (any) user's homedir by whatever means, ever:-)
That's packages. I was thinking about the application itself, creating the symlink at startup. To be honest, I have no idea whether making sure the right theme is used would even work properly at that stage.
Unfortunately, no. Theme configuration is set as soon as the user logs in. In theory, you can set the theme on a per-application-basis, but that would be the theme the application would use despite of any other theme the user had set. So, that's not the right solution in this case. Also in theory, the kdesudo started application could create root symlinks for the gtk configuration files, but if the application is not closed properly the symlinks would stay. Even still, I don't think it would even work.
grizzler wrote:
bas_otten wrote:In that case, when a user is created these files exist from the birth of the user and will be owned by the user - never be created by root. When root (after doing kdesudo HOME=$HOME) would change the contents of an existing file it will not change ownership
If the applications involved behave themselves, yes.
I've only added kdesudo HOME=$HOME to our own applications because I know if they are writing to the user's home directory or not. Only solydxk-constructor does that but sets the owner to the current user when it creates the files. I haven't looked at other applications yet, I only know that adding HOME=$HOME in the .desktop file doesn't work. :(

Btw, I've updated the alpha ISOs: removed v86d, larger desktop icons for SolydX9 and all's updated.

[EDIT]
From this link the only thing that actually works is starting the application with "sudo -E" and we all know that starting a GUI with sudo is a bad thing. Also, as -E passes the entire environment, perhaps the HOME=$HOME solution is even a bit safer.

Code: Select all

     -E, --preserve-env
                 Indicates to the security policy that the user wishes to preserve their existing environment
                 variables.  The security policy may return an error if the user does not have permission to
                 preserve the environment.
[ENV_REFERENCE]
SolydK9 Root

Code: Select all

solydxk@solydxk:~$ kdesudo printenv
LANGUAGE=
KDE_SESSION_VERSION=5
KDE_FULL_SESSION=true
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=en_US.UTF-8
DISPLAY=:0
XAUTHORITY=/tmp/kdesudo-ik3318-xauth
TERM=xterm-256color
COLORTERM=truecolor
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
MAIL=/var/mail/root
LOGNAME=root
USER=root
USERNAME=root
HOME=/root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/printenv
SUDO_USER=solydxk
SUDO_UID=1000
SUDO_GID=1000
SolydK User

Code: Select all

solydxk@solydxk:~$ printenv        
GS_LIB=/home/solydxk/.fonts
KDE_FULL_SESSION=true
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LANG=en_US.UTF-8
GDM_LANG=en_US.utf8
PROFILEHOME=
DISPLAY=:0
SHELL_SESSION_ID=b193fea74e62447d86ad6452d9b78e02
QSG_RENDER_LOOP=
COLORTERM=truecolor
XDG_VTNR=7
SSH_AUTH_SOCK=/tmp/ssh-Hp3WI5FNs4h2/agent.2960
XDG_SESSION_ID=8
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/solydxk
USER=solydxk
DESKTOP_SESSION=kde-plasma-kf5
PWD=/home/solydxk
HOME=/home/solydxk
SSH_AGENT_PID=3028
QT_ACCESSIBILITY=1
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share/solydxk/default-settings/plasma5-profile:/usr/share:/usr/local/share
KONSOLE_DBUS_SESSION=/Sessions/1
XDG_SESSION_DESKTOP=kde-plasma-kf5
KONSOLE_DBUS_WINDOW=/Windows/1
SHELL=/bin/bash
TERM=xterm-256color
KONSOLE_DBUS_SERVICE=:1.117
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XCURSOR_THEME=oxy-white
XDG_CURRENT_DESKTOP=KDE
QMLSCENE_DEVICE=
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
KONSOLE_PROFILE_NAME=SolydK Dark
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
SHLVL=1
XDG_SEAT=seat0
COLORFGBG=15;0
LANGUAGE=
WINDOWID=16777222
GDMSESSION=kde-plasma-kf5
LOGNAME=solydxk
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/solydxk/.Xauthority
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2
QT_AUTO_SCREEN_SCALE_FACTOR=0
XDG_CONFIG_DIRS=/usr/share/solydxk/default-settings/plasma5-profile/:/etc/xdg
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
SESSION_MANAGER=local/solydxk:@/tmp/.ICE-unix/3084,unix/solydxk:/tmp/.ICE-unix/3084
GCC_COLORS=error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01
_=/usr/bin/printenv
SolydX Root

Code: Select all

solydxk@solydxk:~$ gksudo printenv
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LANG=en_US.UTF-8
DISPLAY=:0.0
COLORTERM=truecolor
TERM=xterm-256color
XAUTHORITY=/tmp/libgksu-Ke7BfP/.Xauthority
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAIL=/var/mail/root
LOGNAME=root
USER=root
USERNAME=root
HOME=/root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/printenv
SUDO_USER=solydxk
SUDO_UID=1000
SUDO_GID=1000
SolydX User

Code: Select all

solydxk@solydxk:~$ printenv
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_MENU_PREFIX=xfce-
LANG=en_US.UTF-8
DISPLAY=:0.0
COLORTERM=truecolor
XDG_VTNR=7
SSH_AUTH_SOCK=/tmp/ssh-yoh1T8WS4PNh/agent.1845
GLADE_CATALOG_PATH=:
XDG_SESSION_ID=1
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/solydxk
USER=solydxk
GLADE_MODULE_PATH=:
DESKTOP_SESSION=lightdm-xsession
PWD=/home/solydxk
HOME=/home/solydxk
SSH_AGENT_PID=2057
QT_ACCESSIBILITY=1
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share
XDG_SESSION_DESKTOP=lightdm-xsession
GLADE_PIXMAP_PATH=:
TERM=xterm-256color
SHELL=/bin/bash
VTE_VERSION=4601
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CURRENT_DESKTOP=XFCE
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
SHLVL=1
XDG_SEAT=seat0
WINDOWID=54525955
GDMSESSION=lightdm-xsession
LOGNAME=solydxk
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/solydxk/.Xauthority
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_CONFIG_DIRS=/etc/xdg
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
SESSION_MANAGER=local/solydxk:@/tmp/.ICE-unix/2068,unix/solydxk:/tmp/.ICE-unix/2068
_=/usr/bin/printenv


SolydXK needs you!
Development | Testing | Translations

User avatar
bas_otten
Posts: 203
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: SolydXK 9 (stretch) alpha build testing

Postby bas_otten » 05 Mar 2017 10:43

grizzler wrote:
bas_otten wrote:In that case, when a user is created these files exist from the birth of the user and will be owned by the user - never be created by root. When root (after doing kdesudo HOME=$HOME) would change the contents of an existing file it will not change ownership
If the applications involved behave themselves, yes.
You mean in the sense that they don't explicitely (try to) chown their own configuration files, copy them, add more? It think generally it will be OK. But it remains mitigating the risk, not eliminating. For instance, if you start browsing with kdesudo -c "HOME=$HOME" firefox", you will surely fill your cache e.a. will root-owned files.
Schoelje wrote: I've only added kdesudo HOME=$HOME to our own applications because I know if they are writing to the user's home directory or not. Only solydxk-constructor does that but sets the owner to the current user when it creates the files. I haven't looked at other applications yet, I only know that adding HOME=$HOME in the .desktop file doesn't work.
How did you implement this? I tried gedit on SolydK-9, created a local copy of org.gnome.gedit.desktop in /home/bas/.local/share/applications and changed the Exec line to be

Code: Select all

Exec=kdesudo -c "HOME=$HOME gedit %U"
Works like a charm, including keeping my personal theme.

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 05 Mar 2017 11:19

bas_otten wrote:
Schoelje wrote: I've only added kdesudo HOME=$HOME to our own applications because I know if they are writing to the user's home directory or not. Only solydxk-constructor does that but sets the owner to the current user when it creates the files. I haven't looked at other applications yet, I only know that adding HOME=$HOME in the .desktop file doesn't work.
How did you implement this? I tried gedit on SolydK-9, created a local copy of org.gnome.gedit.desktop in /home/bas/.local/share/applications and changed the Exec line to be

Code: Select all

Exec=kdesudo -c "HOME=$HOME gedit %U"
Works like a charm, including keeping my personal theme.
Our own applications handle kdesudo/gksudo/none in the startup script itself. So, I changed it there. E.g. /usr/bin/lightdm-manager has the HOME=$HOME addition only when kdesudo is used. When using gksudo or started as root the HOME variable will not be passed because it's not necessary. with other applications (like Synaptic) your solution works but I'll have to implement that in solydk-system-adjustments-9 for each application. By default that won't be much but over time that amount could grow.


SolydXK needs you!
Development | Testing | Translations

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: SolydXK 9 (stretch) alpha build testing

Postby Zill » 05 Mar 2017 11:49

I am probably way off-beam with this but it seems that kdesudo authentication is at the heart of the problem.

Would replacing kdesudo commands with pkexec help if the necessary PolicyKit action definition files are provided?

User avatar
palimmo
Posts: 765
Joined: 19 Nov 2013 19:44
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby palimmo » 05 Mar 2017 13:17

palimmo wrote:
balloon wrote:I took a video capture with VirtualBox:
SolydX 9
https://www.youtube.com/watch?v=84qIFgXU3-k
SolydK 9
https://www.youtube.com/watch?v=sOa-waqQwgY

I also installed it on real PC. I will test while using it.
Nvidia drivers?
As with SolydK 8 no appropriate bootsplash? :( :( :(
:idea:
Could you please provide with the next release a simple, static image (e.g. similar to the SolydXK default desktop background) for debian plymouth manager?
I think this could be an elegant and easy solution for nvidia users, that are not able to get a functional bootsplash animation.
Thank you
Proud user of SolydK!

Dai diamanti non nasce niente, dal letame nascono i fior. http://aquilone.wordpress.com/

User avatar
ilu
Posts: 2072
Joined: 09 Oct 2013 12:45

Re: SolydXK 9 (stretch) alpha build testing

Postby ilu » 05 Mar 2017 15:43

Like Zill I'm not really qualified to comment on a KDE issue but just out of curiosity why are you trying so hard to force the users theme - dark or not - onto root? I always try to use very different colors for everything root - something that shouts at me: "You are root, you fool, don't do anything stupid!"
I know there is not much stupity possible when using UM or DDM but unexperienced people should get used to what root looks like on their system from early on. And it should never ever look the same as user.

I always changed colors for individual apps though, I never thought using a theme for this task. This discussion inspired me to see if I can change root's theme into the most hideous design possible. I'll be back if I find something suitable and I might ask you to make it roots default on SolydX.

Edit: I found orangine but, what a pity, it does not work. Sudo uses the users theme on SolydX9 and probably also on SolydX9. :cry:

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: SolydXK 9 (stretch) alpha build testing

Postby Zill » 05 Mar 2017 15:57

ilu wrote:... I always try to use a very different theme for everything root - something that shouts at me: "You are root, you fool, don't do anything stupid!" I know there is not much stupity possible when using UM or DDM but unexperienced people should get used to what root looks like on their system from early on. And it should never ever look the same as user.
^ +1
I totally agree!
ilu wrote:... This discussion inspired me to see if I can change root's theme into the most hideous design possible. I'll be back if I find something suitable and I might ask you to make it roots default on SolydX.
I am sure that I have seen something like this on an earlier distro I have used. Something like a default red background for a root terminal window...
The trouble is that my last remaining brain cells can't remember which distro it was! :-(

User avatar
ilu
Posts: 2072
Joined: 09 Oct 2013 12:45

Re: SolydXK 9 (stretch) alpha build testing

Postby ilu » 05 Mar 2017 15:58

Zill: See my edit. Schoelje got it "right" on SolydX. But I think this is worth a discussion.

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 05 Mar 2017 16:18

ilu wrote:Zill: See my edit. Schoelje got it "right" on SolydX. But I think this is worth a discussion.
Perhaps, but it would be better to do that in a separate topic. This one is for testing the alpha release. However, I want to add my two cents here by citing our own business proposition stated on the main site:
SolydXK is an open source operating system for small businesses, non-profit organizations and home users.
Business owners need a safe, stable, low maintenance system with a professional look. In my opinion, consistency in performance and looks is important and should be the default. If a person wants to deviate from that given default (and every distribution has its own default) than Linux gives you all the possibilities to do so. I like the consistency in Xfce and want to bring that to KDE as good as I can.


SolydXK needs you!
Development | Testing | Translations

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 05 Mar 2017 19:23

Zill wrote:I am probably way off-beam with this but it seems that kdesudo authentication is at the heart of the problem.

Would replacing kdesudo commands with pkexec help if the necessary PolicyKit action definition files are provided?
I've created a lightdm-manager package using pkexec but that won't help with the user's theme.

This is what I did:
  1. Code: Select all

    kdesudo kate /usr/share/polkit-1/actions/org.solydxk.pkexec.lightdm-manager.policy

    Code: Select all

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
     "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
     "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
    <policyconfig>
    
      <action id="org.solydxk.pkexec.lightdm-manager">
        <message>Authentication is required to run the Lightdm Manager</message>
        <icon_name>lightdm-manager</icon_name>
        <defaults>
          <allow_any>auth_admin</allow_any>
          <allow_inactive>auth_admin</allow_inactive>
          <allow_active>auth_admin</allow_active>
        </defaults>
        <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/lightdm-manager</annotate>
        <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
      </action>
    
    </policyconfig>
  2. Code: Select all

    kdesudo kate /usr/lib/lightdm-manager/lightdm-manager.py

    Code: Select all

    #!/usr/bin/pkexec /usr/bin/python3
  3. Code: Select all

    kdesudo kate /usr/sbin/lightdm-manager

    Code: Select all

    #!/bin/sh
    optimize='OO'; case "$*" in *--debug*) unset optimize; esac
    python3 -tt${optimize} /usr/lib/lightdm-manager/lightdm-manager.py $@
  4. Code: Select all

    kdesudo kate /usr/bin/lightdm-manager-pkexec

    Code: Select all

    #!/bin/sh
    pkexec "/usr/sbin/lightdm-manager" "$@"


SolydXK needs you!
Development | Testing | Translations

User avatar
ilu
Posts: 2072
Joined: 09 Oct 2013 12:45

Re: SolydXK 9 (stretch) alpha build testing

Postby ilu » 05 Mar 2017 21:04

SolydXK is an open source operating system for small businesses, non-profit organizations and home users.
It was the "safe" part of that statement that lead to my opinion. But it's your decision, any discussion does not have to be now. I just mentioned this as a way around the problem.

User avatar
bas_otten
Posts: 203
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: SolydXK 9 (stretch) alpha build testing

Postby bas_otten » 06 Mar 2017 08:00

Schoelje wrote: Our own applications handle kdesudo/gksudo/none in the startup script itself. So, I changed it there. E.g. /usr/bin/lightdm-manager has the HOME=$HOME addition only when kdesudo is used. When using gksudo or started as root the HOME variable will not be passed because it's not necessary. with other applications (like Synaptic) your solution works but I'll have to implement that in solydk-system-adjustments-9 for each application. By default that won't be much but over time that amount could grow.
So what you're after for this is a globally modified way kdesudo itself works, where in its syntax < (-c) command > is carefully and if necessary substituted by < -c "HOME=$HOME command" >.
Just an alias will not be powerful enough. Something like a kdesudo script in /usr/local/bin (so it takes preference), that parses the given arguments, transforms them accordingly and passes that argument string to the actual /usr/bin/kdesudo program. Having this in place, any application that uses kdesudo does not need to be altered, itself or in the way it is invoked.
Am I correct?
This can be done, of course, but it feels like getting closer to a line not to be crossed in terms of (possible) impact. Security people won't like such ;-)

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 06 Mar 2017 08:48

Of course, but if people are concerned about that, they can easily adapt the .bashrc file.

I'm now experimenting with this in .bashrc:

Code: Select all

function kdesudo() {
  OPTS=''
  ADDNEXT=false
  for i in $*; do
    if [ "${i:0:1}" == "-" ]; then
      OPTS="$OPTS $i"
      ADDNEXT=true
    elif $ADDNEXT; then
      OPTS="$OPTS $i"
      ADDNEXT=false
    else
      CMD=$i
    fi
  done
  echo "OPTS = $OPTS"
  echo "CMD = $CMD"
  /usr/bin/kdesudo $OPTS -d -c "HOME=$HOME $CMD"
}


SolydXK needs you!
Development | Testing | Translations

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 06 Mar 2017 09:21

On second thought, I created a bash script /usr/bin/xksudo which users can use if they want to or not but what I can use in our own applications if it is available.

xksudo:

Code: Select all

#!/bin/bash

DEBUG=false
ENGINES='python python3 bash sh'

# Check launcher
KDESUDO=false
LAUNCHER=$(which kdesudo)
if [ "$LAUNCHER" == '' ]; then
  LAUNCHER=$(which gksudo)
  if [ "$LAUNCHER" == '' ]; then
    # This is bad, but we try anyway
    sudo -E $@
    exit 1
  fi
else
  KDESUDO=true
fi

if $DEBUG; then  echo "LAUNCHER = $LAUNCHER"; fi

# Loop all arguments
OPTS=''
APP=''
ADDNEXT=false
HASMSG=false
HASICON=false
for i in "$@"; do
  if $DEBUG; then echo $i; fi
  if [ "${i:0:1}" == "-" ]; then
    if [ "$i" != "-c" ]; then
      if [ "$i" != '-d' ]; then
        ADDNEXT=true
      fi
      if [ "$i" == '--comment' ] || [ "$i" == '--message' ]; then
        HASMSG=true
      elif [ "$i" == '-i' ]; then
        HASICON=true
      fi
      if ! $HASICON; then
        OPTS="$OPTS $i"
      fi
    fi
  elif $ADDNEXT; then
    if $HASICON; then
      HASICON=false
      if [[ ! "$i" =~ '/' ]]; then
        APP=$i
      else
        ICON=$i
      fi
    else
      OPTS="$OPTS \"$i\""
    fi
    ADDNEXT=false
  else
    # Guess the application name
    if [ "$APP" == '' ]; then
      APP=$(basename $i)
      if [[ "$ENGINES" =~ "$APP" ]]; then
        APP=''
      fi
    fi
    # Build the command
    if [ "$CMD" == '' ]; then
      CMD=$i
    else
      CMD="$CMD $i"
    fi
  fi
done

# Show friendly message
if ! $HASMSG; then
  if [ "$APP" == '' ]; then
    APP=$(echo $CMD | awk '{print$1}')
  fi
  MSG="\"<b>$APP</b> needs administrative privileges. Please enter your password.\""
  if $KDESUDO; then
    OPTS="--comment $MSG"
  else
    OPTS="--message $MSG"
  fi
fi

# Get the current theme icon if it doesn't exist
if [ ! -e "$ICON" ] && [ "$APP" != '' ]; then
  if [ "$(which python3)" != '' ]; then
    ICON=$(python3 -c 'from gi.repository import Gtk; import sys; theme = Gtk.IconTheme.get_default(); icon = theme.lookup_icon(sys.argv[1], int(sys.argv[2]), 0); print((icon.get_filename())) if icon else ""' $APP 32)
  elif [ "$(which python)" != '' ]; then
    ICON=$(python -c 'import gtk, sys; theme = gtk.icon_theme_get_default(); icon = theme.lookup_icon(sys.argv[1], int(sys.argv[2]), ()); print icon.get_filename() if icon else ""' $APP 32)
  fi
fi

if $KDESUDO; then
  # Add the icon
  if [ -e "$ICON" ]; then
    OPTS="$OPTS -i \"$ICON\""
  fi
  # Make kdesudo use the user's theme
  CMD="-d -c \"HOME=$HOME $CMD\""
fi

if $DEBUG; then echo "CMD = $LAUNCHER $OPTS $CMD"; fi
eval "$LAUNCHER $OPTS $CMD"
[EDIT]
I've updated the code above.


SolydXK needs you!
Development | Testing | Translations

User avatar
bas_otten
Posts: 203
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: SolydXK 9 (stretch) alpha build testing

Postby bas_otten » 06 Mar 2017 21:25

Schoelje wrote: On second thought, I created a bash script /usr/bin/xksudo which users can use if they want to or not but what I can use in our own applications if it is available.
OK.. (make that sound amazed :-)), so you decided to withdraw the idea of keeping the theme for non-solydk kdesudo applications identical to the user's theme per systemwide default? Or is this a step on the road?

I tested your code. It works fine, except that it does not pass nor tolerate all kdesudo options, for instance:

Code: Select all

bas@bashostv:/ $>>> kdesudo -n -c synaptic 2>/dev/null #works ok but shows root's theme

bas@bashostv:/ $>>> xksudo -n -c synaptic 2>/dev/null #program is not passed as parameter!
LAUNCHER = /usr/bin/kdesudo
-c
synaptic
CMD = /usr/bin/kdesudo --comment "<b></b> needs administrative privileges. Please enter your password." -d -c "HOME=/home/bas "

bas@bashostv:/ $>>> xksudo -c synaptic 2>/dev/null #without the -n it works fine and shows my personal theme
LAUNCHER = /usr/bin/kdesudo
-c
synaptic
CMD = /usr/bin/kdesudo --comment "<b>synaptic</b> needs administrative privileges. Please enter your password." -i "/usr/share/pixmaps/synaptic.png" -d -c "HOME=/home/bas synaptic"
But perhaps you did not intend it to pass all options unaltered, other than the ones that the script is supposed to change? would be neat though!

User avatar
Arjen Balfoort
Site Admin
Posts: 8884
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: SolydXK 9 (stretch) alpha build testing

Postby Arjen Balfoort » 06 Mar 2017 21:56

Yes, I'd like to have xksudo for our own packages only and for those who, like me, prefer a more consistent look. ;)

The script is not done yet and all help is very much appreciated.


SolydXK needs you!
Development | Testing | Translations


Return to “Testing zone”

Who is online

Users browsing this forum: No registered users and 3 guests