Page 2 of 4

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 1:46 pm
by clicktician
Discostu wrote: Wed Jul 11, 2018 1:08 pm As mentioned above there are many settings that have to be adjusted for the MX Linux interface to work on a high resolution display.
So, what you're wanting is, "remember all my settings on whatever machine I'm on and automatically restore them when I boot on it."

I don't believe MX has that feature. But I know of no other distro that has it either. Yes, you could script quite a lot to get the whole desktop machine-dependent. Linux is very scriptable.

If you didn't want to have more than 1 user account, you could use tar to save key files from your home directory to a backup file on your USB drive with a machine dependent name. Then script a restore from the archive and restart X when you log on.

I would suggest that a better approach would be to compromise on a display resolution you can work with on both machines, like 1920x1080 or something. Get everything looking great at that resolution, and then reset the resolution of the Yoga or any other HiDPI screen to the standard you have chosen. Then all you're doing is simply resetting the resolution depending on the machine.

A toggle button like fehlix suggests would make resetting the resolution easy, but you could put an xrandr statement in a startup script to always set the resolution to 1920x1080 (or whatever) regardless of the machine since it will not hurt to reset it to itself on your home machine.

Remember that x.conf and .Xprofile overrides what the system dynamically decides your resolution should be, so if you create one of those config files, you can enforce the resolution you like without using xrandr to reset.

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 1:51 pm
by fehlix
When you have found out all the settings you need to switch let us know. We might prepare something which may be usefull for others too. Thanks.

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:29 pm
by Discostu
clicktician wrote: Wed Jul 11, 2018 1:46 pm So, what you're wanting is, "remember all my settings on whatever machine I'm on and automatically restore them when I boot on it."
That's not what I said. It'd be totally sufficient to have the possibility to safe these settings into profiles / configuration files / scripts so that I can switch between designs with a click.
If you didn't want to have more than 1 user account, you could use tar to save key files from your home directory to a backup file on your USB drive with a machine dependent name. Then script a restore from the archive and restart X when you log on.
Sounds interesting... but I don't really get it :-)
I would suggest that a better approach would be to compromise on a display resolution you can work with on both machines, like 1920x1080 or something. Get everything looking great at that resolution, and then reset the resolution of the Yoga or any other HiDPI screen to the standard you have chosen. Then all you're doing is simply resetting the resolution depending on the machine.
This would be a possibilty but I just found out that I can't get a resolution above 1600*900 for my home machine. Maybe a driver issue?

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:30 pm
by Discostu
Just wanted to get back to my second question: Is there an easy possibility to reset these settings for a fresh start? Delete some configuration files or something?

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:36 pm
by Discostu
My home machine:

Code: Select all

System:    Host: mx1 Kernel: 4.15.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 Desktop: Xfce 4.12.3 
           tk: Gtk 2.24.31 Distro: MX-17.1_x64 Horizon March 14, 2018 
Machine:   Type: Laptop System: LENOVO product: 80MR v: Lenovo B70-80 serial: <filter> 
           Mobo: LENOVO model: Lenovo B70-80 v: NO DPK serial: <filter> UEFI [Legacy]: LENOVO v: D1CN95WW 
           date: 11/12/2015 
CPU:       Topology: Dual Core model: Intel Core i3-5005U bits: 64 type: MT MCP arch: Broadwell rev: 4 
           L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 15963 
           Speed: 795 MHz min/max: 500/1900 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 4: 802 
Graphics:  Card-1: Intel HD Graphics 5500 driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa resolution: 1600x900~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2) v: 4.5 Mesa 13.0.6 
           direct render: Yes 
Audio:     Card-1: Intel Broadwell-U Audio driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           Card-2: Intel Wildcat Point-LP High Definition Audio driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k4.15.0-1-amd64 
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: 2.3LK-NAPI 
           port: 3000 bus ID: 02:00.0 
           IF: eth0 state: down mac: <filter> 
           Card-2: Intel Wireless 3160 driver: iwlwifi v: kernel bus ID: 03:00.0 
           IF: wlan0 state: up mac: <filter> 
Drives:    HDD Total Size: 1.02 TiB used: 1.69 GiB (0.2%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10JPCX-24UE4T0 size: 931.51 GiB 
           ID-2: /dev/sdb type: USB vendor: SanDisk model: Ultra USB 3.0 size: 115.69 GiB 
Partition: ID-1: / size: 6.12 GiB used: 175.9 MiB (2.8%) fs: overlay dev: ERR-102 
Sensors:   System Temperatures: cpu: 39.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 192 Uptime: 32m Memory: 7.72 GiB used: 792.9 MiB (10.0%) Init: SysVinit runlevel: 5 
           Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.10 
DPI: Automatic (-1)

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:51 pm
by fehlix
Discostu wrote: Wed Jul 11, 2018 3:30 pm Just wanted to get back to my second question: Is there an easy possibility to reset these settings for a fresh start? Delete some configuration files or something?
All defaults for a new user are under /etc/skel.

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:54 pm
by Discostu
fehlix wrote: Wed Jul 11, 2018 3:51 pm
Discostu wrote: Wed Jul 11, 2018 3:30 pm Just wanted to get back to my second question: Is there an easy possibility to reset these settings for a fresh start? Delete some configuration files or something?
All defaults for a new user are under /etc/skel.
I can only find the installation file there.

Re: Switch between different display settings

Posted: Wed Jul 11, 2018 3:57 pm
by dolphin_oracle
as a matter of fact, the antiX live-USB system that MX utilizes does feature a "save state per machine" mode. However, its not really set up for files under /home where most of the Xfce configurations live.

I need to do some testing, but you may be able to added the prerequisite settings files to the machine-specific "files to save" lists under /live/boot-dev/antiX/. I forget the exact path names at the moment, but I can look tonight.

the savestate system doesn't even rely on "persistence", only on a writable usb stick.



**default configs are in /etc/skel/.config

Re: Switch between different display settings

Posted: Thu Jul 12, 2018 2:41 am
by Discostu
dolphin_oracle wrote: Wed Jul 11, 2018 3:57 pm **default configs are in /etc/skel/.config
Thanks, I've found them, didn't know they were hidden files. Could you tell me which of these files contain the information we are talking about and what to do with them to return to the default settings? Sorry for these noob questions... :embarrassed:

Re: Switch between different display settings

Posted: Thu Jul 12, 2018 7:39 am
by dolphin_oracle
Discostu wrote: Thu Jul 12, 2018 2:41 am
dolphin_oracle wrote: Wed Jul 11, 2018 3:57 pm **default configs are in /etc/skel/.config
Thanks, I've found them, didn't know they were hidden files. Could you tell me which of these files contain the information we are talking about and what to do with them to return to the default settings? Sorry for these noob questions... :embarrassed:

these are good questions!

the answer is...it depends on what you are resetting. but most likely the files you want are under the /etc/skel/.config/xfce4 in a subfolder. IIRC, the dpi and other "X" settings are in a file called xsetttings.xml

Due to the way xfce manages settings, you may need to kill the xfconf system before copying over any files from the skel folder to your user folder.

Code: Select all

pkill xfconf

after you start your file manager should do the trick. then after you copy your files, logout and login.