View previous topic :: View next topic |
Author |
Message |
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Wed Sep 29, 2021 9:18 pm Post subject: [SOLVED] start twm from console |
|
|
I have installed Gentoo "Desktop (stable)", and want to use twm for window manager with X. Basically I want to boot into my home console and use GUI later,
I copied /etc/X11/xinit/xinitrc into ~/.xinitrc (note this is now a dot file) and tweaked it to have my own decoration. startx gets me to my usual twm opening screen. However, the existing ~/.twmrc with my custom menus is not recognized. The ".twmrc" file is from my old desktop that I replace now with a fitlet2 machine running Gentoo.
What is the proper way to start twm from command line with my own screen and menus?
Last edited by jankom on Fri Sep 22, 2023 3:32 pm; edited 1 time in total |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Sep 29, 2021 9:53 pm Post subject: |
|
|
You wrote you tweaked your ~/.xinitrc? How do you start twm in that file?
Is it
or
Because if you use the latter, twm won't read ~/.twmrc... |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Thu Sep 30, 2021 1:24 am Post subject: |
|
|
Thanks for the quick reply. Here is my entire ~/xinitrc: (the commented out source method confused startx and it went back to console)
Code: | #!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/Xresources
sysmodmap=/etc/X11/xinit/Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?* ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
twm &
xclock -update 1 -geometry 164x164-0-0 &
xosview -geometry -6+0 +net &
xterm -geometry +504-0 -e mc &
exec xterm -sb -geometry 80x30+0-0 -name login #& source .twmrc | [/b] |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Thu Sep 30, 2021 2:17 pm Post subject: Stupid me |
|
|
I just realized that the problem was "ownership". Since I copied file .twmrc from my old desktop I had a different "user and group" of the file. After doing "chown" startx starts correctly, including my custom menus.
Sorry for posting my original question.
Case closed.
Janos |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Thu Sep 30, 2021 2:58 pm Post subject: |
|
|
Did you find that as a result of a twm error message (and if so, where was the message?) or through general inspection? Even threads caused by user error can be useful if they end with instructions for how future readers can recognize that they have the same problem, and how to fix it. |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Thu Sep 30, 2021 7:31 pm Post subject: |
|
|
There was no error message. The twm program went according to its design (as I found out later and what led me to the solution) that if it does not find "~/.twmrc" file it looks for something else, and ultimately uses its out-of-the-box default behavior. Actually, the posting by @mike155 was also helpful. because it made me to investigate the .twmrc file itself. The output of the was the"aha" moment. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Sep 30, 2021 8:15 pm Post subject: |
|
|
I'm glad that you were able to solve the issue.
My next post would have been: please start twm with strace
Code: | strace -o /tmp/strace.log -f twm & |
and then grep for "open" in the output:
Code: | grep open /tmp/strace.log |
grep lists all the files twm opens. That would have shown us that twm opened your rc file and that (and why) it failed. |
|
Back to top |
|
|
|