DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default [OpenBSD] Customize Xenodm (background image , change keyboard , change xterm)

how i can change background image(png,jpg ...) in xenodm ?
how i can change keyboard layout by press ALT + Shift ?
how i can change background , foreground , font size and font family of xterm console ?
anything must be permanents.

thanks.
Reply With Quote
  #2   (View Single Post)  
Old 9th June 2020
d31n1 d31n1 is offline
New User
 
Join Date: Jan 2020
Posts: 8
Default

I would check out
https://www.tumfatig.net/20190208/cu...penbsd-xenodm/
and
https://www.c0ffee.net/blog/openbsd-on-a-laptop/
under section X11 is and .Xresources example
Reply With Quote
  #3   (View Single Post)  
Old 9th June 2020
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 264
Default

It's probably better to use ~/.Xdefaults to configure xterm rather than ~/.Xresources because it doesn't require that the resources be reloaded when they're changed. Note that xterm will only read ~/.Xdefaults if ~/.Xresources doesn't exist.

Anyway, here's my sample file:

https://raw.githubusercontent.com/He...ster/Xdefaults

^ That uses the stock bitmap font, to apply an XFT font use
Code:
Xterm*vt100.faceName: mono:size=11
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #4   (View Single Post)  
Old 10th June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

thanks to all.

but according to your posts i can not change background image and keyboard layout by ALT + SHIFT keys.


for changing keyboard layout i find this code :
Code:
setxkbmap -layout us,it -option grp:alt_space_toggle
but alt_shift_toggle not working.

how i can set that permanent?
how i can change background image? [login + desktop]
Reply With Quote
  #5   (View Single Post)  
Old 10th June 2020
Prevet Prevet is offline
Package Pilot
 
Join Date: Oct 2017
Posts: 196
Default

feh can change background image.
Install feh and see the man page.
Put this in your .xsession file
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures

There was a post here about customizing the login
https://www.reddit.com/r/openbsd/com...xenodm_themes/
Reply With Quote
  #6   (View Single Post)  
Old 10th June 2020
bsdun bsdun is offline
Real Name: Steve
Port Guard
 
Join Date: Feb 2020
Posts: 43
Default

(In many programs Alt is called "Meta"; Windows Key is called "Mod" or "Mod4".)
ALT-SHIFT:
in ~/.xsession file
Code:
setxkbmap -model pc104 -layout us,it -variant ,, -option grp:alt_shift_toggle
If you want the NumLock to be turned on automatically, install numlockx:
Code:
pkg_add numlockx
Then add it to ~/.xsession:
Code:
/usr/local/bin/numlockx on
All those lines in ~/.xsession should be above the line that invokes window manager/desktop environment.
Reply With Quote
  #7   (View Single Post)  
Old 22nd June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
It's probably better to use ~/.Xdefaults to configure xterm rather than ~/.Xresources because it doesn't require that the resources be reloaded when they're changed. Note that xterm will only read ~/.Xdefaults if ~/.Xresources doesn't exist.

Anyway, here's my sample file:

https://raw.githubusercontent.com/He...ster/Xdefaults

^ That uses the stock bitmap font, to apply an XFT font use
Code:
Xterm*vt100.faceName: mono:size=11
background changed but font size not changed.
Reply With Quote
  #8   (View Single Post)  
Old 22nd June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

Quote:
Originally Posted by Prevet View Post
feh can change background image.
Install feh and see the man page.
Put this in your .xsession file
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures

There was a post here about customizing the login
https://www.reddit.com/r/openbsd/com...xenodm_themes/
i install feh but when i add this config in .xsession and re-login then OpenBSD shown blank page and return to login page(no desktop loaded). (i fix this problem in boot by removing .xsession file)
also i set .xsession permission to 777.

but when run this command in xterm then background changed.
Code:
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures
Reply With Quote
  #9   (View Single Post)  
Old 22nd June 2020
Prevet Prevet is offline
Package Pilot
 
Join Date: Oct 2017
Posts: 196
Default

Quote:
Originally Posted by jonsec View Post
i install feh but when i add this config in .xsession and re-login then OpenBSD shown blank page and return to login page(no desktop loaded). (i fix this problem in boot by removing .xsession file)
also i set .xsession permission to 777.

but when run this command in xterm then background changed.
Code:
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures
Sorry about that. It should have had an '&' character at the end of that command in the .xsession file.

Quote:
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures &
When I was learning how to set OpenBSD up, I searched for examples on Github. Here's a few:

http://daemonforums.org/showthread.p...8988#post68988
https://github.com/ibara/dotfiles
https://github.com/bfmartin/fvwm-config-on-openbsd

https://github.com/jcs/dotfiles
https://github.com/begriffs/obsd/tree/master/home
Reply With Quote
Old 23rd June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

not working.
Reply With Quote
Old 23rd June 2020
Prevet Prevet is offline
Package Pilot
 
Join Date: Oct 2017
Posts: 196
Default

Post your .xsession file. Also take a look at the .xsession files in the links I posted, and try to figure out how yours is different. I am thinking you might have started your window manager before you started feh. The window manager call should be the last command in your .xsession file.

This is a command that shows one picture.

feh --bg-scale --no-fehbg ~/pictures/filename.jpeg &
Reply With Quote
Old 23rd June 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,389
Default

The feh project provides a specific tool for single image wallpapers: ~/.fehbg. It is generated with
Code:
feh --bg-fill wallpaper.png
run in your home directory.
Scale it once and then run ./fehbg in your .xsession or autostart file.
Reply With Quote
Old 23rd June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

Quote:
Originally Posted by Prevet View Post
Post your .xsession file. Also take a look at the .xsession files in the links I posted, and try to figure out how yours is different. I am thinking you might have started your window manager before you started feh. The window manager call should be the last command in your .xsession file.

This is a command that shows one picture.

feh --bg-scale --no-fehbg ~/pictures/filename.jpeg &
/root/.xsession file is empty and i edit this file to :
Code:
feh --bg-fill --no-fehbg --randomize --recursive ~/pictures
but not working.

I'm a beginner in OpenBSD. Please post full description ...
Reply With Quote
Old 23rd June 2020
bsdun bsdun is offline
Real Name: Steve
Port Guard
 
Join Date: Feb 2020
Posts: 43
Exclamation Don't use root as your default user!

Quote:
Originally Posted by jonsec View Post
/root/.xsession file is empty ...
Are you using OpenBSD as root? You should create your own user, add that user to groups wheel, staff, operator; set up doas.conf to give your user permission to run as root through doas
(example: doas pkg_add ranger)
doas.conf should end with an empty line at the end of file, or you'll get error.
Read these articles:
https://man.openbsd.org/useradd
https://man.openbsd.org/usermod
https://man.openbsd.org/doas
https://man.openbsd.org/doas.conf
Reply With Quote
Old 23rd June 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,414
Default

The operator group provides read access to all filesystems/storage, which should be a security concern when not being used for backup. Do you trust every third party program you install?
Reply With Quote
Old 23rd June 2020
bsdun bsdun is offline
Real Name: Steve
Port Guard
 
Join Date: Feb 2020
Posts: 43
Default

Quote:
Originally Posted by jggimi View Post
Do you trust every third party program you install?
That's a good question. I need to think about it.
Reply With Quote
Old 23rd June 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,414
Default

A typical workstation will have hundreds of dependencies automatically installed, and most users don't think twice about them.

Time to think twice.
Reply With Quote
Old 23rd June 2020
jonsec jonsec is offline
Fdisk Soldier
 
Join Date: Jul 2019
Posts: 68
Default

Quote:
Are you using OpenBSD as root?
yes. i not want to use another account.

Quote:
You should create your own user, add that user to groups w...
why?
i can run feh command in root account(in xterm) and works.
Reply With Quote
Old 23rd June 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,414
Default

  1. A typographic error, confusion about your working directory, or other jonsec-caused error could damage the OS or make it unusable, even unrecoverable.
  2. You are giving ALL of the scripts and executable programs on your workstation the authority to do ANYTHING. Note my comments above about the excessive authority of the operator group for normal use. That is dangerous. This is worse.
Reply With Quote
Old 24th June 2020
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Quote:
Originally Posted by Prevet View Post
Post your .xsession file. Also take a look at the .xsession files in the links I posted, and try to figure out how yours is different. I am thinking you might have started your window manager before you started feh. The window manager call should be the last command in your .xsession file.

This is a command that shows one picture.

feh --bg-scale --no-fehbg ~/pictures/filename.jpeg &
This topic has gotten rather confusing, but any way, here is my .xsession file, works good for me.
.xsession:
Code:
tint2 &
./background &
xrdb -load .Xresources &
xterm &
fluxbox
Note, "background" is a executable script I have, :
Code:
display -window root /home/garry/Images/backgrounds/aa-OBSD-background.png
That's all there is to it, I am using 'display' instead of 'feh', but 'feh' works just as well, and if it is for the login window, or console, it needs to be 'feh' , 'display' will not work.
__________________
My best friends are parrots
Reply With Quote
Reply

Tags
background, language, xenodm, xterm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Operational change required for OpenBSD -current users jggimi OpenBSD General 2 18th October 2016 02:19 PM
Any info on OpenBSD 5.6's new default IPv6 to off change? SlyM OpenBSD General 4 2nd November 2014 09:45 PM
How to change keyboard key? newbsdied OpenBSD General 5 7th November 2010 02:45 AM
How to change the font size? atop xterm, aterm, etc jb_daefo General software and network 12 13th July 2010 10:42 AM
Can not change keyboard layout with SHIFT and Alt after VNCviewer connect mfaridi OpenBSD General 1 13th December 2008 03:14 PM


All times are GMT. The time now is 10:43 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick